Skip to content

Commit 24308be

Browse files
fix(ci): run all browsers on Windows, enable Firefox CDP for Cypress 13.x
1 parent c1d32e2 commit 24308be

2 files changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/cross-browser.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
os: [windows-latest]
36-
browser: [chrome, edge]
37-
include:
38-
- os: ubuntu-latest
39-
browser: firefox
36+
browser: [chrome, edge, firefox]
4037

4138
steps:
4239
- name: Checkout code
@@ -49,16 +46,6 @@ jobs:
4946
with:
5047
node: ${{ env.NODE_VERSION }}
5148

52-
- name: Install Firefox (non-snap)
53-
if: matrix.browser == 'firefox'
54-
run: |
55-
sudo snap remove --purge firefox
56-
sudo add-apt-repository ppa:mozillateam/ppa -y
57-
printf 'Package: *\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001\n' \
58-
| sudo tee /etc/apt/preferences.d/mozilla-firefox
59-
sudo apt-get update -y
60-
sudo apt-get install -y firefox
61-
6249
- name: Run cross-browser tests
6350
uses: cypress-io/github-action@v6
6451
with:

cypress-bs.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@ module.exports = defineConfig({
1111
mochaFile: 'test-results/cypress/junit-[hash].xml',
1212
},
1313
e2e: {
14-
setupNodeEvents(on, config) {},
14+
setupNodeEvents(on, config) {
15+
on('before:browser:launch', (browser, launchOptions) => {
16+
if (browser.name === 'firefox') {
17+
// Enable CDP in Firefox (required for Cypress 13.x)
18+
launchOptions.preferences['remote.active-protocols'] = 3;
19+
}
20+
return launchOptions;
21+
});
22+
},
1523
baseUrl: 'http://127.0.0.1:3000',
1624
supportFile: false,
1725
},

0 commit comments

Comments
 (0)