Skip to content

Commit

Permalink
Adeguata testsuite all'utilizzo della nuova versione del simulatore c…
Browse files Browse the repository at this point in the history
…he consente di decidere la versione del pagamento da utilizzare direttamente nella chiamata alle API senza dover configurare l'anagrafica del simulatore.
  • Loading branch information
pintorig committed Oct 15, 2021
1 parent 3bd77f0 commit ec1fa58
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Background:

* configure followRedirects = false

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')
* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')
* def versionePagamento = 2

* def esitoVerifyPayment = read('classpath:test/workflow/modello3/v2/msg/verifyPayment-response-ok.json')
* def esitoGetPayment = read('classpath:test/api/backoffice/v1/pendenze/get/msg/getPayment-response-ok-multibeneficiario.json')
Expand Down Expand Up @@ -104,14 +103,6 @@ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pe
* def iuv = getIuvFromNumeroAvviso(numeroAvviso)
* def importo = pendenzaPut.importo

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
Expand Down Expand Up @@ -149,18 +140,6 @@ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pe
* match response.rpp[0].stato == 'RT_ACCETTATA_PA'
* match response.rpp[0].rt == '#notnull'


# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')


Scenario: Caricamento pendenza multibeneficiario di due enti che condividono l'IBAN

# configuro secondo dominio per utilizzare lo stesso iban del dominio principale
Expand Down Expand Up @@ -217,14 +196,6 @@ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pe
* def iuv = getIuvFromNumeroAvviso(numeroAvviso)
* def importo = pendenzaPut.importo

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
Expand Down Expand Up @@ -262,16 +233,3 @@ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pe
* match response.rpp[0].stato == 'RT_ACCETTATA_PA'
* match response.rpp[0].rt == '#notnull'


# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')



Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ Background:

* set intermediario.principalPagoPa = 'xxx'

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')
* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* def esitoVerifyPayment = read('classpath:test/workflow/modello3/v2/msg/verifyPayment-response-ok.json')
* def esitoGetPayment = read('classpath:test/workflow/modello3/v2/msg/getPayment-response-ok.json')

* def versionePagamento = 2

Given url backofficeBaseurl
And path 'intermediari', idIntermediario
And headers basicAutenticationHeader
Expand All @@ -36,38 +35,12 @@ Then assert responseStatus == 200 || responseStatus == 201

Scenario: Verifica pagamento

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

* def numeroAvviso = '000000000000000000'
* call read('classpath:utils/psp-verifica-rpt.feature')
* match response.faultBean == faultBean

# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')

Scenario: Attiva pagamento

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

* def numeroAvviso = '000000000000000000'
* def iuv = '000000000000000'
* def ccp = '1'
Expand All @@ -76,12 +49,3 @@ Scenario: Attiva pagamento
* call read('classpath:utils/psp-attiva-rpt.feature')
* match response.faultBean == faultBean

# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ Background:

* def idPendenza = getCurrentTimeMillis()
* def pendenzaPut = read('classpath:test/api/pendenza/v1/pendenze/put/msg/pendenza-put_monovoce_riferimento.json')
# * def esitoAttivaRPT = read('classpath:test/workflow/modello3/v1/msg/attiva-response-ok.json')
# * def esitoVerificaRPT = read('classpath:test/workflow/modello3/v1/msg/verifica-response-ok.json')
* configure followRedirects = false


* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')
* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* def esitoVerifyPayment = read('classpath:test/workflow/modello3/v2/msg/verifyPayment-response-ok.json')
* def esitoGetPayment = read('classpath:test/workflow/modello3/v2/msg/getPayment-response-ok.json')

* def versionePagamento = 2

Scenario: Pagamento eseguito dovuto precaricato con verifica

Expand All @@ -43,14 +38,6 @@ Then assert responseStatus == 200 || responseStatus == 201

* call read('classpath:configurazione/v1/operazioni-resetCache.feature')

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
Expand Down Expand Up @@ -107,12 +94,3 @@ Then assert responseStatus == 200 || responseStatus == 201
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp

# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ Background:

* def idPendenza = getCurrentTimeMillis()
* def pendenzaPut = read('classpath:test/api/pendenza/v1/pendenze/put/msg/pendenza-put_monovoce_riferimento.json')
# * def esitoAttivaRPT = read('classpath:test/workflow/modello3/v1/msg/attiva-response-ok.json')
# * def esitoVerificaRPT = read('classpath:test/workflow/modello3/v1/msg/verifica-response-ok.json')
* configure followRedirects = false


* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')
* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* def esitoVerifyPayment = read('classpath:test/workflow/modello3/v2/msg/verifyPayment-response-ok.json')
* def esitoGetPayment = read('classpath:test/workflow/modello3/v2/msg/getPayment-response-ok.json')

* def versionePagamento = 2

Scenario: Pagamento eseguito dovuto precaricato con verifica

Expand All @@ -43,14 +38,6 @@ Then assert responseStatus == 200 || responseStatus == 201

* call read('classpath:configurazione/v1/operazioni-resetCache.feature')

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
Expand Down Expand Up @@ -88,15 +75,6 @@ Then assert responseStatus == 200 || responseStatus == 201
* match response.rpp[0].stato == 'RT_ACCETTATA_PA'
* match response.rpp[0].rt == '#notnull'

# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')

Scenario: Pagamento eseguito dovuto precaricato con verifica, dopo un pagamento non eseguito

Expand All @@ -123,14 +101,6 @@ Then assert responseStatus == 200 || responseStatus == 201

* call read('classpath:configurazione/v1/operazioni-resetCache.feature')

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
Expand Down Expand Up @@ -200,18 +170,3 @@ Then assert responseStatus == 200 || responseStatus == 201
* match response.rpp[1].rt == '#notnull'


# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')






Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ Background:

* def idPendenza = getCurrentTimeMillis()
* def pendenzaPut = read('classpath:test/api/pendenza/v1/pendenze/put/msg/pendenza-put_monovoce_riferimento.json')
# * def esitoAttivaRPT = read('msg/attiva-response-ok.json')
* configure followRedirects = false

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')
* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* def esitoVerifyPayment = read('classpath:test/workflow/modello3/v2/msg/verifyPayment-response-ok.json')
* def esitoGetPayment = read('classpath:test/workflow/modello3/v2/msg/getPayment-response-ok.json')

* def versionePagamento = 2

Scenario: Pagamento eseguito dovuto precaricato

* call read('classpath:utils/pa-carica-avviso.feature')
Expand All @@ -41,14 +39,6 @@ Then assert responseStatus == 200 || responseStatus == 201

* call read('classpath:configurazione/v1/operazioni-resetCache.feature')

# Configurazione del simulatore

* set dominioNdpSymPut.versione = 2

* call read('classpath:utils/nodo-config-dominio-put.feature')

* call read('classpath:utils/nodo-config-stazione-put.feature')

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
Expand Down Expand Up @@ -78,13 +68,3 @@ Then assert responseStatus == 200 || responseStatus == 201
* match response.rpp == '#[1]'
* match response.rpp[0].stato == 'RPT_ACCETTATA_NODO'

# ripristino dominio e stazione

* def dominioNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/dominio.json')

* call read('classpath:utils/nodo-config-dominio-put.feature')

* def stazioneNdpSymPut = read('classpath:test/workflow/modello3/v2/msg/stazione.json')

* call read('classpath:utils/nodo-config-stazione-put.feature')

Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ And param ccp = ccp
And param importo = importo
And param tipoRicevuta = tipoRicevuta
And param ibanAccredito = ibanAccredito
And param versione = versionePagamento
When method get
Then assert responseStatus == 200
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Given url ndpsym_psp_url
And path 'verifica'
And param codDominio = idDominio
And param numeroAvviso = numeroAvviso
And param versione = versionePagamento
When method get
Then assert responseStatus == 200

0 comments on commit ec1fa58

Please sign in to comment.