The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed app/test/playwright/specs/aui-tool-result-elements.spec.ts,scripts/__tests__/br
Steven Enamakele28d1f0e2e15
diff --git a/app/test/playwright/specs/aui-tool-result-elements.spec.ts b/app/test/playwright/specs/aui-tool-result-elements.spec.tsindex 192337e891..b27356d9b0 100644--- a/app/test/playwright/specs/aui-tool-result-elements.spec.ts+++ b/app/test/playwright/specs/aui-tool-result-elements.spec.ts@@ -296,8 +296,14 @@ test.describe('assistant-ui tool-result elements', () => {]);await sendTurn(page, threadId, 'AUI-DOC-CASE write up the infrastructure review');- const group = await openActivityGroup(page);- const card = group.locator('[data-slot="artifact-card"]').last();+ // `generate_document` is registered as `display: standalone`; assistant-ui+ // deliberately leaves it outside the normal activity disclosure group.+ // Scope the element through its actual assistant-message content instead.+ const artifactMessage = page+ .locator('[data-slot="aui_assistant-message-content"]')+ .filter({ has: page.locator('[data-slot="artifact-card"]') })+ .last();+ const card = artifactMessage.locator('[data-slot="artifact-card"]').last();await expect(card).toBeVisible({ timeout: 20_000 });// The point of this assertion. `DocumentArtifactCall` resolves the title asdiff --git a/scripts/__tests__/browser-test-skips.test.mjs b/scripts/__tests__/browser-test-skips.test.mjsindex 82b63bb248..403fa7f01e 100644--- a/scripts/__tests__/browser-test-skips.test.mjs+++ b/scripts/__tests__/browser-test-skips.test.mjs@@ -59,3 +59,31 @@ test("ignores regex literals without letting their delimiters hide executable ca"4: this.skip();",]);});++test("parses TypeScript and TSX using each spec's actual language mode", () => {+ const typescript = [+ "const asserted = <number>other;",+ "it.skip('unlinked after angle assertion');",+ "const identity = <T>(value: T) => value;",+ "test.skip('unlinked after generic arrow');",+ ].join("\n");+ const tsx = [+ "const element = <section />;",+ "describe.skip('unlinked after JSX');",+ ].join("\n");++ assert.deepEqual(untrackedSkipLines(typescript, "fixture.spec.ts"), [+ "2: it.skip('unlinked after angle assertion');",+ "4: test.skip('unlinked after generic arrow');",+ ]);+ assert.deepEqual(untrackedSkipLines(tsx, "fixture.spec.tsx"), [+ "2: describe.skip('unlinked after JSX');",+ ]);+});++test("fails closed when a browser spec cannot be parsed", () => {+ assert.throws(+ () => untrackedSkipLines("const = ;\ntest.skip('unlinked');", "broken.spec.ts"),+ /Could not parse broken\.spec\.ts at line 1/,+ );+});diff --git a/scripts/ci/check-browser-test-skips.mjs b/scripts/ci/check-browser-test-skips.mjsindex b67a1664d1..86d6356aed 100644--- a/scripts/ci/check-browser-test-skips.mjs+++ b/scripts/ci/check-browser-test-skips.mjs@@ -11,14 +11,31 @@ const requireFromApp = createRequire(const ts = requireFromApp("typescript");const issueUrl = /https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+/;-export function untrackedSkipLines(source) {+function scriptKindFor(fileName) {+ const extension = fileName.toLowerCase().slice(fileName.lastIndexOf("."));+ if (extension === ".tsx") return ts.ScriptKind.TSX;+ if (extension === ".jsx") return ts.ScriptKind.JSX;+ if ([".js", ".mjs", ".cjs"].includes(extension)) return ts.ScriptKind.JS;+ return ts.ScriptKind.TS;+}++export function untrackedSkipLines(source, fileName = "browser-spec.ts") {const sourceFile = ts.createSourceFile(- "browser-spec.tsx",+ fileName,source,ts.ScriptTarget.Latest,true,- ts.ScriptKind.TSX,+ scriptKindFor(fileName),);+ if (sourceFile.parseDiagnostics.length > 0) {+ const diagnostic = sourceFile.parseDiagnostics[0];+ const location = diagnostic.start === undefined+ ? ""+ : ` at line ${sourceFile.getLineAndCharacterOfPosition(diagnostic.start).line + 1}`;+ throw new Error(+ `Could not parse ${fileName}${location}: ${ts.flattenDiagnosticMessageText(diagnostic.messageText, " ")}`,+ );+ }const lines = source.split("\n");const failures = [];@@ -63,7 +80,7 @@ if (}const failures = [];for (const file of files) {- const badLines = untrackedSkipLines(readFileSync(file, "utf8"));+ const badLines = untrackedSkipLines(readFileSync(file, "utf8"), file);failures.push(...badLines.map((line) => `${file}:${line}`));}if (failures.length) {