From 13f9987ce01aec667f1292f4622f9f315515bb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eike=20Ha=C3=9F?= Date: Fri, 30 Aug 2024 09:43:13 +0200 Subject: [PATCH] Reenable legacy Firefox CDP support (#1403) --- .github/workflows/build-and-test.yml | 2 +- bindings/wasm/cypress.config.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 553774bb46..e24c9a171d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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() diff --git a/bindings/wasm/cypress.config.ts b/bindings/wasm/cypress.config.ts index f7cb0a6a1a..c59929872a 100644 --- a/bindings/wasm/cypress.config.ts +++ b/bindings/wasm/cypress.config.ts @@ -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; });