Skip to content

Commit 6fae77a

Browse files
committed
add github secrets Authorization
1 parent ab5cd07 commit 6fae77a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ jobs:
1010
uses: cypress-io/github-action@v6
1111
env:
1212
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
13+
CYPRESS_AUTHORIZATION_TOKEN: ${{ secrets.AUTHORIZATION_TOKEN }}
1314
with:
1415
command: npm run test:cloud

cypress/e2e/deleteBooking.cy.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('Testes referente a funcionalidade de exclusão de reservas via API', (
1717
it('Verificar exclusão de reserva com sucesso usando autenticação com Authorization', () => {
1818
//criação da reserva
1919
//exclusão da reserva
20-
const Authorization = Cypress.env('Authorization');
20+
const Authorization = Cypress.env('AUTHORIZATION_TOKEN');
2121
cy.createBooking(reserva).then((response) => {
2222
const bookingId = response.body.bookingid;
2323

@@ -34,10 +34,13 @@ 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-
37+
const credentials = {
38+
"username": "admin",
39+
"password": "password123"
40+
}
3841
//finalizar teste , e descrever etapas , (uso do alias, etc)
3942

40-
cy.createToken(Cypress.env('credentials'));
43+
cy.createToken(credentials);
4144

4245
//Aqui estamos usando o alias definido no comando customizado de criação do token;
4346
//Foi a maneira mais rápida de reaproveitar o token

cypress/e2e/updateBooking.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('Testes referente a funcionalidade de alteração de reservas via API',
1414
"additionalneeds": faker.word.words()
1515
}
1616
it('Verificar alteração de reserva com sucesso usando autenticação com Authorization', () => {
17-
const Authorization = Cypress.env('Authorization');
17+
const Authorization = Cypress.env('AUTHORIZATION_TOKEN');
1818

1919
var reservaUpdate = {
2020
"firstname": 'Joelison',

0 commit comments

Comments
 (0)