web: open a different chat row before the L1 chat_shells assertion
The discovery loop already opened the session it found, and openChatSession keeps a loaded thread, so the assertion's second click early-returned and sent nothing once the live server listed an empty session first.
This commit is contained in:
@@ -2448,6 +2448,14 @@ try {
|
|||||||
if (openedId !== expectedSession) {
|
if (openedId !== expectedSession) {
|
||||||
console.log(` -- the live server's first session with history is ${openedId}, not ${expectedSession}`);
|
console.log(` -- the live server's first session with history is ${openedId}, not ${expectedSession}`);
|
||||||
}
|
}
|
||||||
|
// Leave the discovered session first: the loop above already opened it, and
|
||||||
|
// openChatSession keeps a loaded thread, so clicking it again would early-return
|
||||||
|
// and send nothing. Opening a different row restores a genuine fresh open.
|
||||||
|
const otherRow = candidates.find((id) => id !== openedId);
|
||||||
|
if (otherRow) {
|
||||||
|
await page.click(`#chatRows .chat-row[data-session="${otherRow}"]`);
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 600));
|
||||||
|
}
|
||||||
// Record the frames the page sends, so the C11 chat_shells fetch on open is
|
// Record the frames the page sends, so the C11 chat_shells fetch on open is
|
||||||
// asserted rather than assumed.
|
// asserted rather than assumed.
|
||||||
await page.evaluate(`(() => { window.__pipelinesSentTypes = []; return true; })()`);
|
await page.evaluate(`(() => { window.__pipelinesSentTypes = []; return true; })()`);
|
||||||
|
|||||||
Reference in New Issue
Block a user