web: wrap run titles and give applied filters a separate row

This commit is contained in:
2026-10-20 17:23:07 +01:00
parent c78def70dd
commit 35040fe13f
3 changed files with 68 additions and 17 deletions
+25 -1
View File
@@ -69,7 +69,7 @@ try {
await page.waitForSelector(".run-pipeline");
await page.click(".run-pipeline");
await page.waitForSelector("#runPrompt");
await page.fill("#runPrompt", "Scratch admission reconciliation");
await page.fill("#runPrompt", "Scratch admission reconciliation with a deliberately long title that must wrap cleanly across the run list without clipping or widening the selected row");
await page.fill("#runWorkspace", workspace);
await page.click(".run-start-confirm");
await eventually(() => page.evaluate("sessionStorage.getItem('probe-dropped') === 'yes'"));
@@ -128,6 +128,30 @@ try {
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"));
for(const width of [390,420]) {
await page.resize(width,844);
await eventually(() => page.evaluate("document.getAnimations().every(a=>a.playState!=='running')"));
const dimensions=await page.evaluate(`(() => {
const toolbar=document.querySelector('.run-toolbar').getBoundingClientRect();
const applied=document.querySelector('.run-applied-filters').getBoundingClientRect();
const title=document.querySelector('.run-row-title');
const row=document.querySelector('.run-row').getBoundingClientRect();
const scroll=document.querySelector('.run-scroll');
return {toolbarBottom:toolbar.bottom,filterTop:applied.top,titleHeight:title.getBoundingClientRect().height,lineHeight:parseFloat(getComputedStyle(title).lineHeight),whiteSpace:getComputedStyle(title).whiteSpace,rowWidth:row.width,listWidth:scroll.clientWidth,scrollWidth:scroll.scrollWidth,pageWidth:document.documentElement.scrollWidth};
})()`);
assert.ok(dimensions.filterTop>=dimensions.toolbarBottom-1);
assert.equal(dimensions.whiteSpace,'normal');
assert.ok(dimensions.titleHeight>dimensions.lineHeight*1.5);
assert.ok(Math.abs(dimensions.rowWidth-dimensions.listWidth)<1);
assert.ok(dimensions.scrollWidth<=dimensions.listWidth && dimensions.pageWidth<=width);
if(process.env.PIPELINES_CAPTURE_DIR) await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR,`wrapped-run-title-${width}.png`));
}
await page.resize(1100,844);
await page.click('.run-row');
await page.waitForSelector('.run-row.selected');
await eventually(() => page.evaluate("document.getAnimations().every(a=>a.playState!=='running')"));
assert.equal(await page.evaluate("Math.round(document.querySelector('.run-row.selected').getBoundingClientRect().width)===document.querySelector('.run-scroll').clientWidth"),true);
if(process.env.PIPELINES_CAPTURE_DIR) await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR,'full-width-selected-run.png'));
console.log("Lost launch acknowledgement + reload reconciled to the single admitted run.");
} finally {
await browser?.close();