Draft
Conversation
a76fa23 to
eedbe6c
Compare
added 8 commits
October 6, 2025 10:57
eedbe6c to
0340c0f
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Safari E2E test support to the CI pipeline by implementing a multi-browser test matrix and creating custom Playwright fixtures to handle Safari's limitations.
- Added Safari (webkit) browser support alongside Chrome for both desktop and mobile configurations
- Implemented custom Playwright fixtures with host routing to work around Safari's lack of support for
--host-resolver-rules - Enhanced CSP configuration to support development environments with localhost subdomains
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/canister-tests.yml |
Updated CI matrix to include Safari browser testing and conditional browser installation |
playwright.config.ts |
Added Safari desktop and mobile projects with browser-specific configurations |
src/frontend/tests/e2e-playwright/fixtures.ts |
New custom fixture implementing host routing for Safari compatibility |
src/frontend/tests/e2e-playwright/**/*.spec.ts |
Updated all test files to use custom fixtures instead of direct Playwright imports |
eslint.config.js |
Added ESLint rule to enforce using custom fixtures in E2E tests |
src/internet_identity/src/http.rs |
Enhanced CSP headers to support localhost subdomains in development |
HACKING.md |
Added documentation for writing new E2E tests with custom fixtures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -1,4 +1,5 @@ | |||
| import { expect, Page, test } from "@playwright/test"; | |||
| import { expect, test } from "../fixtures"; | |||
| import { Page } from "@playwright/test"; | |||
There was a problem hiding this comment.
[nitpick] The Page type import from @playwright/test could be consolidated with the other imports or moved to a types-only import to improve organization.
Suggested change
| import { Page } from "@playwright/test"; | |
| import type { Page } from "@playwright/test"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Improve the reliability of the test coverage by adding Safari as a supported browser.
Changes
.github/workflows/canister-tests.ymlto run tests on both Chrome and Safari, for both desktop and mobile, and adjusted artifact naming to include the browser. Playwright browser installation is now conditional based on the matrix browser. Test execution now uses browser-specific project names.playwright.config.tsto define separate projects forchrome-desktop,chrome-mobile,safari-desktop, andsafari-mobile, and enabledignoreHTTPSErrorsto support self-signed certificates during tests.fixtures.tsthat implements host resolution routing for Safari, ensuring all non-localhost requests are redirected correctly during tests. This fixture is now used in all test files.testandexpectfrom the newfixtures.tsinstead of@playwright/test, ensuring consistent use of the custom fixture across the suite.webkit) in bothauthorize/migration.spec.tsanddashboard/migration.spec.tsbecause virtual authenticators are not supported in that browser.Tests
Only test changes.