Files
zeekayandHanzo Dev eaf931267f fix(dist): six consumers were still reading the output root the build abandoned
src/build.js writes to the extension repo root's dist/<engine>/. Everything that
reads a build was still pointing under packages/browser, and not one of them said
so:

  e2e/playwright.config.ts   loaded a stale extension into every Playwright run
  e2e/fixtures.ts            same
  e2e/cross-platform.config.ts  same
  .hanzo/workflows/publish.yml  web-ext packaged the Chrome and Firefox stores,
                             and signed AMO, from a directory a clean checkout
                             does not have — the store lane could not have worked
  tests/webextension-polyfill.test.ts  `if (!existsSync) return` — "build pipeline
                             ships the polyfill" has been asserting nothing
  install-extension.sh / launch-brave-hanzo.sh  printed a path that isn't there

All repointed. The two polyfill tests build on demand instead of returning early:
an assertion about the bundle has to have a bundle.

tests/output-root.test.ts is the guard — it fails on any tracked file naming the
abandoned root, and would have caught all six at once. It assembles the needle
from parts rather than spelling it, so it is not its own violation.

publish.sh is deleted rather than repointed. It was a second full publish lane to
the same two stores, and it took Chrome and AMO credentials from plaintext
environment variables while .hanzo/workflows/publish.yml — which its own header
calls the system of record — pulls every one of them from KMS. One way to publish.

265/265 green.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 21:09:49 -07:00

39 lines
960 B
TypeScript

import { defineConfig } from '@playwright/test';
import path from 'path';
const extensionPath = path.resolve(__dirname, '../../../dist/chrome');
export default defineConfig({
testDir: '.',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
reporter: process.env.CI ? [['html', { open: 'never' }], ['github']] : 'html',
timeout: 60_000,
expect: {
timeout: 10_000,
},
use: {
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'on-first-retry',
},
projects: [
{
name: 'chromium-extension',
use: {
// Chrome extension requires persistent context with extension loaded
launchOptions: {
args: [
`--disable-extensions-except=${extensionPath}`,
`--load-extension=${extensionPath}`,
'--no-first-run',
'--disable-default-apps',
],
},
},
},
],
});