Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates and refactors our end-to-end testing setup and workflows. The key changes include:
CI Workflow Updates:
.github/playwright.yml
file has been deleted..github/workflows/playwright.yml
has been introduced. This updated workflow sets up the Playwright environment, installs the necessary dependencies (including browser dependencies), builds the client, and runs our Playwright tests with improved environment variable configuration and caching.e2e Test Improvements:
a11y.spec.ts
,keys.spec.ts
,landing.spec.ts
,messages.spec.ts
,nav.spec.ts
,popup.spec.ts
, andsettings.spec.ts
) have been updated. Changes include:acceptTermsIfPresent
, has been added (ine2e/utils/acceptTermsIfPresent.ts
) to consistently handle the Terms & Conditions modal across all tests.These updates not only improve the stability and reliability of our tests on both local and CI environments but also ensure that our workflow configuration is up to date with best practices.
Change Type
Improved test reliability by updating selectors and wait conditions to address issues with failing or flaky tests.
Introduces an updated CI workflow for running Playwright tests and adds a new utility function to handle Terms & Conditions modals.
Testing
To verify these changes locally and in CI:
npm ci
to install dependencies.npm run frontend
.npm run e2e:ci
.main
,release/*
).Make sure that the following secrets are set in your CI environment:
MONGO_URI
OPENAI_API_KEY
E2E_USER_EMAIL
E2E_USER_PASSWORD
JWT_SECRET
JWT_REFRESH_SECRET
CREDS_KEY
CREDS_IV
DOMAIN_CLIENT
DOMAIN_SERVER
These variables are used to configure the test environment and ensure that all test steps (including API interactions) run correctly.
Checklist