Skip to content

Commit add00f5

Browse files
committed
GH Actions: Cypress test on Windows Edge and Mac WebKit
1 parent 4ae0784 commit add00f5

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ jobs:
6767
matrix:
6868
browser: [firefox, chrome, electron]
6969
os: [ubuntu-latest]
70-
# TODO: re-enable once macos build is stable #590
71-
# include:
72-
# - os: macos-latest
73-
# browser: edge
70+
include:
71+
- os: macos-latest
72+
browser: webkit
73+
- os: windows-latest
74+
browser: edge
7475
env:
7576
COVERAGE: true
7677
steps:
@@ -83,6 +84,10 @@ jobs:
8384
node-version: 'lts/*'
8485
cache: yarn
8586

87+
- name: Install WebKit support
88+
if: matrix.browser == 'webkit'
89+
run: yarn add playwright-webkit --dev --mode=update-lockfile
90+
8691
- name: Test (E2E)
8792
uses: cypress-io/github-action@v6
8893
env:
@@ -95,10 +100,14 @@ jobs:
95100
browser: ${{ matrix.browser }}
96101

97102
- name: Test (component)
103+
# Component tests on webkit hang for some reason
104+
if: matrix.browser != 'webkit'
98105
uses: cypress-io/github-action@v6
99106
with:
100107
component: true
101108
browser: ${{ matrix.browser }}
109+
# already installed in E2E step
110+
install: false
102111

103112
- name: Upload screenshots
104113
uses: actions/upload-artifact@v4

cypress.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ module.exports = defineConfig({
6060
},
6161

6262
morgan: false, // Disable XHR logging as it's very noisy
63+
experimentalWebKitSupport: true,
6364
})

tests/e2e/specs/userprofile.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('User Profile', () => {
144144
.get('.node-data-cycle')
145145
.then(($els) => {
146146
expect(
147-
Array.from($els, (el) => el.innerText)
147+
Array.from($els, (el) => el.innerText.trim())
148148
).to.deep.equal(expected)
149149
})
150150
}

0 commit comments

Comments
 (0)