Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
test: support display name in e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jun 2, 2021
1 parent 0905b6a commit 0edf587
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/e2e.yml
Expand Up @@ -54,7 +54,14 @@ jobs:
REEARTH_WEB_E2E_TEAM_ID: ${{ secrets.REEARTH_WEB_E2E_TEAM_ID }}
REEARTH_WEB_E2E_USERNAME: ${{ secrets.REEARTH_WEB_E2E_USERNAME }}
REEARTH_WEB_E2E_PASSWORD: ${{ secrets.REEARTH_WEB_E2E_PASSWORD }}
REEARTH_WEB_E2E_USER_NAME: ${{ secrets.REEARTH_WEB_E2E_USER_NAME }}
REEARTH_WEB_E2E_SIGNUP_SECRET: ${{ secrets.REEARTH_WEB_E2E_SIGNUP_SECRET }}
- uses: actions/upload-artifact@v2
with:
name: e2etest-result
path: |
cypress/screenshots
cypress/videos
slack-notification:
if: ${{ success() || failure() }}
name: Slack Notification
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/Dashboard/dashboard.spec.ts
@@ -1,4 +1,4 @@
import { userName, teamId } from "../common";
import { userDisplayName, teamId } from "../common";

beforeEach(() => {
cy.init();
Expand All @@ -7,6 +7,6 @@ beforeEach(() => {
context("Dashboard", () => {
it("should display page", () => {
cy.loginAndVisit(`/dashboard/${teamId}`);
cy.findByText(`${userName}'s workspace`).should("exist");
cy.findByText(`${userDisplayName}'s workspace`).should("exist");
});
});
2 changes: 2 additions & 0 deletions cypress/support/config.ts
Expand Up @@ -3,6 +3,8 @@
export const api: string = Cypress.env("REEARTH_WEB_API");
export const userId: string = Cypress.env("REEARTH_WEB_E2E_USER_ID");
export const userName: string = Cypress.env("REEARTH_WEB_E2E_USERNAME");
export const userDisplayName: string =
Cypress.env("REEARTH_WEB_E2E_USER_NAME") || Cypress.env("REEARTH_WEB_E2E_USERNAME");
export const password: string = Cypress.env("REEARTH_WEB_E2E_PASSWORD");
export const teamId: string = Cypress.env("REEARTH_WEB_E2E_TEAM_ID");
export const authAudience: string = Cypress.env("REEARTH_WEB_AUTH0_AUDIENCE");
Expand Down

0 comments on commit 0edf587

Please sign in to comment.