Skip to content

Commit 1ff68ec

Browse files
committed
test(server): fix extension e2e test error from serviceworker timeout
1 parent eaeaaba commit 1ff68ec

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/extension/features/steps/fixtures.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const test = base.extend<Fixtures>({
1212
context: async ({ }, use) => {
1313
const context = await chromium.launchPersistentContext("", {
1414
headless: true,
15+
channel: "chromium",
1516
args: [
1617
`--disable-extensions-except=${pathToExtension}`,
1718
`--load-extension=${pathToExtension}`,
@@ -23,8 +24,9 @@ export const test = base.extend<Fixtures>({
2324
extensionId: async ({ context }, use) => {
2425
let background: { url(): string };
2526
if (pathToExtension.endsWith("-mv3")) {
27+
const swPromise = context.waitForEvent("serviceworker", { timeout: 30000 });
2628
[background] = context.serviceWorkers();
27-
if (!background) background = await context.waitForEvent("serviceworker");
29+
if (!background) background = await swPromise;
2830
} else {
2931
[background] = context.backgroundPages();
3032
if (!background)

0 commit comments

Comments
 (0)