web: unify mobile back and audit controls and link pipeline run history
This commit is contained in:
@@ -92,8 +92,23 @@ try {
|
||||
await page.click(".chat-back");
|
||||
await page.waitForSelector("#chatRows");
|
||||
assert.equal(await page.evaluate("document.querySelector('#chatRows').scrollTop"), scroll);
|
||||
// Activity changes color in place; it must not move the harness mark or add a
|
||||
// Streaming label to the row.
|
||||
const iconRect = await page.evaluate(`(() => { const icon=document.querySelector('#chatRows .chat-row[data-session="${sessionId}"] .chat-backend-logo'); window.__icon=icon; const r=icon.getBoundingClientRect(); return [r.x,r.y,r.width,r.height]; })()`);
|
||||
await emit({ message_id:"msg_answer",kind:"step",step:{status:"started"} });
|
||||
assert.equal(await page.evaluate("window.__icon.dataset.activity"), "streaming");
|
||||
assert.equal(await page.evaluate("document.querySelectorAll('#chatRows .chat-activity-streaming').length"), 0);
|
||||
assert.deepEqual(await page.evaluate("(() => { const r=window.__icon.getBoundingClientRect(); return [r.x,r.y,r.width,r.height]; })()"), iconRect);
|
||||
await emit({ message_id:"msg_answer",kind:"step",step:{status:"ended"} });
|
||||
await page.evaluate(`document.querySelector('#chatRows .chat-row[data-session="${sessionId}"] .chat-session-button').click()`);
|
||||
await page.waitForSelector("#chatInput");
|
||||
await page.waitForSelector("#chatTranscript");
|
||||
await page.evaluate("(() => { const t=document.querySelector('#chatTranscript'); t.dispatchEvent(new WheelEvent('wheel',{deltaY:-240,bubbles:true})); t.scrollTop=0; t.dispatchEvent(new Event('scroll')); })()");
|
||||
await page.fill("#chatInput", "New message must scroll into view");
|
||||
await page.click("#chatSend");
|
||||
await eventually(() => page.evaluate("(() => { const t=document.querySelector('#chatTranscript'); return t.textContent.includes('New message must scroll into view') && t.scrollHeight-t.scrollTop-t.clientHeight<3; })()"));
|
||||
assert.deepEqual(await page.evaluate("window.__errors"), []);
|
||||
console.log("Model dialog focus, intermediate/terminal steps, keyboard composer identity/caret and Back scroll restoration passed.");
|
||||
console.log("Model dialog, stable activity mark, keyboard/caret, Back restoration and send-to-bottom passed.");
|
||||
} finally {
|
||||
await browser?.close();
|
||||
serve.kill("SIGTERM");
|
||||
|
||||
Reference in New Issue
Block a user