Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/frontend/tests/a11y/messages.a11y.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,15 @@ test.describe("Messages settings route accessibility", () => {
await awaitBootstrapTest(page, { skipModal: true });
await page.goto("/settings/messages");

await expect(page.getByRole("status", { name: "Loading" })).toBeVisible();
// A full goto reboots the app: after `load` it still has to run
// auto_login -> whoami -> config and pull the lazy settings route before
// SessionView mounts and this status renders. On Windows CI that chain
// takes 7s+ (nightly 31907290063, shard 24: the page mounted the messages
// query 1.4s and 1.7s after the default 5s expect gave up), so use the
// same budget the knowledge-bases loading scan already uses.
await expect(page.getByRole("status", { name: "Loading" })).toBeVisible({
timeout: TIMEOUTS.standard,
});
await page.runA11yScan("settings-messages-loading");
releaseResponse();
},
Expand Down
22 changes: 10 additions & 12 deletions src/frontend/tests/core/features/publish-flow.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { expect, test } from "../../fixtures";
import { adjustScreenView } from "../../utils/adjust-screen-view";
import { TID } from "../../utils/constants/testIds";
import { TEXTS } from "../../utils/constants/texts";
import { ANIMATIONS, TIMEOUTS } from "../../utils/constants/timeouts";
import { addComponentFromSidebar } from "../../utils/flow/add-component-from-sidebar";
import { openBlankFlow } from "../../utils/flow/open-blank-flow";
import { sendPlaygroundMessage } from "../../utils/playground/send-playground-message";

test(
"user should be able to publish a flow",
Expand Down Expand Up @@ -40,18 +40,16 @@ test(
const newPage = await pagePromise;
await newPage.waitForLoadState("domcontentloaded");

// Wait for the chat input to actually be present before filling. The
// default actionTimeout (20s) was not enough on Windows CI for the
// shareable-playground page to mount the message input.
await newPage
.getByPlaceholder(TEXTS.placeholderSendMessage)
.waitFor({ state: "visible", timeout: TIMEOUTS.long });
// Run the published flow to completion before leaving the page. The
// helper waits for the chat input (slow to mount on Windows CI), sends,
// and only returns once the Stop button has cleared. Closing the tab while
// the build was still in flight aborted the backend request mid-write; on
// SQLite that cancellation can leave a write transaction open until GC and
// stall every other writer, which is how the un-publish PATCH below hung
// for 10s+ (nightly 31907290063, shard 41). Waiting also proves the
// shareable playground actually completes a run.
await sendPlaygroundMessage(newPage, "Hello", { surface: "shareable" });
const newUrl = newPage.url();
await newPage.getByPlaceholder(TEXTS.placeholderSendMessage).fill("Hello");
await newPage.getByTestId(TID.buttonSend).last().click();

const stopButton = newPage.getByRole("button", { name: TEXTS.stop });
await stopButton.waitFor({ state: "visible", timeout: TIMEOUTS.standard });

await newPage.close();
await page.bringToFront();
Expand Down
Loading