commit 8b7173d3a5d8bc228eb437082e792077a8e06c4a
parent bd497e5623a7c2632750341e960161e6603de813
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 22 Sep 2026 16:32:51 -0400
ask: the hub /ask spec locates the composer, not the key field
`getByRole("textbox").first()` on this page is the provider panel's API
key input, which sits above the chat — so the spec was asserting on the
wrong control and failed even once the page rendered. Located by its
placeholder now, the way export/e2e/ask-chat.spec.ts does it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat:
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/export/e2e-hub/ask.spec.ts b/export/e2e-hub/ask.spec.ts
@@ -38,14 +38,16 @@ test.describe("hub /ask", () => {
).toBeVisible();
// The composer is AskChat's whole point, and it only renders once the
- // session context AskHub now provides is there.
- const box = page.getByRole("textbox").first();
- await expect(box).toBeVisible();
- await expect(box).toHaveAttribute(
- "placeholder",
+ // provider stack AskHub now mounts is there. Located by its placeholder,
+ // the way ask-chat.spec.ts does it — the first textbox on the page is the
+ // provider panel's API-key field, not this.
+ const box = page.getByPlaceholder(
/Ask about the transcripts|Loading transcripts/,
);
- await expect(page.getByRole("button", { name: "Ask" })).toBeVisible();
+ await expect(box).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: "Ask", exact: true }),
+ ).toBeVisible();
// A missing provider surfaces as a client-side throw, not a blank page.
expect(errors).toEqual([]);