-
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.
Fix #117: Errore di autorizzazione in lettura evento
- Loading branch information
Showing
2 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...est/src/test/java/test/api/backoffice/v1/eventi/eventi-interfaccia-autorizzazione.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,68 @@ | ||
Feature: Eventi di verifica della pendenza | ||
|
||
Background: | ||
|
||
* callonce read('classpath:utils/common-utils.feature') | ||
* call read('classpath:configurazione/v1/anagrafica.feature') | ||
|
||
Scenario: Autorizzazione alla lettura del dettaglio di un evento | ||
|
||
Given url backofficeBaseurl | ||
And path 'ruoli', 'Operatore' | ||
And headers gpAdminBasicAutenticationHeader | ||
And request | ||
""" | ||
{ | ||
acl: [ { servizio: 'Pendenze', autorizzazioni: [ 'R', ] } ], | ||
} | ||
""" | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'operatori', 'RSSMRA30A01H501I' | ||
And headers gpAdminBasicAutenticationHeader | ||
And request | ||
""" | ||
{ | ||
ragioneSociale: 'Mario Rossi', | ||
domini: ['*'], | ||
tipiPendenza: ['*'], | ||
acl: null, | ||
ruoli: ['Operatore'], | ||
abilitato: true | ||
} | ||
""" | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
* call read('classpath:configurazione/v1/operazioni-resetCache.feature') | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def pendenzaPut = read('classpath:test/api/pendenza/v1/pendenze/put/msg/pendenza-put_monovoce_riferimento.json') | ||
* def pendenzeBaseurl = getGovPayApiBaseUrl({api: 'backoffice', versione: 'v1', autenticazione: 'basic'}) | ||
|
||
Given url pendenzeBaseurl | ||
And path '/pendenze', idA2A, idPendenza | ||
And headers gpAdminBasicAutenticationHeader | ||
And request pendenzaPut | ||
When method put | ||
Then status 201 | ||
|
||
* call sleep(200) | ||
|
||
* def backofficeBaseurl = getGovPayApiBaseUrl({api: 'backoffice', versione: 'v1', autenticazione: 'spid'}) | ||
|
||
Given url backofficeBaseurl | ||
And path '/eventi' | ||
And param idA2A = idA2A | ||
And param idPendenza = idPendenza | ||
And headers operatoreSpidAutenticationHeader | ||
When method get | ||
Then status 200 | ||
|
||
Given url backofficeBaseurl | ||
And path '/eventi', response.risultati[0].id | ||
And headers operatoreSpidAutenticationHeader | ||
When method get | ||
Then status 200 |
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