diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 33b2da0acb..cdbcca9661 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -49,6 +49,8 @@ jobs: strategy: matrix: os: [ubuntu-24.04, macos-14] + env: + MATRIX_OS: ${{ matrix.os }} if: ${{ needs.check-e2e-changes.outputs.e2e-or-config-changed == 'true' }} needs: oisy-backend-wasm steps: diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index 0a2c499d59..49e427a96e 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -39,6 +39,8 @@ jobs: strategy: matrix: os: [ubuntu-24.04, macos-14] + env: + MATRIX_OS: ${{ matrix.os }} if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-e2e-snapshots') }} steps: diff --git a/.gitignore b/.gitignore index c081f4d3ed..00a7bcad34 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,4 @@ backend-v*.wasm.gz /playwright/.cache/ pocket-ic -e2e/*-snapshots/*-darwin.png - coverage/ diff --git a/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Firefox-linux.png b/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Firefox-linux.png new file mode 100644 index 0000000000..d96d3fcbc5 Binary files /dev/null and b/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Firefox-linux.png differ diff --git a/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Google-Chrome-linux.png b/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Google-Chrome-linux.png index 51cfc0946d..040e92cdfc 100644 Binary files a/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Google-Chrome-linux.png and b/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Google-Chrome-linux.png differ diff --git a/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Safari-darwin.png b/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Safari-darwin.png new file mode 100644 index 0000000000..653cb38961 Binary files /dev/null and b/e2e/about-why-oisy-modal.spec.ts-snapshots/should-display-about-why-oisy-modal-1-Safari-darwin.png differ diff --git a/e2e/activity-page.spec.ts-snapshots/should-display-activity-page-1-Firefox-linux.png b/e2e/activity-page.spec.ts-snapshots/should-display-activity-page-1-Firefox-linux.png new file mode 100644 index 0000000000..bb5f3e7a0e Binary files /dev/null and b/e2e/activity-page.spec.ts-snapshots/should-display-activity-page-1-Firefox-linux.png differ diff --git a/e2e/activity-page.spec.ts-snapshots/should-display-activity-page-1-Safari-darwin.png b/e2e/activity-page.spec.ts-snapshots/should-display-activity-page-1-Safari-darwin.png new file mode 100644 index 0000000000..c25daf01c8 Binary files /dev/null and b/e2e/activity-page.spec.ts-snapshots/should-display-activity-page-1-Safari-darwin.png differ diff --git a/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Firefox-linux.png b/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Firefox-linux.png new file mode 100644 index 0000000000..2ba8dd3174 Binary files /dev/null and b/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Firefox-linux.png differ diff --git a/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Google-Chrome-linux.png b/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Google-Chrome-linux.png index 0c11338732..07c59e9a18 100644 Binary files a/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Google-Chrome-linux.png and b/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Google-Chrome-linux.png differ diff --git a/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Safari-darwin.png b/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Safari-darwin.png new file mode 100644 index 0000000000..d87f1d7390 Binary files /dev/null and b/e2e/explorer-page.spec.ts-snapshots/should-display-explorer-page-1-Safari-darwin.png differ diff --git a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Firefox-linux.png b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Firefox-linux.png new file mode 100644 index 0000000000..7803b5bfee Binary files /dev/null and b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Firefox-linux.png differ diff --git a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png index fadad8520c..ac6ffcbd34 100644 Binary files a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png and b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Google-Chrome-linux.png differ diff --git a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Safari-darwin.png b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Safari-darwin.png new file mode 100644 index 0000000000..6f236371bb Binary files /dev/null and b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-in-state-1-Safari-darwin.png differ diff --git a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-out-state-1-Firefox-linux.png b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-out-state-1-Firefox-linux.png new file mode 100644 index 0000000000..b30553eb60 Binary files /dev/null and b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-out-state-1-Firefox-linux.png differ diff --git a/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-out-state-1-Safari-darwin.png b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-out-state-1-Safari-darwin.png new file mode 100644 index 0000000000..067eea5f79 Binary files /dev/null and b/e2e/homepage.spec.ts-snapshots/should-display-homepage-in-logged-out-state-1-Safari-darwin.png differ diff --git a/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Firefox-linux.png b/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Firefox-linux.png new file mode 100644 index 0000000000..06dd3b0307 Binary files /dev/null and b/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Firefox-linux.png differ diff --git a/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Google-Chrome-linux.png b/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Google-Chrome-linux.png index c52d24dd05..f7bb5179dc 100644 Binary files a/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Google-Chrome-linux.png and b/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Google-Chrome-linux.png differ diff --git a/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Safari-darwin.png b/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Safari-darwin.png new file mode 100644 index 0000000000..d49d66b8e9 Binary files /dev/null and b/e2e/receive-tokens-modal.spec.ts-snapshots/should-display-receive-tokens-modal-1-Safari-darwin.png differ diff --git a/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Firefox-linux.png b/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Firefox-linux.png new file mode 100644 index 0000000000..08b8f80068 Binary files /dev/null and b/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Firefox-linux.png differ diff --git a/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Google-Chrome-linux.png b/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Google-Chrome-linux.png index ae4eb9eb07..c69b44f530 100644 Binary files a/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Google-Chrome-linux.png and b/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Google-Chrome-linux.png differ diff --git a/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Safari-darwin.png b/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Safari-darwin.png new file mode 100644 index 0000000000..42c77dfa5a Binary files /dev/null and b/e2e/settings-page.spec.ts-snapshots/should-display-settings-page-1-Safari-darwin.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-BTC-transactions-page-1-Firefox-linux.png b/e2e/transactions-page.spec.ts-snapshots/should-display-BTC-transactions-page-1-Firefox-linux.png new file mode 100644 index 0000000000..d1bb3904da Binary files /dev/null and b/e2e/transactions-page.spec.ts-snapshots/should-display-BTC-transactions-page-1-Firefox-linux.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-BTC-transactions-page-1-Safari-darwin.png b/e2e/transactions-page.spec.ts-snapshots/should-display-BTC-transactions-page-1-Safari-darwin.png new file mode 100644 index 0000000000..892a511339 Binary files /dev/null and b/e2e/transactions-page.spec.ts-snapshots/should-display-BTC-transactions-page-1-Safari-darwin.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Firefox-linux.png b/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Firefox-linux.png new file mode 100644 index 0000000000..e1f4ca8eea Binary files /dev/null and b/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Firefox-linux.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Google-Chrome-linux.png b/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Google-Chrome-linux.png index f93a720002..36ab7713f3 100644 Binary files a/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Google-Chrome-linux.png and b/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Google-Chrome-linux.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Safari-darwin.png b/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Safari-darwin.png new file mode 100644 index 0000000000..6cac8f9b29 Binary files /dev/null and b/e2e/transactions-page.spec.ts-snapshots/should-display-ETH-transactions-page-1-Safari-darwin.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Firefox-linux.png b/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Firefox-linux.png new file mode 100644 index 0000000000..9bec52ba15 Binary files /dev/null and b/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Firefox-linux.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Google-Chrome-linux.png b/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Google-Chrome-linux.png index c736881c5a..a70cd0a9ae 100644 Binary files a/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Google-Chrome-linux.png and b/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Google-Chrome-linux.png differ diff --git a/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Safari-darwin.png b/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Safari-darwin.png new file mode 100644 index 0000000000..1f6bfd5e37 Binary files /dev/null and b/e2e/transactions-page.spec.ts-snapshots/should-display-ICP-transactions-page-1-Safari-darwin.png differ diff --git a/playwright.config.ts b/playwright.config.ts index e0eccec497..eaf88b2313 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -17,6 +17,27 @@ dotenv.populate( const DEV = (process.env.NODE_ENV ?? 'production') === 'development'; +const MATRIX_OS = process.env.MATRIX_OS ?? ''; +const isMac = MATRIX_OS.includes('macos') ?? process.platform === 'darwin'; + +const appleProjects = [ + { + name: 'Safari', + use: devices['Desktop Safari'] + } +]; + +const nonAppleProjects = [ + { + name: 'Google Chrome', + use: { ...devices['Desktop Chrome'], channel: 'chrome' } + }, + { + name: 'Firefox', + use: devices['Desktop Firefox'] + } +]; + const TIMEOUT = 5 * 60 * 1000; export default defineConfig({ @@ -37,10 +58,5 @@ export default defineConfig({ navigationTimeout: TIMEOUT, ...(DEV && { headless: false }) }, - projects: [ - { - name: 'Google Chrome', - use: { ...devices['Desktop Chrome'], channel: 'chrome' } - } - ] + projects: isMac ? appleProjects : nonAppleProjects });