From eeddfba45ecb22137663a7efabfb5e2f55fc105e Mon Sep 17 00:00:00 2001 From: Moneeza Syed <14besemsyed@seecs.edu.pk> Date: Thu, 23 Nov 2023 12:14:07 +0100 Subject: [PATCH] replaced secrets in cypress --- .github/workflows/tests.yml | 2 +- cypress/e2e/adrManagerTest/AddNewAdr.cy.js | 2 +- cypress/e2e/adrManagerTest/AddRepo.cy.js | 2 +- cypress/e2e/adrManagerTest/DeleteAdr.cy.js | 2 +- cypress/e2e/adrManagerTest/DeleteRepo.cy.js | 2 +- cypress/e2e/adrManagerTest/Modes.cy.js | 2 +- cypress/e2e/adrManagerTest/Parser.cy.js | 2 +- cypress/e2e/adrManagerTest/PushNewAdr.cy.js | 2 +- cypress/e2e/adrManagerTest/Routing.cy.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 78961f4..9beaeda 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: - name: Run Cypress tests env: CYPRESS_OAUTH_E2E_AUTH_ID: ${{ secrets.OAUTH_E2E_AUTH_ID }} - user: ${{ secrets.user }} + user: ${{ secrets.USER }} run: | npm start & npm run e2e:test-ci diff --git a/cypress/e2e/adrManagerTest/AddNewAdr.cy.js b/cypress/e2e/adrManagerTest/AddNewAdr.cy.js index 6adf38a..b61ded9 100644 --- a/cypress/e2e/adrManagerTest/AddNewAdr.cy.js +++ b/cypress/e2e/adrManagerTest/AddNewAdr.cy.js @@ -4,7 +4,7 @@ context("Adding a new ADR to a repo", () => { it("Create a new ADR", () => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); // add the ADR-Manager repo diff --git a/cypress/e2e/adrManagerTest/AddRepo.cy.js b/cypress/e2e/adrManagerTest/AddRepo.cy.js index 3852b0f..fb0eac6 100644 --- a/cypress/e2e/adrManagerTest/AddRepo.cy.js +++ b/cypress/e2e/adrManagerTest/AddRepo.cy.js @@ -4,7 +4,7 @@ context("Listing and adding repositories", () => { beforeEach(() => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); cy.intercept('POST', 'https://api.github.com/graphql').as("getRepos"); diff --git a/cypress/e2e/adrManagerTest/DeleteAdr.cy.js b/cypress/e2e/adrManagerTest/DeleteAdr.cy.js index 505b32b..17eb3b0 100644 --- a/cypress/e2e/adrManagerTest/DeleteAdr.cy.js +++ b/cypress/e2e/adrManagerTest/DeleteAdr.cy.js @@ -4,7 +4,7 @@ context("Deleting an ADR from a repo", () => { it("Remove one ADR", () => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); diff --git a/cypress/e2e/adrManagerTest/DeleteRepo.cy.js b/cypress/e2e/adrManagerTest/DeleteRepo.cy.js index 0dbc04b..ab22b3d 100644 --- a/cypress/e2e/adrManagerTest/DeleteRepo.cy.js +++ b/cypress/e2e/adrManagerTest/DeleteRepo.cy.js @@ -4,7 +4,7 @@ context("Deleting repositories", () => { it("Remove a repo", () => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); diff --git a/cypress/e2e/adrManagerTest/Modes.cy.js b/cypress/e2e/adrManagerTest/Modes.cy.js index 1f8e195..dd8c089 100644 --- a/cypress/e2e/adrManagerTest/Modes.cy.js +++ b/cypress/e2e/adrManagerTest/Modes.cy.js @@ -4,7 +4,7 @@ context("Using editor modes", () => { it("Switch to professional mode and create a new ADR", () => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); diff --git a/cypress/e2e/adrManagerTest/Parser.cy.js b/cypress/e2e/adrManagerTest/Parser.cy.js index 0111ca0..ef8abfe 100644 --- a/cypress/e2e/adrManagerTest/Parser.cy.js +++ b/cypress/e2e/adrManagerTest/Parser.cy.js @@ -4,7 +4,7 @@ context("Using Markdown modes", () => { it("Convert raw Markdown", () => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); diff --git a/cypress/e2e/adrManagerTest/PushNewAdr.cy.js b/cypress/e2e/adrManagerTest/PushNewAdr.cy.js index fd7b640..c592f32 100644 --- a/cypress/e2e/adrManagerTest/PushNewAdr.cy.js +++ b/cypress/e2e/adrManagerTest/PushNewAdr.cy.js @@ -34,7 +34,7 @@ context("Committing, pushing, and remote-deleting an ADR", () => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); addRepositoryAndSwitchBranch(); diff --git a/cypress/e2e/adrManagerTest/Routing.cy.js b/cypress/e2e/adrManagerTest/Routing.cy.js index 71d4c6a..63821c6 100644 --- a/cypress/e2e/adrManagerTest/Routing.cy.js +++ b/cypress/e2e/adrManagerTest/Routing.cy.js @@ -4,7 +4,7 @@ context("Routing and correct URLs", () => { beforeEach(() => { window.localStorage.clear(); window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); - window.localStorage.setItem("user", Cypress.env("user")) + window.localStorage.setItem("user", Cypress.env("USER")) cy.visit(TEST_BASE_URL); });