Skip to content

ci(extension): load the Firefox package in headless Firefox - #1939

Merged
rubenvdlinde merged 15 commits into
developmentfrom
cloud/b-keepiq-firefox-load-check
Nov 21, 2026
Merged

rubenvdlinde merged 15 commits into
developmentfrom
cloud/b-keepiq-firefox-load-check

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

Task 2.1 of clients-extension-firefox-and-safari-builds asks for a workflow job that loads Chromium and Firefox headless and checks that the background starts. Chromium is already covered: the e2e job loads the extension in headless Chromium. Firefox had only web-ext lint.

This PR adds browser-extension/scripts/firefox-smoke.ts and a step in check-and-build. The step starts the runner image's geckodriver. The script installs .output/firefox-mv2 as a temporary add-on, with its moz-extension:// host fixed through the extensions.webextensions.uuids pref. It then opens popup.html and requires the background to answer a read-only settings.get. This is the spec scenario "Firefox starts the background": the background script runs and the popup can reach it.

It follows the same pattern as the Safari smoke test (WebDriver classic over fetch, no new dependencies).

Verification

  • scripts/firefox-smoke.test.ts: 17 vitest cases (capabilities, the page script's success and failure replies, retries while the background starts, the wrong add-on id, the install refused, a hung request, geckodriver down).
  • Extension npm test (8812 passed), npm run typecheck and npm run lint are clean.
  • Firefox can't be downloaded in the build sandbox, so the new step's first real run is the CI run on this PR.

Generated by Claude Code

The check-and-build job now installs .output/firefox-mv2 as a temporary
add-on over geckodriver, opens its popup page and requires the
background to answer settings.get (clients-browser-builds § Firefox
starts the background). Playwright cannot load an extension into
Firefox, so the script speaks WebDriver classic, like the Safari smoke
test.

Assisted-by: ClaudeCode:claude-opus-5-5
The Safari and Firefox smoke tests now take step, status polling,
commands and the session from scripts/webdriver.ts instead of each
keeping a copy.

Assisted-by: ClaudeCode:claude-opus-5-5
Node runs the smoke scripts with its own type stripping, which resolves
no extensionless relative import.

Assisted-by: ClaudeCode:claude-opus-5-5
… check

WebDriver may not navigate to a moz-extension page, so the check now
reads the background's state from the chrome context (system access),
requires it running, opens the popup in a tab of its own as the system
and asks the background from there.

Assisted-by: ClaudeCode:claude-opus-5-5
geckodriver refuses --remote-allow-system-access as a capability; it
takes --allow-system-access on its own command line.

Assisted-by: ClaudeCode:claude-opus-5-5
…rapper

WebDriver's script sandbox sees an extension page through Xray
wrappers, which hide the page's own browser object; the check now reads
it through window.wrappedJSObject.

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ 1b4d528

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ❌
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-path-case ✅
test-l10n ✅
format ❌
check-l10n-js ✅
check-schema-l10n ✅
composer ✅ ✅ 114/114
npm ✅ ✅ 653/653
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌
Newman ❌
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-11-21 19:16 UTC

Download the full PDF report from the workflow artifacts.

…inds no browser API

cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
…s, in a trusted tab

The guessed moz-extension host left the Firefox check's tab on about:blank.

cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
…nsions in process

WebDriver's content context stayed on about:blank after the popup tab moved into the extension process.

cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
…its own

cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
…eter

cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
cloud-merge-keepiq

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit 7d81ef0 into development Nov 21, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ 9bb0d57

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ❌
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-path-case ✅
test-l10n ✅
format ❌
check-l10n-js ✅
check-schema-l10n ✅
composer ✅ ✅ 114/114
npm ✅ ✅ 653/653
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌
Newman ❌
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-11-22 00:31 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant