web: unify mobile back and audit controls and link pipeline run history
This commit is contained in:
@@ -91,6 +91,43 @@ try {
|
||||
if (process.env.PIPELINES_CAPTURE_DIR) {
|
||||
await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR, "single-admitted-run.png"));
|
||||
}
|
||||
const runId = await page.evaluate("Number(location.pathname.split('/')[2])");
|
||||
assert.equal((await fetch(`http://${target}/complete-fixture`, { method: "POST" })).status, 204);
|
||||
await page.goto(`http://127.0.0.1:${port}/runs/${runId}/stage/work`);
|
||||
await page.waitForSelector(".stage-pane-back");
|
||||
const back = await page.evaluate("(() => { const b=document.querySelector('.stage-pane-back'); const r=b.getBoundingClientRect(); return {width:r.width,height:r.height,svg:!!b.querySelector('svg'),text:b.textContent}; })()");
|
||||
assert.equal(Math.round(back.width), 48);
|
||||
assert.equal(Math.round(back.height), 48);
|
||||
assert.equal(back.svg, true);
|
||||
assert.equal(back.text, "");
|
||||
await page.click(".audit-open");
|
||||
await page.waitForSelector(".audit-viewer");
|
||||
for (const width of [390, 420]) {
|
||||
await page.resize(width, 844);
|
||||
await eventually(() => page.evaluate("document.querySelector('.audit-viewer').getAnimations({subtree:true}).every(a => a.playState !== 'running')"));
|
||||
const measured = await page.evaluate("(() => { const v=document.querySelector('.audit-panel'); const tab=v.querySelector('.audit-tab.active'); const b=v.querySelector('.audit-back'); return {radius:getComputedStyle(tab).borderRadius,tabHeight:tab.getBoundingClientRect().height,backWidth:b.getBoundingClientRect().width,backHeight:b.getBoundingClientRect().height,panelWidth:v.getBoundingClientRect().width,pageWidth:document.documentElement.scrollWidth}; })()");
|
||||
assert.equal(measured.radius, "0px");
|
||||
assert.ok(Math.round(measured.tabHeight) >= 48);
|
||||
assert.equal(Math.round(measured.backWidth), 48);
|
||||
assert.equal(Math.round(measured.backHeight), 48);
|
||||
assert.ok(measured.pageWidth <= width && measured.panelWidth <= width);
|
||||
if (process.env.PIPELINES_CAPTURE_DIR) {
|
||||
await eventually(() => page.evaluate("document.querySelector('.audit-viewer').getAnimations({subtree:true}).every(a => a.playState !== 'running')"));
|
||||
await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR, `mobile-audit-${width}.png`));
|
||||
}
|
||||
}
|
||||
await page.click(".audit-back");
|
||||
await page.click(".stage-pane-back");
|
||||
await page.goto(pipeline);
|
||||
await page.waitForSelector(".pipeline-runs");
|
||||
await page.click(".pipeline-runs");
|
||||
await eventually(() => page.evaluate(`location.pathname === '/runs' && location.search === '?pipeline=${pipelineId}'`));
|
||||
await page.waitForSelector(".pipeline-filter-chip");
|
||||
assert.equal(await page.evaluate("document.querySelectorAll('.list.runs .run-row').length"), 1);
|
||||
await page.goto(`http://127.0.0.1:${port}/runs?pipeline=${pipelineId}`);
|
||||
await page.waitForSelector(".pipeline-filter-chip");
|
||||
assert.equal(await page.evaluate("document.querySelectorAll('.list.runs .run-row').length"), 1);
|
||||
if (process.env.PIPELINES_CAPTURE_DIR) await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR, "pipeline-filtered-runs.png"));
|
||||
console.log("Lost launch acknowledgement + reload reconciled to the single admitted run.");
|
||||
} finally {
|
||||
await browser?.close();
|
||||
|
||||
Reference in New Issue
Block a user