web: smoke — the run graph has no note and fills the tab
The layout smoke still asserted the guidance paragraph the operator asked to remove; assert its absence and a graph viewport of at least half the window, and keep the pipeline graph's own note check.
This commit is contained in:
+13
-7
@@ -1950,8 +1950,8 @@ try {
|
||||
await page.evaluate(`document.querySelector(".detail")?.scrollIntoView({ block: "start" })`);
|
||||
await shot("07-pipeline-source.png");
|
||||
|
||||
// 8. Graph tab (P6): the guidance note plus the rendered workflow graph —
|
||||
// stage nodes in declaration order, labelled outcome edges, the success and
|
||||
// 8. Graph tab (P6): the rendered workflow graph — stage nodes in declaration
|
||||
// order, labelled outcome edges, the success and
|
||||
// failure terminals — then an opened definition pane, the zoom/pan clamps and
|
||||
// the expanded panel. Every assertion below is a real behaviour of the page.
|
||||
step("opening the Graph tab: the rendered workflow graph (P6)");
|
||||
@@ -2733,12 +2733,18 @@ try {
|
||||
await page.click('.list.runs .run-row-meta[data-run-id="438"]');
|
||||
await page.waitForSelector("#detailTitle", { timeout: 25000 });
|
||||
await clickDetailTab("Graph");
|
||||
await page.waitForSelector(".run-detail .graph-note", { timeout: 15000 });
|
||||
const runGraphNote = await text(".run-detail .graph-note");
|
||||
if (!runGraphNote.includes("pulses with its elapsed time")) {
|
||||
throw new Error(`unexpected run graph note: ${runGraphNote}`);
|
||||
}
|
||||
await page.waitForSelector(".run-detail .graph-node", { timeout: 15000 });
|
||||
// The run graph has no guidance paragraph (operator request) and fills most of
|
||||
// the tab body rather than a fixed strip.
|
||||
if (await page.evaluate(`!!document.querySelector(".run-detail .graph-note")`)) {
|
||||
throw new Error("the run graph still renders its guidance paragraph");
|
||||
}
|
||||
const runGraphHeight = await page.evaluate(
|
||||
`Math.round(document.querySelector(".run-detail .graph-viewport")?.getBoundingClientRect().height ?? 0)`,
|
||||
);
|
||||
if (runGraphHeight < Math.round(0.5 * 900)) {
|
||||
throw new Error(`the run graph viewport is only ${runGraphHeight}px tall`);
|
||||
}
|
||||
await eventually(async () => {
|
||||
const current = await graphState();
|
||||
return current != null && current.scale > 0;
|
||||
|
||||
Reference in New Issue
Block a user