diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84e1d2e..4b321d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,3 +8,6 @@ jobs: uses: actions/checkout@v4 - name: Cypress run uses: cypress-io/github-action@v6 + env: + CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }} + CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }} diff --git a/cypress.env.example.json b/cypress.env.example.json index 9a15dbd..fe7a546 100644 --- a/cypress.env.example.json +++ b/cypress.env.example.json @@ -1,4 +1,4 @@ { - "userEmail": "user@example.com", - "userPassword": "5ecR37-P@sSw0Rd" + "USER_EMAIL": "user@example.com", + "USER_PASSWORD": "5ecR37-P@sSw0Rd" } diff --git a/cypress/e2e/loginForm.cy.js b/cypress/e2e/loginForm.cy.js index b58aad2..7eb6d4c 100644 --- a/cypress/e2e/loginForm.cy.js +++ b/cypress/e2e/loginForm.cy.js @@ -3,8 +3,8 @@ beforeEach(() => { }) it('successfully logs in', () => { - const email = Cypress.env('userEmail') - const password = Cypress.env('userPassword') + const email = Cypress.env('USER_EMAIL') + const password = Cypress.env('USER_PASSWORD') cy.dataTest('email-field').type(email) cy.dataTest('password-field').type(password, { log: false })