-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
508 additions
and
29 deletions.
There are no files selected for viewing
253 changes: 253 additions & 0 deletions
253
...est/src/test/java/test/api/backoffice/v1/pendenze/put/pendenza-put-unico-endpoint.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
Feature: Esecuzione di un pagamento con invio ricevuta all'endpoint unico | ||
|
||
Background: | ||
|
||
* callonce read('classpath:utils/common-utils.feature') | ||
* callonce read('classpath:configurazione/v1/anagrafica.feature') | ||
|
||
* def tipoRicevuta = "R01" | ||
* def riversamentoCumulativo = "true" | ||
|
||
* configure followRedirects = false | ||
|
||
* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json') | ||
* set stazioneNdpSymPut.urlRT = govpay_url + '/govpay/frontend/api/pagopa/PagamentiTelematiciCCPservice' | ||
* call read('classpath:utils/nodo-config-stazione-put.feature') | ||
|
||
Scenario: Pagamento di una pendenza precaricata con invio della ricevuta al nuovo endpoint unico | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def pendenzaPut = read('classpath:test/api/pendenza/v1/pendenze/put/msg/pendenza-put_monovoce_riferimento.json') | ||
|
||
* call read('classpath:utils/pa-carica-avviso.feature') | ||
* def responsePut = response | ||
* def numeroAvviso = response.numeroAvviso | ||
* def iuv = getIuvFromNumeroAvviso(numeroAvviso) | ||
* def importo = pendenzaPut.importo | ||
|
||
Given url backofficeBaseurl | ||
And path '/pendenze', idA2A, idPendenza | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
And match response == read('msg/pendenza-get.json') | ||
|
||
* match response.numeroAvviso == responsePut.numeroAvviso | ||
* match response.stato == 'NON_ESEGUITA' | ||
* match response.voci == '#[1]' | ||
* match response.voci[0].indice == 1 | ||
* match response.voci[0].stato == 'Non eseguito' | ||
|
||
* def numeroAvviso = response.numeroAvviso | ||
* def iuv = getIuvFromNumeroAvviso(numeroAvviso) | ||
* def ccp = getCurrentTimeMillis() | ||
* def importo = pendenzaPut.importo | ||
* def ndpsym_psp_url = ndpsym_url + '/psp/rs/psp' | ||
|
||
Given url ndpsym_psp_url | ||
And path 'attiva' | ||
And param codDominio = idDominio | ||
And param numeroAvviso = numeroAvviso | ||
And param ccp = ccp | ||
And param importo = importo | ||
And param tipoRicevuta = tipoRicevuta | ||
And param ibanAccredito = ibanAccredito | ||
And param riversamentoCumulativo = riversamentoCumulativo | ||
When method get | ||
Then assert responseStatus == 200 | ||
|
||
# Verifico la notifica di attivazione | ||
|
||
* call read('classpath:utils/pa-notifica-attivazione.feature') | ||
* match response == read('classpath:test/workflow/modello3/v1/msg/notifica-attivazione.json') | ||
|
||
# Verifico la notifica di terminazione | ||
|
||
* call read('classpath:utils/pa-notifica-terminazione.feature') | ||
* match response == read('classpath:test/workflow/modello3/v1/msg/notifica-terminazione-eseguito.json') | ||
|
||
# Verifica endpoint RT tramite giornale Eventi. | ||
|
||
Given url backofficeBaseurl | ||
And path '/eventi' | ||
And param idDominio = idDominio | ||
And param iuv = iuv | ||
And param componente = 'API_PAGOPA' | ||
And param messaggi = true | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
And match response == | ||
""" | ||
{ | ||
numRisultati: 3, | ||
numPagine: '#number', | ||
risultatiPerPagina: 25, | ||
pagina: 1, | ||
prossimiRisultati: '#ignore', | ||
risultati: '#[3]' | ||
} | ||
""" | ||
|
||
# Ricevuta RT | ||
|
||
And match response.risultati[0] == | ||
""" | ||
{ | ||
"id": "#notnull", | ||
"idDominio":"#(idDominio)", | ||
"iuv":"#(iuv)", | ||
"ccp":"#(''+ccp)", | ||
"idA2A": "#(idA2A)", | ||
"idPendenza": "#(''+idPendenza)", | ||
"idPagamento": "#notnull", | ||
"componente": "API_PAGOPA", | ||
"categoriaEvento": "INTERFACCIA", | ||
"ruolo": "SERVER", | ||
"tipoEvento": "paaInviaRT", | ||
"sottotipoEvento": "##null", | ||
"esito": "OK", | ||
"sottotipoEsito": "200", | ||
"dettaglioEsito": "#notnull", | ||
"dataEvento": "#notnull", | ||
"durataEvento": "#notnull", | ||
"datiPagoPA" : "#notnull", | ||
"clusterId" : "#notnull", | ||
"transactionId" : "#notnull", | ||
"parametriRichiesta": { | ||
"principal": "#(ndpsym_user)", | ||
"dataOraRichiesta":"#regex \\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d", | ||
"url": "#(govpay_url +'/govpay/frontend/api/pagopa/PagamentiTelematiciCCPservice')", | ||
"method": "POST", | ||
"headers": "#array", | ||
"payload": "#ignore" | ||
}, | ||
"parametriRisposta": { | ||
"dataOraRisposta":"#regex \\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d", | ||
"status": 200, | ||
"headers": "#array", | ||
"payload": "#ignore" | ||
} | ||
} | ||
""" | ||
And match response.risultati[0].dettaglioEsito == "Acquisita ricevuta di pagamento [IUV: "+ iuv +" CCP:"+ ccp +"] emessa da Banco di Ponzi S.p.A." | ||
And match response.risultati[0].datiPagoPA == | ||
""" | ||
{ | ||
"idCanale": "GovPAYPsp1_PO", | ||
"tipoVersamento":"PO", | ||
"idDominio" : "#(''+idDominio)", | ||
"idIntermediario" : "#(''+idIntermediario)", | ||
"idStazione" : "#(''+idStazione)" | ||
} | ||
""" | ||
|
||
# Nodo Invia RPT | ||
|
||
And match response.risultati[1] == | ||
""" | ||
{ | ||
"id": "#notnull", | ||
"idDominio":"#(idDominio)", | ||
"iuv":"#(iuv)", | ||
"ccp":"#(''+ccp)", | ||
"idA2A": "#(idA2A)", | ||
"idPendenza": "#(''+idPendenza)", | ||
"idPagamento": "#notnull", | ||
"componente": "API_PAGOPA", | ||
"categoriaEvento": "INTERFACCIA", | ||
"ruolo": "CLIENT", | ||
"tipoEvento": "nodoInviaRPT", | ||
"sottotipoEvento": "##null", | ||
"esito": "OK", | ||
"sottotipoEsito": "200", | ||
"dettaglioEsito": "##null", | ||
"dataEvento": "#notnull", | ||
"durataEvento": "#notnull", | ||
"datiPagoPA" : "#notnull", | ||
"clusterId" : "#notnull", | ||
"transactionId" : "#notnull", | ||
"parametriRichiesta": { | ||
"dataOraRichiesta":"#regex \\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d", | ||
"url": "#(ndpsym_url +'/pagopa/PagamentiTelematiciRPTservice')", | ||
"method": "POST", | ||
"headers": "#array", | ||
"payload": "#ignore" | ||
}, | ||
"parametriRisposta": { | ||
"dataOraRisposta":"#regex \\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d", | ||
"status": 200, | ||
"headers": "#array", | ||
"payload": "#ignore" | ||
} | ||
} | ||
""" | ||
And match response.risultati[1].datiPagoPA == | ||
""" | ||
{ | ||
"idPsp": "GovPAYPsp1", | ||
"idIntermediarioPsp": "GovPAYPsp1", | ||
"idCanale": "GovPAYPsp1_PO", | ||
"tipoVersamento":"PO", | ||
"modelloPagamento": "4", | ||
"idDominio" : "#(''+idDominio)", | ||
"idIntermediario" : "#(''+idIntermediario)", | ||
"idStazione" : "#(''+idStazione)" | ||
} | ||
""" | ||
|
||
# Attiva RPT | ||
|
||
And match response.risultati[2] == | ||
""" | ||
{ | ||
"id": "#notnull", | ||
"idDominio":"#(idDominio)", | ||
"iuv":"#(iuv)", | ||
"ccp":"#(''+ccp)", | ||
"idA2A": "#(idA2A)", | ||
"idPendenza": "#(''+idPendenza)", | ||
"idPagamento": "#notnull", | ||
"componente": "API_PAGOPA", | ||
"categoriaEvento": "INTERFACCIA", | ||
"ruolo": "SERVER", | ||
"tipoEvento": "paaAttivaRPT", | ||
"sottotipoEvento": "##null", | ||
"esito": "OK", | ||
"sottotipoEsito": "200", | ||
"dettaglioEsito": "##null", | ||
"dataEvento": "#notnull", | ||
"durataEvento": "#notnull", | ||
"datiPagoPA" : "#notnull", | ||
"clusterId" : "#notnull", | ||
"transactionId" : "#notnull", | ||
"parametriRichiesta": { | ||
"principal": "#(ndpsym_user)", | ||
"dataOraRichiesta":"#regex \\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d", | ||
"url": "#(govpay_url +'/govpay/frontend/api/pagopa/PagamentiTelematiciCCPservice')", | ||
"method": "POST", | ||
"headers": "#array", | ||
"payload": "#ignore" | ||
}, | ||
"parametriRisposta": { | ||
"dataOraRisposta":"#regex \\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\d", | ||
"status": 200, | ||
"headers": "#array", | ||
"payload": "#ignore" | ||
} | ||
} | ||
""" | ||
And match response.risultati[2].datiPagoPA == | ||
""" | ||
{ | ||
"idPsp": "GovPAYPsp1", | ||
"idIntermediarioPsp": "GovPAYPsp1", | ||
"idCanale": "GovPAYPsp1_PO", | ||
"tipoVersamento":"PO", | ||
"modelloPagamento": "4", | ||
"idDominio" : "#(''+idDominio)", | ||
"idIntermediario" : "#(''+idIntermediario)", | ||
"idStazione" : "#(''+idStazione)" | ||
} | ||
""" | ||
|
Oops, something went wrong.