Skip to content

Commit

Permalink
Reenable legacy Firefox CDP support (iotaledger#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Aug 30, 2024
1 parent 2ebacb8 commit 13f9987
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ jobs:
load: true

- name: Run cypress
run: docker run --network host cypress-test test:browser:firefox
run: docker run --network host cypress-test test:browser:parallel:firefox

- name: Tear down iota sandbox
if: always()
Expand Down
10 changes: 8 additions & 2 deletions bindings/wasm/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ export default defineConfig({
},
e2e: {
supportFile: false,
// Fix to make subtle crypto work in cypress firefox
// https://github.com/cypress-io/cypress/issues/18217
setupNodeEvents(on, config) {
on("before:browser:launch", (browser, launchOptions) => {
if (browser.family === "firefox") {
// Fix to make subtle crypto work in cypress firefox
// https://github.com/cypress-io/cypress/issues/18217
launchOptions.preferences[
"network.proxy.testing_localhost_is_secure_when_hijacked"
] = true;
// Temporary fix to allow cypress to control Firefox via CDP
// https://github.com/cypress-io/cypress/issues/29713
// https://fxdx.dev/deprecating-cdp-support-in-firefox-embracing-the-future-with-webdriver-bidi/
launchOptions.preferences[
"remote.active-protocols"
] = 3;
}
return launchOptions;
});
Expand Down

0 comments on commit 13f9987

Please sign in to comment.