From b2d29d1e4713fcc248206ef65a23aba4ee7eefce Mon Sep 17 00:00:00 2001 From: David McKay Date: Thu, 3 Dec 2026 15:10:16 -0800 Subject: [PATCH] Every WebKit browser test survives a renderer crash WebKit on Linux crashes its own renderer under CI's load, and the test that had a page open fails with "Target page, context or browser has been closed" for nothing it checks. It failed the 1.2.10 publish three times and WebKit shards on pull requests. Every test file that runs in WebKit now takes `test` from renderer-crash.ts, which runs a test again only when Playwright reported a renderer crash in it, and a CI rule fails a WebKit file left on bun's own `test`. renderer-crash.ts's `test.each` now gets the retry too, and `test.skip` and the rest of bun's `test` are called on bun's own: called on the Proxy, bun refused them and the file failed to load. --- app/tests/access-requests-layout.test.tsx | 3 +- app/tests/admin-path-layout.test.tsx | 3 +- app/tests/admin-people-remove-layout.test.tsx | 3 +- app/tests/admin-providers-connection.test.tsx | 3 +- .../admin-request-notify-layout.test.tsx | 3 +- app/tests/ai-connection-dialog.test.tsx | 3 +- app/tests/another-account-layout.test.tsx | 3 +- app/tests/app-frame-skeleton-still.test.tsx | 3 +- app/tests/approval-answered-layout.test.tsx | 3 +- .../approval-left-carry-on-browser.test.tsx | 3 +- app/tests/approval-rules-layout.test.tsx | 3 +- app/tests/artifact-collab-browser.test.tsx | 3 +- app/tests/artifact-events-socket.test.ts | 3 +- .../artifact-sharing-screens-layout.test.tsx | 3 +- .../artifact-sign-in-refusal-browser.test.tsx | 3 +- .../artifact-tool-cards-browser.test.tsx | 3 +- app/tests/artifacts-kit.test.ts | 3 +- app/tests/artifacts-screens.test.tsx | 3 +- .../audit-approval-trace-layout.test.tsx | 3 +- app/tests/audit-bot-work-layout.test.tsx | 3 +- .../audit-change-outcome-layout.test.tsx | 3 +- .../audit-computer-limit-layout.test.tsx | 3 +- app/tests/board-row-layout.test.tsx | 3 +- app/tests/bot-file-links-browser.test.tsx | 3 +- app/tests/bot-owner-lists-layout.test.tsx | 3 +- app/tests/browse-steps-layout.test.tsx | 3 +- app/tests/bug-reports-layout.test.tsx | 3 +- .../carry-on-carried-turn-browser.test.tsx | 3 +- app/tests/checkbox-contrast.test.tsx | 3 +- app/tests/command-card-layout.test.tsx | 3 +- app/tests/compact-avatar-layout.test.tsx | 3 +- app/tests/component-bots-layout.test.tsx | 3 +- app/tests/connect-your-ai.test.tsx | 3 +- .../connected-bot-mistakes-layout.test.tsx | 3 +- app/tests/consent-handoff.test.tsx | 3 +- app/tests/conversation-access-ended.test.tsx | 3 +- .../conversation-allowances-layout.test.tsx | 3 +- .../conversation-refusal-layout.test.tsx | 3 +- ...hed-run-no-stopped-notice-browser.test.tsx | 3 +- app/tests/free-runs-heads-up-layout.test.tsx | 3 +- app/tests/generated-image-browser.test.tsx | 3 +- app/tests/long-turn-reopen.test.tsx | 3 +- app/tests/maths-rendering.test.tsx | 3 +- app/tests/model-picker-phone-layout.test.tsx | 3 +- app/tests/name-the-admins-layout.test.tsx | 3 +- app/tests/needs-you-board-layout.test.tsx | 3 +- .../offline-conversation-layout.test.tsx | 3 +- app/tests/plan-notices-layout.test.tsx | 3 +- .../playground-component-in-chat.test.tsx | 5 +- .../question-answer-prompt-browser.test.tsx | 3 +- app/tests/queue-send-now-layout.test.tsx | 3 +- app/tests/rejoin-fresh-token-browser.test.tsx | 3 +- app/tests/renderer-crash.fixture.ts | 30 +++++++++ app/tests/renderer-crash.test.ts | 11 ++++ app/tests/renderer-crash.ts | 43 ++++++++++-- app/tests/routine-run-now-layout.test.tsx | 3 +- app/tests/run-ended-unheard-layout.test.tsx | 3 +- app/tests/select-scrolls-layout.test.tsx | 2 +- app/tests/sidebar-window-buttons.test.tsx | 3 +- app/tests/slider-look.test.tsx | 3 +- app/tests/stopped-command-layout.test.tsx | 3 +- .../stopped-turn-dismiss-browser.test.tsx | 3 +- app/tests/strip-version-layout.test.tsx | 3 +- app/tests/task-report-chip.test.tsx | 3 +- app/tests/team-grants-screens-layout.test.tsx | 3 +- app/tests/team-models-screens-layout.test.tsx | 3 +- app/tests/teams-screens-layout.test.tsx | 3 +- app/tests/tool-line-reduced-motion.test.tsx | 3 +- app/tests/transcript-table-end.test.tsx | 3 +- app/tests/trusted-types-build.test.ts | 3 +- app/tests/trusted-types.test.ts | 3 +- app/tests/work-folded-layout.test.tsx | 3 +- app/tests/workspace-snapshots-layout.test.tsx | 3 +- scripts/ci-changes.test.ts | 65 +++++++++++++++++++ 74 files changed, 285 insertions(+), 75 deletions(-) diff --git a/app/tests/access-requests-layout.test.tsx b/app/tests/access-requests-layout.test.tsx index b2add02cfb..8e1485d558 100644 --- a/app/tests/access-requests-layout.test.tsx +++ b/app/tests/access-requests-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Locator, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * An admin's Requests section in a real browser, in an organization whose apps are open and in one diff --git a/app/tests/admin-path-layout.test.tsx b/app/tests/admin-path-layout.test.tsx index ed71ccf790..e16da06949 100644 --- a/app/tests/admin-path-layout.test.tsx +++ b/app/tests/admin-path-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Locator, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * "This app needs an admin", in a real browser, as a member and an admin read it. diff --git a/app/tests/admin-people-remove-layout.test.tsx b/app/tests/admin-people-remove-layout.test.tsx index 7df9441af9..86b050cf7d 100644 --- a/app/tests/admin-people-remove-layout.test.tsx +++ b/app/tests/admin-people-remove-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Removing somebody on a self-hosted OpenBot that keeps one shared organization and lets people diff --git a/app/tests/admin-providers-connection.test.tsx b/app/tests/admin-providers-connection.test.tsx index 5dc05972d0..a18a346d24 100644 --- a/app/tests/admin-providers-connection.test.tsx +++ b/app/tests/admin-providers-connection.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page, Request } from "playwright-core"; @@ -28,6 +28,7 @@ import { overviewResponse, } from "./admin-settings-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Admin → AI providers: an admin changes the organization's AI, disconnects it and connects another, diff --git a/app/tests/admin-request-notify-layout.test.tsx b/app/tests/admin-request-notify-layout.test.tsx index 025591a9b7..1e092ba40d 100644 --- a/app/tests/admin-request-notify-layout.test.tsx +++ b/app/tests/admin-request-notify-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Locator, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * The screens an admin hears about requests for apps on, in a real browser: Settings, diff --git a/app/tests/ai-connection-dialog.test.tsx b/app/tests/ai-connection-dialog.test.tsx index 59ee78d648..521119f3a9 100644 --- a/app/tests/ai-connection-dialog.test.tsx +++ b/app/tests/ai-connection-dialog.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page, Request } from "playwright-core"; @@ -11,6 +11,7 @@ import { } from "@/lib/api/generated/models/models.zod"; import { personBody } from "./accounts-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Settings → General → AI model changes the AI connection in the app, with OpenBot running. diff --git a/app/tests/another-account-layout.test.tsx b/app/tests/another-account-layout.test.tsx index abbc7c4f41..894164124d 100644 --- a/app/tests/another-account-layout.test.tsx +++ b/app/tests/another-account-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { myAccountPath, myConnectionPath } from "./connections-api"; +import { test } from "./renderer-crash"; /** * The card for one more account at an app, in a real browser, in the app's stylesheet. diff --git a/app/tests/app-frame-skeleton-still.test.tsx b/app/tests/app-frame-skeleton-still.test.tsx index 35d0363163..9a0470edc2 100644 --- a/app/tests/app-frame-skeleton-still.test.tsx +++ b/app/tests/app-frame-skeleton-still.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page, Route } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * The frame drawn while the sign-in checks run lines up with the real one. diff --git a/app/tests/approval-answered-layout.test.tsx b/app/tests/approval-answered-layout.test.tsx index 01ba85876a..65e6524202 100644 --- a/app/tests/approval-answered-layout.test.tsx +++ b/app/tests/approval-answered-layout.test.tsx @@ -1,10 +1,11 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { DECLINED_BY_PERSON } from "@openbot/shared/approval-outcomes"; import type { Browser, BrowserType, Page, Route } from "playwright-core"; import { compile } from "tailwindcss"; import { approvalInboxResponse, approvalWriteResponse } from "./approvals-api"; +import { test } from "./renderer-crash"; /** * An approval the person answered stays in the conversation, in a real browser, live and after a diff --git a/app/tests/approval-left-carry-on-browser.test.tsx b/app/tests/approval-left-carry-on-browser.test.tsx index d4178a1755..88dbfcf776 100644 --- a/app/tests/approval-left-carry-on-browser.test.tsx +++ b/app/tests/approval-left-carry-on-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -11,6 +11,7 @@ import { personBody } from "./accounts-api"; import { approvalInboxResponse } from "./approvals-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A turn the server gave up carrying on after the person's decision, in a real browser: the step diff --git a/app/tests/approval-rules-layout.test.tsx b/app/tests/approval-rules-layout.test.tsx index b22c252e45..a8dd8951dc 100644 --- a/app/tests/approval-rules-layout.test.tsx +++ b/app/tests/approval-rules-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -19,6 +19,7 @@ import { } from "./bot-grants-api"; import { answerBotsList, BOTS_PATH, botResponse } from "./bots-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Every list of approval rules in a real browser: Admin → Approvals' organization rules, Settings → diff --git a/app/tests/artifact-collab-browser.test.tsx b/app/tests/artifact-collab-browser.test.tsx index e34987b75c..93d3926e03 100644 --- a/app/tests/artifact-collab-browser.test.tsx +++ b/app/tests/artifact-collab-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { @@ -14,6 +14,7 @@ import { type Person, } from "./artifact-pages-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Comments, presence and a page artifact's capabilities, in a real browser, with two people. diff --git a/app/tests/artifact-events-socket.test.ts b/app/tests/artifact-events-socket.test.ts index eb8d230f5e..84e9493454 100644 --- a/app/tests/artifact-events-socket.test.ts +++ b/app/tests/artifact-events-socket.test.ts @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { join } from "node:path"; import type { Server, ServerWebSocket } from "bun"; import type { Browser } from "playwright-core"; import { marksPlugin } from "./marks-plugin"; +import { test } from "./renderer-crash"; /** * AN OPEN ARTIFACT'S SOCKET STOPS ASKING AN ADDRESS THAT ISN'T THERE. diff --git a/app/tests/artifact-sharing-screens-layout.test.tsx b/app/tests/artifact-sharing-screens-layout.test.tsx index 0ed02d9dcb..3bfaeaa372 100644 --- a/app/tests/artifact-sharing-screens-layout.test.tsx +++ b/app/tests/artifact-sharing-screens-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page, Request } from "playwright-core"; @@ -17,6 +17,7 @@ import { } from "./admin-settings-api"; import { marksPlugin } from "./marks-plugin"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Admin, Artifacts and an artifact's Share dialog, in a real browser. diff --git a/app/tests/artifact-sign-in-refusal-browser.test.tsx b/app/tests/artifact-sign-in-refusal-browser.test.tsx index a7c5f172ad..5f6d566357 100644 --- a/app/tests/artifact-sign-in-refusal-browser.test.tsx +++ b/app/tests/artifact-sign-in-refusal-browser.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * An artifact a person's sign-in may not see is not "deleted". diff --git a/app/tests/artifact-tool-cards-browser.test.tsx b/app/tests/artifact-tool-cards-browser.test.tsx index 4bb45459f9..3c0fcbe907 100644 --- a/app/tests/artifact-tool-cards-browser.test.tsx +++ b/app/tests/artifact-tool-cards-browser.test.tsx @@ -1,10 +1,11 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { artifactRecord, ME, versionContent } from "./artifact-tool-cards.data"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { apiTask } from "./task-report-chip.data"; /** diff --git a/app/tests/artifacts-kit.test.ts b/app/tests/artifacts-kit.test.ts index 4f66e689b0..19b6b19322 100644 --- a/app/tests/artifacts-kit.test.ts +++ b/app/tests/artifacts-kit.test.ts @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, @@ -15,6 +15,7 @@ import { build } from "esbuild"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { scheme, TOKENS } from "../../tokens/src/scheme"; +import { test } from "./renderer-crash"; /** * The artifacts kit: what a Bot's page is compiled against (app/scripts/build-artifacts-kit.ts). diff --git a/app/tests/artifacts-screens.test.tsx b/app/tests/artifacts-screens.test.tsx index 6f05f9e604..e2e182ef9e 100644 --- a/app/tests/artifacts-screens.test.tsx +++ b/app/tests/artifacts-screens.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { @@ -22,6 +22,7 @@ import { } from "./artifacts-api"; import { marksPlugin } from "./marks-plugin"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * The artifact screens, in a real browser: the card a Bot's artifact tool draws in a conversation, diff --git a/app/tests/audit-approval-trace-layout.test.tsx b/app/tests/audit-approval-trace-layout.test.tsx index 76578ad15c..8f3a7d5dfc 100644 --- a/app/tests/audit-approval-trace-layout.test.tsx +++ b/app/tests/audit-approval-trace-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Admin's Activity with an approval waiting, an allowed action not carried out, and a question answered or put diff --git a/app/tests/audit-bot-work-layout.test.tsx b/app/tests/audit-bot-work-layout.test.tsx index 46e91ff173..7c29fb375b 100644 --- a/app/tests/audit-bot-work-layout.test.tsx +++ b/app/tests/audit-bot-work-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Admin's Activity with a Bot's own work on it, in a real browser, in light and dark, wide and on a phone. diff --git a/app/tests/audit-change-outcome-layout.test.tsx b/app/tests/audit-change-outcome-layout.test.tsx index 96898088df..453345e6b4 100644 --- a/app/tests/audit-change-outcome-layout.test.tsx +++ b/app/tests/audit-change-outcome-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Admin's Activity with a change that failed and one whose end nobody could confirm, in a real browser, in light and diff --git a/app/tests/audit-computer-limit-layout.test.tsx b/app/tests/audit-computer-limit-layout.test.tsx index a4c8fd8b4c..17a815f193 100644 --- a/app/tests/audit-computer-limit-layout.test.tsx +++ b/app/tests/audit-computer-limit-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Admin's Activity with a computer refused at a limit, in a real browser, in light and dark, wide and on a phone. diff --git a/app/tests/board-row-layout.test.tsx b/app/tests/board-row-layout.test.tsx index bc691e4efd..3e21ec5bdf 100644 --- a/app/tests/board-row-layout.test.tsx +++ b/app/tests/board-row-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * A Needs you board row keeps its words readable at every width the board is drawn at. diff --git a/app/tests/bot-file-links-browser.test.tsx b/app/tests/bot-file-links-browser.test.tsx index b771969450..3582b76a82 100644 --- a/app/tests/bot-file-links-browser.test.tsx +++ b/app/tests/bot-file-links-browser.test.tsx @@ -1,10 +1,11 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType } from "playwright-core"; import { compile } from "tailwindcss"; import { ATTACHMENT, FILE_NAME } from "./bot-file-links.data"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A Bot's link to the file it sent downloads the file, in a real browser, and nothing in its words diff --git a/app/tests/bot-owner-lists-layout.test.tsx b/app/tests/bot-owner-lists-layout.test.tsx index 159a5b91c8..0b94c64a4c 100644 --- a/app/tests/bot-owner-lists-layout.test.tsx +++ b/app/tests/bot-owner-lists-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -22,6 +22,7 @@ import { answerBotsList } from "./bots-api"; import { COMPONENTS_PATH, componentBody } from "./components-api"; import { connectionPage, MY_CONNECTIONS_PATH } from "./connections-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { CHECK_IN_USAGE_PATH } from "./schedules-api"; import { SKILLS_PATH, skillsResponse } from "./skills-api"; diff --git a/app/tests/browse-steps-layout.test.tsx b/app/tests/browse-steps-layout.test.tsx index b9fa874ec3..b7d5c4a7a6 100644 --- a/app/tests/browse-steps-layout.test.tsx +++ b/app/tests/browse-steps-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * A Bot's browse steps, opened in a real conversation in a real browser. diff --git a/app/tests/bug-reports-layout.test.tsx b/app/tests/bug-reports-layout.test.tsx index 23419f4d5f..0db9608ec5 100644 --- a/app/tests/bug-reports-layout.test.tsx +++ b/app/tests/bug-reports-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * Report a bug, Your bug reports and Admin's Bug reports, in a real browser, in light and in dark, diff --git a/app/tests/carry-on-carried-turn-browser.test.tsx b/app/tests/carry-on-carried-turn-browser.test.tsx index 03da93d97e..65cdabcd6b 100644 --- a/app/tests/carry-on-carried-turn-browser.test.tsx +++ b/app/tests/carry-on-carried-turn-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -11,6 +11,7 @@ import { personBody } from "./accounts-api"; import { approvalBody, approvalInboxResponse } from "./approvals-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Carry on while the server carries a turn on, in a real browser. diff --git a/app/tests/checkbox-contrast.test.tsx b/app/tests/checkbox-contrast.test.tsx index f0b7909b0d..121c9fec9c 100644 --- a/app/tests/checkbox-contrast.test.tsx +++ b/app/tests/checkbox-contrast.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * An unticked tickbox can be seen, in light and in dark. diff --git a/app/tests/command-card-layout.test.tsx b/app/tests/command-card-layout.test.tsx index e42aa7c60b..4312176117 100644 --- a/app/tests/command-card-layout.test.tsx +++ b/app/tests/command-card-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * A Bot's command, as the conversation and the Activity pane draw it, in a real browser. diff --git a/app/tests/compact-avatar-layout.test.tsx b/app/tests/compact-avatar-layout.test.tsx index 0e5f326ed6..e5a6d7127b 100644 --- a/app/tests/compact-avatar-layout.test.tsx +++ b/app/tests/compact-avatar-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -9,6 +9,7 @@ import { BotLookProvider } from "../src/components/agents/bot-look"; import { ChannelItemContent } from "../src/components/app-sidebar/channel-item-content"; import { agentListQueryOptions } from "../src/lib/agents/queries"; import { deploymentKeys } from "../src/lib/deployment/queries"; +import { test } from "./renderer-crash"; /** * A compact conversation row's orbs sit whole inside their avatar. diff --git a/app/tests/component-bots-layout.test.tsx b/app/tests/component-bots-layout.test.tsx index 18796c141f..573046d978 100644 --- a/app/tests/component-bots-layout.test.tsx +++ b/app/tests/component-bots-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -13,6 +13,7 @@ import { import { answerBotsList } from "./bots-api"; import { COMPONENTS_PATH, componentBody } from "./components-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { SKILLS_PATH, skillsResponse } from "./skills-api"; /** diff --git a/app/tests/connect-your-ai.test.tsx b/app/tests/connect-your-ai.test.tsx index 1762f600b2..5c8be94ee7 100644 --- a/app/tests/connect-your-ai.test.tsx +++ b/app/tests/connect-your-ai.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page, Request } from "playwright-core"; @@ -26,6 +26,7 @@ import { import { ListOrganizationsResponse } from "@/lib/api/generated/organizations/organizations.zod"; import { personBody } from "./accounts-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Connect your AI, on an OpenBot that provides no AI of its own (OpenBot Cloud). diff --git a/app/tests/connected-bot-mistakes-layout.test.tsx b/app/tests/connected-bot-mistakes-layout.test.tsx index 162b0349e5..ab570ac218 100644 --- a/app/tests/connected-bot-mistakes-layout.test.tsx +++ b/app/tests/connected-bot-mistakes-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -9,6 +9,7 @@ import { UNREADABLE_REPLY } from "@/lib/copilot/stopped-turn"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * What a person sees when a connected Bot gets something wrong, in a real browser. diff --git a/app/tests/consent-handoff.test.tsx b/app/tests/consent-handoff.test.tsx index 06831aab98..ec3438cb6f 100644 --- a/app/tests/consent-handoff.test.tsx +++ b/app/tests/consent-handoff.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserContext, Page } from "playwright-core"; @@ -18,6 +18,7 @@ import { connectionsCall, startResponse, } from "./connections-api"; +import { test } from "./renderer-crash"; /** * A sign-in through Composio is introduced by OpenBot before it leaves, and the screens on either diff --git a/app/tests/conversation-access-ended.test.tsx b/app/tests/conversation-access-ended.test.tsx index f666c9a3d0..4b64f60595 100644 --- a/app/tests/conversation-access-ended.test.tsx +++ b/app/tests/conversation-access-ended.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -6,6 +6,7 @@ import { compile } from "tailwindcss"; import { getGetBotResponseMock } from "@/lib/api/generated/bots/bots.msw"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; +import { test } from "./renderer-crash"; /** * A person whose Bot was taken away mid-conversation is told so, in a real browser. diff --git a/app/tests/conversation-allowances-layout.test.tsx b/app/tests/conversation-allowances-layout.test.tsx index 5b5981510a..0f551a0736 100644 --- a/app/tests/conversation-allowances-layout.test.tsx +++ b/app/tests/conversation-allowances-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * The lines above the composer that say what a conversation allows, in a real browser. diff --git a/app/tests/conversation-refusal-layout.test.tsx b/app/tests/conversation-refusal-layout.test.tsx index a142038865..a6db1295dd 100644 --- a/app/tests/conversation-refusal-layout.test.tsx +++ b/app/tests/conversation-refusal-layout.test.tsx @@ -1,10 +1,11 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { marksPlugin } from "./marks-plugin"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A turn the server refused reads as the app's notice, and a short conversation has no stray rail. diff --git a/app/tests/finished-run-no-stopped-notice-browser.test.tsx b/app/tests/finished-run-no-stopped-notice-browser.test.tsx index b51825f54f..ef238c89b2 100644 --- a/app/tests/finished-run-no-stopped-notice-browser.test.tsx +++ b/app/tests/finished-run-no-stopped-notice-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -8,6 +8,7 @@ import { RUN_ENDED_UNHEARD, RUN_UNREACHABLE } from "@/lib/copilot/quiet-run"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A run the server says finished is never said to have stopped, however late its stored copy is; diff --git a/app/tests/free-runs-heads-up-layout.test.tsx b/app/tests/free-runs-heads-up-layout.test.tsx index 8c642e8460..32b2c63cce 100644 --- a/app/tests/free-runs-heads-up-layout.test.tsx +++ b/app/tests/free-runs-heads-up-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * The heads-ups before the free Bot runs are used up, and the Plan and Pricing rows in Settings, diff --git a/app/tests/generated-image-browser.test.tsx b/app/tests/generated-image-browser.test.tsx index 3f8d69e9bd..e5f866dfa7 100644 --- a/app/tests/generated-image-browser.test.tsx +++ b/app/tests/generated-image-browser.test.tsx @@ -1,10 +1,11 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { PICTURES } from "./generated-image-browser.data"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * The picture card a Bot's `generate_image` call draws, in a real browser, beside the card a file the diff --git a/app/tests/long-turn-reopen.test.tsx b/app/tests/long-turn-reopen.test.tsx index 1b887633ec..eb8ef0b3c3 100644 --- a/app/tests/long-turn-reopen.test.tsx +++ b/app/tests/long-turn-reopen.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { spawnSync } from "node:child_process"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; @@ -13,6 +13,7 @@ import { getGetBotResponseMock } from "@/lib/api/generated/bots/bots.msw"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A CONVERSATION WITH ONE VERY LONG TURN OPENS AGAIN, IN A REAL BROWSER, WITHOUT THE TAB RUNNING OUT diff --git a/app/tests/maths-rendering.test.tsx b/app/tests/maths-rendering.test.tsx index f23ada5d81..a00711cbca 100644 --- a/app/tests/maths-rendering.test.tsx +++ b/app/tests/maths-rendering.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { basename, dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * Maths a Bot writes is drawn as formulas, everywhere its words are drawn: a reply, a task's thread, diff --git a/app/tests/model-picker-phone-layout.test.tsx b/app/tests/model-picker-phone-layout.test.tsx index 56684eac3e..9f18edf090 100644 --- a/app/tests/model-picker-phone-layout.test.tsx +++ b/app/tests/model-picker-phone-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * The composer's model picker names every model whole, on a phone as on a laptop. diff --git a/app/tests/name-the-admins-layout.test.tsx b/app/tests/name-the-admins-layout.test.tsx index 63038f3cc7..a9a5dede20 100644 --- a/app/tests/name-the-admins-layout.test.tsx +++ b/app/tests/name-the-admins-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Locator, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * The admins named on the chat card and on a Bot's Apps row, in a real browser, as a member reads diff --git a/app/tests/needs-you-board-layout.test.tsx b/app/tests/needs-you-board-layout.test.tsx index 15b6b5a31e..776aeb9ce4 100644 --- a/app/tests/needs-you-board-layout.test.tsx +++ b/app/tests/needs-you-board-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -12,6 +12,7 @@ import { taskOf, } from "./conversations-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { answerScheduleLists, pathOf } from "./schedules-api"; /** diff --git a/app/tests/offline-conversation-layout.test.tsx b/app/tests/offline-conversation-layout.test.tsx index ae20f8be0d..45a1f1b93a 100644 --- a/app/tests/offline-conversation-layout.test.tsx +++ b/app/tests/offline-conversation-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A conversation opened while the OpenBot it is connected to can't be reached, in a real browser. diff --git a/app/tests/plan-notices-layout.test.tsx b/app/tests/plan-notices-layout.test.tsx index cb1a399fee..8f3cdc47e4 100644 --- a/app/tests/plan-notices-layout.test.tsx +++ b/app/tests/plan-notices-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Where an organization's plan shows, drawn by a real Chromium with the app's stylesheet: the bar diff --git a/app/tests/playground-component-in-chat.test.tsx b/app/tests/playground-component-in-chat.test.tsx index 33bbe3bdb6..5c1febd1c8 100644 --- a/app/tests/playground-component-in-chat.test.tsx +++ b/app/tests/playground-component-in-chat.test.tsx @@ -1,10 +1,11 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; -import { BOT, INVOICE, PAYROLL } from "./playground-component-in-chat.data"; import { still } from "./page-still"; +import { BOT, INVOICE, PAYROLL } from "./playground-component-in-chat.data"; +import { test } from "./renderer-crash"; /** * A component published in the Playground is drawn when its Bot calls it in a conversation, and one diff --git a/app/tests/question-answer-prompt-browser.test.tsx b/app/tests/question-answer-prompt-browser.test.tsx index 94792a1aa8..3a253d0322 100644 --- a/app/tests/question-answer-prompt-browser.test.tsx +++ b/app/tests/question-answer-prompt-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -9,6 +9,7 @@ import { personBody } from "./accounts-api"; import { approvalInboxResponse, questionResponsePath } from "./approvals-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A Bot asked one question, and the message box under its card says the next message answers it. diff --git a/app/tests/queue-send-now-layout.test.tsx b/app/tests/queue-send-now-layout.test.tsx index fb995ee914..3a37cd1bcd 100644 --- a/app/tests/queue-send-now-layout.test.tsx +++ b/app/tests/queue-send-now-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * Send now on a queued message, in a real browser. diff --git a/app/tests/rejoin-fresh-token-browser.test.tsx b/app/tests/rejoin-fresh-token-browser.test.tsx index 67e9a96339..662b349c61 100644 --- a/app/tests/rejoin-fresh-token-browser.test.tsx +++ b/app/tests/rejoin-fresh-token-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -8,6 +8,7 @@ import { RUN_ENDED_UNHEARD, RUN_UNREACHABLE } from "@/lib/copilot/quiet-run"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A reply whose socket drops part way is joined again at once, with a fresh join token, and reads diff --git a/app/tests/renderer-crash.fixture.ts b/app/tests/renderer-crash.fixture.ts index 8dd1a80b37..19a8193603 100644 --- a/app/tests/renderer-crash.fixture.ts +++ b/app/tests/renderer-crash.fixture.ts @@ -96,3 +96,33 @@ test("a reload fails some other way", async () => { test.skipIf(false)("crashes once, through skipIf", async () => { if (go("crashes once, through skipIf") === 1) await crashRenderer(); }); + +/* + * The words a WebKit crash fails a test with, "Target page, context or browser has been closed", + * from a page the test closed itself: no renderer crashed, so the failure is the test's, at once. + */ +test("a page closed by the test, not a crash", async () => { + go("a page closed by the test, not a crash"); + const page = await browser.newPage(); + await page.close(); + await page.evaluate(() => document.title); +}); + +// The engine lists (`test.each(engines)`) the WebKit files are written with. +test.each(["one"])("crashes once, through each (%s)", async (row) => { + if (go(`crashes once, through each (${row})`) === 1) await crashRenderer(); + const page = await browser.newPage(); + expect(await page.evaluate(() => 1 + 1)).toBe(2); + await page.close(); +}); + +test.each(["one"])("fails without a crash, through each (%s)", async (row) => { + go(`fails without a crash, through each (${row})`); + const page = await browser.newPage(); + expect(await page.evaluate(() => 1 + 1)).toBe(3); +}); + +// The rest of bun's `test` is bun's own, and a file using it still loads. +test.skip("skipped, through skip", () => { + go("skipped, through skip"); +}); diff --git a/app/tests/renderer-crash.test.ts b/app/tests/renderer-crash.test.ts index e25877db2d..57027e4fb6 100644 --- a/app/tests/renderer-crash.test.ts +++ b/app/tests/renderer-crash.test.ts @@ -83,5 +83,16 @@ describe.skipIf(!asked)("a renderer crash in a real-browser test", () => { // Any other failure of a navigation is the test's, at once. expect(result("a reload fails some other way")).toBe("fail"); expect(goes("a reload fails some other way")).toBe(1); + // A crash's words with no crash behind them (a page the test closed itself) are the test's. + expect(result("a page closed by the test, not a crash")).toBe("fail"); + expect(goes("a page closed by the test, not a crash")).toBe(1); + // Through `test.each`, as the files that run each engine in turn write their tests. + expect(result("crashes once, through each (one)")).toBe("pass"); + expect(goes("crashes once, through each (one)")).toBe(2); + expect(result("fails without a crash, through each (one)")).toBe("fail"); + expect(goes("fails without a crash, through each (one)")).toBe(1); + // `test.skip` and the rest are bun's own: the file loads, and a skipped test never runs. + expect(goes("skipped, through skip")).toBe(0); + expect(said).not.toContain("ERR_INVALID_THIS"); }, 300_000); }); diff --git a/app/tests/renderer-crash.ts b/app/tests/renderer-crash.ts index 76ad078ae8..923bb60c8b 100644 --- a/app/tests/renderer-crash.ts +++ b/app/tests/renderer-crash.ts @@ -12,7 +12,8 @@ import type { Browser, BrowserContext, Page } from "playwright-core"; * it hit whichever test had a page open: a home page, an organization that was out of reach. The * test then failed with "Target page, context or browser has been closed", for nothing it checks. * - * So the real-browser test files take `test` from here instead of from bun:test. It is bun's own + * So the real-browser test files take `test` from here instead of from bun:test, and every file + * WebKit runs must (scripts/ci-changes.test.ts fails CI on one that doesn't). It is bun's own * `test`, with one difference: when a page's renderer crashed while the test ran, as Playwright * reports it (`page.on("crash")`), the test runs again, and the log says so, up to * `CRASH_RETRIES` times. A test that fails any other way fails on that go, as it always did. @@ -157,16 +158,50 @@ function surviving(body: Body): Body { type Options = Parameters[2]; +/** + * A `test.each` body that survives a renderer crash. It is handed each row's values, so it keeps + * the body's own `length`, which is what bun reads to tell whether it takes `done`. + */ +function survivingEach(body: (...row: unknown[]) => unknown) { + if (typeof body !== "function") return body; + const wrapped = (...row: unknown[]) => + survivingRendererCrash(() => body(...row)); + Object.defineProperty(wrapped, "length", { value: body.length }); + return wrapped; +} + /** * bun's `test`, where a test the browser's renderer crashed in runs again: called directly, or - * through `test.skipIf` and `test.if`. Everything else on it is bun's own. + * through `test.skipIf`, `test.if` and `test.each`. Everything else on it is bun's own. */ export const test: typeof bunTest = new Proxy(bunTest, { apply: (target, _this, [name, body, options]: [string, Body, Options]) => target(name, surviving(body), options), - get: (target, key, receiver) => + get: (target, key) => key === "skipIf" || key === "if" ? (condition: boolean) => (name: string, body: Body, options?: Options) => target[key](condition)(name, surviving(body), options) - : Reflect.get(target, key, receiver), + : key === "each" + ? (table: unknown[]) => + ( + name: string, + body: (...row: unknown[]) => unknown, + options?: Options, + ) => + (target.each as (rows: unknown[]) => typeof target)(table)( + name, + survivingEach(body) as Body, + options, + ) + : bunsOwn(target, key), }); + +/* + * The rest of bun's `test` (`test.skip`, `test.todo`, `test.only`) called on bun's own `test`: + * called on this Proxy instead, bun refuses it ("Expected this to be instanceof ScopeFunctions"), + * and the whole file fails to load. + */ +function bunsOwn(target: typeof bunTest, key: string | symbol): unknown { + const value: unknown = Reflect.get(target, key, target); + return typeof value === "function" ? value.bind(target) : value; +} diff --git a/app/tests/routine-run-now-layout.test.tsx b/app/tests/routine-run-now-layout.test.tsx index 36431eef67..6c01573260 100644 --- a/app/tests/routine-run-now-layout.test.tsx +++ b/app/tests/routine-run-now-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * Run now on a routine's page, in a real browser, in light and dark, wide and on a phone. Before diff --git a/app/tests/run-ended-unheard-layout.test.tsx b/app/tests/run-ended-unheard-layout.test.tsx index 3434812463..be58af5059 100644 --- a/app/tests/run-ended-unheard-layout.test.tsx +++ b/app/tests/run-ended-unheard-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -9,6 +9,7 @@ import { RUN_ENDED_UNHEARD } from "@/lib/copilot/quiet-run"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A run whose end never reached this browser is shown as it ended on the server, in a real browser. diff --git a/app/tests/select-scrolls-layout.test.tsx b/app/tests/select-scrolls-layout.test.tsx index 0c5c780111..25ff54c9f4 100644 --- a/app/tests/select-scrolls-layout.test.tsx +++ b/app/tests/select-scrolls-layout.test.tsx @@ -4,13 +4,13 @@ import { describe, expect, setDefaultTimeout, - test, } from "bun:test"; import { existsSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A select whose options don't all fit under it scrolls to every option, by its scroll arrow, by diff --git a/app/tests/sidebar-window-buttons.test.tsx b/app/tests/sidebar-window-buttons.test.tsx index bef8dd2c79..f6ca1986ba 100644 --- a/app/tests/sidebar-window-buttons.test.tsx +++ b/app/tests/sidebar-window-buttons.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -10,6 +10,7 @@ import { personBody } from "./accounts-api"; import { type AppsFixture, answerAppsApi } from "./apps-api"; import { conversationPage } from "./conversations-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * In OpenBot Desktop on macOS the window's close, minimise and zoom buttons sit over the sidebar's diff --git a/app/tests/slider-look.test.tsx b/app/tests/slider-look.test.tsx index 416dc33c56..70ec99470b 100644 --- a/app/tests/slider-look.test.tsx +++ b/app/tests/slider-look.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * The Slider as a browser draws it, which happy-dom can't: its focus ring, its keys, and where the diff --git a/app/tests/stopped-command-layout.test.tsx b/app/tests/stopped-command-layout.test.tsx index fc2c2b6476..a5bc551a3f 100644 --- a/app/tests/stopped-command-layout.test.tsx +++ b/app/tests/stopped-command-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -8,6 +8,7 @@ import { getGetBotResponseMock } from "@/lib/api/generated/bots/bots.msw"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A command the person stopped reads as stopped, not running, then and after the conversation is diff --git a/app/tests/stopped-turn-dismiss-browser.test.tsx b/app/tests/stopped-turn-dismiss-browser.test.tsx index a8a0bd5126..605a707e5c 100644 --- a/app/tests/stopped-turn-dismiss-browser.test.tsx +++ b/app/tests/stopped-turn-dismiss-browser.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Server } from "bun"; @@ -10,6 +10,7 @@ import { TURN_INTERRUPTED } from "@/lib/copilot/stopped-turn"; import { personBody } from "./accounts-api"; import { botGrantsBody } from "./bot-grants-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * An interrupted turn's notice, dismissed, stays dismissed: in a real browser, through a reload. diff --git a/app/tests/strip-version-layout.test.tsx b/app/tests/strip-version-layout.test.tsx index 495fbdc634..776e4ba6cc 100644 --- a/app/tests/strip-version-layout.test.tsx +++ b/app/tests/strip-version-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import type { Page, Request } from "playwright-core"; import { alerts, @@ -13,6 +13,7 @@ import { stop, style, } from "./organization-notices-browser"; +import { test } from "./renderer-crash"; /** * On OpenBot Cloud the release the server runs is on screen on every page, under the strip's avatar, diff --git a/app/tests/task-report-chip.test.tsx b/app/tests/task-report-chip.test.tsx index 3ad882fc87..3abef5e34d 100644 --- a/app/tests/task-report-chip.test.tsx +++ b/app/tests/task-report-chip.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { apiTask, RESULTS, STATES, TITLES } from "./task-report-chip.data"; /** diff --git a/app/tests/team-grants-screens-layout.test.tsx b/app/tests/team-grants-screens-layout.test.tsx index e138d4c630..f6eb777971 100644 --- a/app/tests/team-grants-screens-layout.test.tsx +++ b/app/tests/team-grants-screens-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -27,6 +27,7 @@ import { sharedConnectionResponse, } from "./connections-api"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { SKILLS_PATH, skillPath, skillsResponse } from "./skills-api"; /** diff --git a/app/tests/team-models-screens-layout.test.tsx b/app/tests/team-models-screens-layout.test.tsx index 338d3ad09e..1595c61852 100644 --- a/app/tests/team-models-screens-layout.test.tsx +++ b/app/tests/team-models-screens-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page, Request } from "playwright-core"; @@ -21,6 +21,7 @@ import { } from "./admin-settings-api"; import { marksPlugin } from "./marks-plugin"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A team's models, set by an admin and read by anybody, in a real browser. diff --git a/app/tests/teams-screens-layout.test.tsx b/app/tests/teams-screens-layout.test.tsx index 5a64c77737..29ddcf5c23 100644 --- a/app/tests/teams-screens-layout.test.tsx +++ b/app/tests/teams-screens-layout.test.tsx @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; @@ -15,6 +15,7 @@ import { teamBotOf } from "./bots-api"; import { personLearningBody, reviewBody } from "./learning-api"; import { marksPlugin } from "./marks-plugin"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; import { SKILLS_PATH, skillBody } from "./skills-api"; /** diff --git a/app/tests/tool-line-reduced-motion.test.tsx b/app/tests/tool-line-reduced-motion.test.tsx index 0333a94232..189b9b4fa8 100644 --- a/app/tests/tool-line-reduced-motion.test.tsx +++ b/app/tests/tool-line-reduced-motion.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { readFileSync } from "node:fs"; import type { Browser, BrowserType, Page } from "playwright-core"; import { renderToStaticMarkup } from "react-dom/server"; import { ProgressRow } from "../src/components/channels/progress-row"; import { ToolLine } from "../src/components/channels/tool-line"; +import { test } from "./renderer-crash"; /** * A running step's words shimmer: a soft band of light sweeps across them, left to right at an even diff --git a/app/tests/transcript-table-end.test.tsx b/app/tests/transcript-table-end.test.tsx index 7f193fd4e6..3da385b833 100644 --- a/app/tests/transcript-table-end.test.tsx +++ b/app/tests/transcript-table-end.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A CONVERSATION ENDS AT ITS NEWEST TURN, HOWEVER LONG THE TABLES ABOVE IT. diff --git a/app/tests/trusted-types-build.test.ts b/app/tests/trusted-types-build.test.ts index a2ede4dadb..cf2bbde318 100644 --- a/app/tests/trusted-types-build.test.ts +++ b/app/tests/trusted-types-build.test.ts @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, @@ -14,6 +14,7 @@ import { getGetArtifactResponseMock, getGetArtifactVersionResponseMock, } from "@/lib/api/generated/artifacts/artifacts.msw"; +import { test } from "./renderer-crash"; /** * THE BUILT APP LOADS WITH NO TRUSTED TYPES VIOLATION, AND DRAWS MERMAID UNDER THEM. diff --git a/app/tests/trusted-types.test.ts b/app/tests/trusted-types.test.ts index 62806d611f..80b5a77856 100644 --- a/app/tests/trusted-types.test.ts +++ b/app/tests/trusted-types.test.ts @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { basename, dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; @@ -10,6 +10,7 @@ import { TRUSTED_TYPES_POLICY_NAMES, } from "@/lib/trusted-types"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * TRUSTED TYPES ARE ON IN THE APP, AND THE APP STILL DRAWS. diff --git a/app/tests/work-folded-layout.test.tsx b/app/tests/work-folded-layout.test.tsx index ffefe0d5a0..e62e9d2b89 100644 --- a/app/tests/work-folded-layout.test.tsx +++ b/app/tests/work-folded-layout.test.tsx @@ -1,8 +1,9 @@ -import { afterAll, beforeAll, describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, BrowserType, Page } from "playwright-core"; import { compile } from "tailwindcss"; +import { test } from "./renderer-crash"; /** * A Bot's work, folded in a real conversation in a real browser, and nothing else. diff --git a/app/tests/workspace-snapshots-layout.test.tsx b/app/tests/workspace-snapshots-layout.test.tsx index 6d0348c906..8e8c5a5d8e 100644 --- a/app/tests/workspace-snapshots-layout.test.tsx +++ b/app/tests/workspace-snapshots-layout.test.tsx @@ -1,9 +1,10 @@ -import { afterAll, describe, expect, test } from "bun:test"; +import { afterAll, describe, expect } from "bun:test"; import { existsSync, mkdirSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import type { Browser, Page } from "playwright-core"; import { compile } from "tailwindcss"; import { still } from "./page-still"; +import { test } from "./renderer-crash"; /** * A Bot's saved copies hold their layout, drawn by a real Chromium with the app's stylesheet: the diff --git a/scripts/ci-changes.test.ts b/scripts/ci-changes.test.ts index cbe00ebb92..dafa795f7f 100644 --- a/scripts/ci-changes.test.ts +++ b/scripts/ci-changes.test.ts @@ -1447,6 +1447,71 @@ describe("the rules name the jobs the workflows run", () => { ).toEqual([]); }); + test("ci.yml: every test file that runs in WebKit takes `test` from renderer-crash.ts, not bun's", () => { + // WebKit on Linux crashes its own renderer under CI's load, and the test that had a page open + // fails with "Target page, context or browser has been closed" for nothing it checks. On + // 3 December that failed the 1.2.10 release run three times, on a file still on bun's `test`, + // and failed other WebKit shards on pull requests. renderer-crash.ts's `test` runs a test the + // renderer crashed in again and fails on anything else, so every file WebKit runs takes it: + // the files a ci.yml step runs in WebKit, and every app browser test that reads + // OPENBOT_APP_ENGINES, which `tests (changed files)` runs in WebKit when it changes. + const EXEMPT = [ + // Proves the retry itself, by crashing a renderer in a process of its own: retrying it would + // hide the failure it exists to catch. + "app/tests/renderer-crash.test.ts", + // The desktop's own jobs install only the desktop's dependencies and typecheck this file, + // and renderer-crash.ts is typed by the root's Playwright. Only one of its tests runs in + // WebKit (`-t`). + "desktop/src/setupLayout.browser.test.ts", + ]; + const parsed = Bun.YAML.parse( + readFileSync(join(ROOT, ".github/workflows/ci.yml"), "utf8"), + ) as { jobs: Record }; + const inWebKit = Object.values(parsed.jobs) + .flatMap((job) => job.steps ?? []) + .map((step) => step.run ?? "") + .filter((run) => /OPENBOT_APP_ENGINES?=\S*\bwebkit\b/.test(run)) + .flatMap((run) => { + const folder = run.match( + /--workdir "\$GITHUB_WORKSPACE\/([^"]+)"/, + )?.[1]; + return (run.match(/\S+\.test\.tsx?\b/g) ?? []).map((file) => + folder ? `${folder}/${file}` : file, + ); + }); + const askForEngines = ["app/tests", "extension/tests"].flatMap((dir) => + readdirSync(join(ROOT, dir), { recursive: true, encoding: "utf8" }) + .filter((file) => /\.test\.tsx?$/.test(file)) + .map((file) => `${dir}/${file}`) + .filter((file) => isBrowserFile(file)) + .filter((file) => readTracked(file)?.includes("OPENBOT_APP_ENGINES")), + ); + const files = [...new Set([...inWebKit, ...askForEngines])] + .filter((file) => !EXEMPT.includes(file)) + .sort(); + // The WebKit job's list alone is over a hundred files. + expect(files.length).toBeGreaterThan(100); + const names = (source: string, from: RegExp) => + [...source.matchAll(/^import\s*\{([^}]*)\}\s*from\s*"([^"]+)";/gm)] + .filter(([, , path]) => from.test(path ?? "")) + .flatMap(([, list]) => (list ?? "").split(",")) + .map((name) => name.trim().split(/\s+as\s+/)[0]); + const onBunsTest = files.filter((file) => { + const source = readTracked(file); + if (source === undefined) return true; + const fromBun = names(source, /^bun:test$/); + const fromRetry = names(source, /(^|\/)renderer-crash$/); + return ( + fromBun.includes("test") || + fromBun.includes("it") || + !fromRetry.includes("test") + ); + }); + expect(onBunsTest).toEqual([]); + // An exemption is for a file WebKit runs, kept off the retry on purpose. + expect(EXEMPT.filter((file) => !inWebKit.includes(file))).toEqual([]); + }); + test("ci.yml: the WebKit list fits a fork's 4-core runner and keeps the larger runners' settings", () => { // On a fork's standard runner, eight workers timed tests out and crashed WebKit's renderer on // every outside pull request that touched the app. There it runs two at a time with more time