From 71905c1942f640b5c748e2443979a6682cef7ff2 Mon Sep 17 00:00:00 2001 From: rwood-moz Date: Tue, 24 Mar 2026 16:48:33 -0400 Subject: [PATCH] Re-enable E2E tests after stage deployments --- .github/workflows/deploy-staging.yml | 7 +++---- test/e2e/const/constants.ts | 1 + test/e2e/package.json | 3 +++ test/e2e/tests/desktop/book-appointment.spec.ts | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index bfc55ea25..cea241b17 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -230,8 +230,7 @@ jobs: e2e-tests-browserstack-stage: name: e2e-tests-browserstack-stage needs: create-release - if: false - # if: ${{ !failure() || !cancelled() }} + if: ${{ success() && !cancelled() }} # only proceed if last steps passed and job hasn't been cancelled runs-on: ubuntu-latest environment: staging env: @@ -262,8 +261,8 @@ jobs: project-name: 'Thunderbird Appointment' build-name: 'E2E Tests: BUILD_INFO' - - name: Stage E2E Tests on Desktop Firefox + - name: Stage Sanity E2E Tests on Desktop Firefox run: | cd ./test/e2e cp .env.stage.example .env - npm run e2e-test-browserstack-firefox + npm run stage-sanity-test-browserstack-firefox diff --git a/test/e2e/const/constants.ts b/test/e2e/const/constants.ts index 9e7424666..bfe958d8d 100644 --- a/test/e2e/const/constants.ts +++ b/test/e2e/const/constants.ts @@ -29,6 +29,7 @@ export const APPT_BOOKEE_EMAIL = String(process.env.APPT_BOOKEE_EMAIL); // playwright test tags export const PLAYWRIGHT_TAG_PROD_SANITY = '@prod-sanity'; +export const PLAYWRIGHT_TAG_STAGE_SANITY = '@stage-sanity'; export const PLAYWRIGHT_TAG_E2E_SUITE = '@e2e-suite'; export const PLAYWRIGHT_TAG_PROD_NIGHTLY = '@prod-nightly'; export const PLAYWRIGHT_TAG_E2E_SUITE_MOBILE = '@e2e-mobile-suite'; diff --git a/test/e2e/package.json b/test/e2e/package.json index b36fba610..5542bcfa7 100644 --- a/test/e2e/package.json +++ b/test/e2e/package.json @@ -8,6 +8,9 @@ "e2e-test-browserstack-firefox": "npx browserstack-node-sdk playwright test --grep e2e-suite --project=Firefox-OSX --max-failures=2 --browserstack.buildName 'Appointment E2E Tests Firefox Desktop' --browserstack.config 'browserstack-desktop.yml'", "e2e-tests-mobile-browserstack-android-chrome": "npx browserstack-node-sdk playwright test --grep e2e-mobile-suite --project=android-chrome --max-failures=2 --browserstack.buildName 'Appointment E2E Tests Android Chrome' --browserstack.config 'browserstack-mobile.yml'", "e2e-tests-mobile-browserstack-ios-safari": "npx browserstack-node-sdk playwright test --grep e2e-mobile-suite --project=ios-safari --max-failures=2 --browserstack.buildName 'Appointment E2E Tests iOS Safari' --browserstack.config 'browserstack-mobile.yml'", + "stage-sanity-test": "npx playwright test --grep stage-sanity --project=firefox", + "stage-sanity-test-headed": "npx playwright test --grep stage-sanity --project=firefox --headed", + "stage-sanity-test-browserstack-firefox": "npx browserstack-node-sdk playwright test --grep stage-sanity --project=Firefox-OSX --max-failures=2 --browserstack.buildName 'Appointment Stage Sanity Test Firefox Desktop' --browserstack.config 'browserstack-desktop.yml'", "prod-sanity-test": "npx playwright test --grep prod-sanity --project=firefox", "prod-sanity-test-headed": "npx playwright test --grep prod-sanity --project=firefox --headed", "prod-sanity-test-browserstack-firefox": "npx browserstack-node-sdk playwright test --grep prod-sanity --project=Firefox-OSX --max-failures=2 --browserstack.buildName 'Appointment Production Sanity Test Firefox Desktop' --browserstack.config 'browserstack-desktop.yml'", diff --git a/test/e2e/tests/desktop/book-appointment.spec.ts b/test/e2e/tests/desktop/book-appointment.spec.ts index 308ca44e7..fb0f8fffe 100644 --- a/test/e2e/tests/desktop/book-appointment.spec.ts +++ b/test/e2e/tests/desktop/book-appointment.spec.ts @@ -6,6 +6,7 @@ import { navigateToAppointmentAndSignIn, setDefaultUserSettingsLocalStore } from import { APPT_DISPLAY_NAME, PLAYWRIGHT_TAG_PROD_SANITY, + PLAYWRIGHT_TAG_STAGE_SANITY, PLAYWRIGHT_TAG_PROD_NIGHTLY, PLAYWRIGHT_TAG_E2E_SUITE, TIMEOUT_30_SECONDS, @@ -38,7 +39,7 @@ test.beforeEach(async ({ page }) => { test.describe('book an appointment on desktop browser', () => { test('able to request a booking on desktop browser', { - tag: [PLAYWRIGHT_TAG_PROD_SANITY, PLAYWRIGHT_TAG_E2E_SUITE, PLAYWRIGHT_TAG_PROD_NIGHTLY], + tag: [PLAYWRIGHT_TAG_PROD_SANITY, PLAYWRIGHT_TAG_E2E_SUITE, PLAYWRIGHT_TAG_PROD_NIGHTLY, PLAYWRIGHT_TAG_STAGE_SANITY], }, async ({ page }) => { // in order to ensure we find an available slot we can click on, first switch to week view URL await bookingPage.gotoBookingPageWeekView();