From add00f596ab60b7fcd9060289bdd4ff85f5d3ce0 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:58:18 +0100 Subject: [PATCH] GH Actions: Cypress test on Windows Edge and Mac WebKit --- .github/workflows/main.yml | 17 +++++++++++++---- cypress.config.cjs | 1 + tests/e2e/specs/userprofile.cy.js | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2591d80be..dbbb874a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,10 +67,11 @@ jobs: matrix: browser: [firefox, chrome, electron] os: [ubuntu-latest] -# TODO: re-enable once macos build is stable #590 -# include: -# - os: macos-latest -# browser: edge + include: + - os: macos-latest + browser: webkit + - os: windows-latest + browser: edge env: COVERAGE: true steps: @@ -83,6 +84,10 @@ jobs: node-version: 'lts/*' cache: yarn + - name: Install WebKit support + if: matrix.browser == 'webkit' + run: yarn add playwright-webkit --dev --mode=update-lockfile + - name: Test (E2E) uses: cypress-io/github-action@v6 env: @@ -95,10 +100,14 @@ jobs: browser: ${{ matrix.browser }} - name: Test (component) + # Component tests on webkit hang for some reason + if: matrix.browser != 'webkit' uses: cypress-io/github-action@v6 with: component: true browser: ${{ matrix.browser }} + # already installed in E2E step + install: false - name: Upload screenshots uses: actions/upload-artifact@v4 diff --git a/cypress.config.cjs b/cypress.config.cjs index 26285f80a..7df0418a7 100644 --- a/cypress.config.cjs +++ b/cypress.config.cjs @@ -60,4 +60,5 @@ module.exports = defineConfig({ }, morgan: false, // Disable XHR logging as it's very noisy + experimentalWebKitSupport: true, }) diff --git a/tests/e2e/specs/userprofile.cy.js b/tests/e2e/specs/userprofile.cy.js index 8f34aef24..77f35b6f7 100644 --- a/tests/e2e/specs/userprofile.cy.js +++ b/tests/e2e/specs/userprofile.cy.js @@ -144,7 +144,7 @@ describe('User Profile', () => { .get('.node-data-cycle') .then(($els) => { expect( - Array.from($els, (el) => el.innerText) + Array.from($els, (el) => el.innerText.trim()) ).to.deep.equal(expected) }) }