Skip to content

Commit 5e08ad7

Browse files
committed
fix github secrets
1 parent fc81b0a commit 5e08ad7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
env:
1212
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
1313
CYPRESS_AUTHORIZATION_TOKEN: ${{ secrets.AUTHORIZATION_TOKEN }}
14-
CYPRESS_CREDENTIALS: ${{ secrets.CREDENTIALS }}
14+
CREDENTIALS: ${{ secrets.CREDENTIALS }}
1515
with:
1616
command: npm run test:cloud

cypress.env.example.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"AUTHORIZATION_TOKEN" : "authorizathion",
3+
"invalidAuthorization" : "authorization invalid",
4+
"CREDENTIALS" : "{\"username\": \"xxx\", \"password\": \"xxxxxx\"}"
5+
}

cypress/e2e/deleteBooking.cy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('Testes referente a funcionalidade de exclusão de reservas via API', (
3434
})
3535

3636
it('Verificar exclusão de reserva com sucesso usando autenticação com token', () => {
37+
console.log("Valor de CREDENTIALS:", Cypress.env('CREDENTIALS'));
3738
const credentials = JSON.parse(Cypress.env('CREDENTIALS'));
3839

3940
//finalizar teste , e descrever etapas , (uso do alias, etc)
@@ -79,9 +80,9 @@ describe('Testes referente a funcionalidade de exclusão de reservas via API', (
7980

8081
})
8182

82-
it('Verificar que api apresenta erro ao tentar deletar uma reserva com id inválido', () => {
83+
it.only('Verificar que api apresenta erro ao tentar deletar uma reserva com id inválido', () => {
8384
//Bug de melhoria, Api deveria retornar talvez um 404 - not found
84-
const Authorization = Cypress.env('Authorization');
85+
const Authorization = Cypress.env('AUTHORIZATION_TOKEN');
8586
const bookingId = 7832154;
8687

8788
cy.deleteBooking(bookingId, Authorization).then((response) => {

0 commit comments

Comments
 (0)