Skip to content
Merged
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
18 changes: 11 additions & 7 deletions e2e/stu376-composer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import {

const COMPOSER_DEFAULT_PROMPT = "A circular progress gauge with a gradient stroke";
const GAUGE_COMPLETION = " and an animated percentage label";
// Catching a demo window races the demo's real-time clock: the hold alone is
// ~5s, and page init on a loaded worker adds seconds before the first poll.
// The catch budget must cover both, not just the window being observed.
const DEMO_CATCH_TIMEOUT_MS = 20000;
const IMAGE_UPLOAD_ENDPOINT = `${ENDPOINTS.buildship}/service/runpipeline-image`;

const viewports = [
Expand Down Expand Up @@ -444,7 +448,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
COMPOSER_DEFAULT_PROMPT,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

// The takeover lands the complete shipped prompt — the same end state as
Expand Down Expand Up @@ -483,7 +487,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
COMPOSER_DEFAULT_PROMPT,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

// The demo's text is demo-owned, not a draft: the first real edit clears
Expand Down Expand Up @@ -513,7 +517,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
COMPOSER_DEFAULT_PROMPT,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

// Deleting into a demo-owned field removes the demo's text: the native
Expand Down Expand Up @@ -541,7 +545,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
COMPOSER_DEFAULT_PROMPT,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

// A pointer takeover means "edit what I clicked": the restore lands the
Expand Down Expand Up @@ -583,7 +587,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
COMPOSER_DEFAULT_PROMPT,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

// Switching surfaces is a system cancellation, not a user takeover: the
Expand Down Expand Up @@ -619,7 +623,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
undefined,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

await page.evaluate(() => window.switchView("account"));
Expand Down Expand Up @@ -651,7 +655,7 @@ test.describe("STU-445 hero composer behaviour", () => {
);
},
COMPOSER_DEFAULT_PROMPT,
{ timeout: 8000 },
{ timeout: DEMO_CATCH_TIMEOUT_MS },
);

// Flip the preference mid-demo: the reduced-motion listener must end the
Expand Down
Loading