From eba0959bd3a5123012a0dce1bb8bc59aac9e6e2b Mon Sep 17 00:00:00 2001 From: binaricat <16399091+binaricat@users.noreply.github.com> Date: Sun, 22 Nov 2026 01:03:36 +0000 Subject: [PATCH] test(qa): assert migrated records before normal chat navigation --- scripts/qa-official-windows/README.md | 5 +++++ scripts/qa-official-windows/desktop.cjs | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/qa-official-windows/README.md b/scripts/qa-official-windows/README.md index ee90d9ac9..c043d6927 100644 --- a/scripts/qa-official-windows/README.md +++ b/scripts/qa-official-windows/README.md @@ -29,6 +29,11 @@ verify the appended turn and original chats persist. Both candidate snapshots must have IndexedDB `meta.activeSessionMap` directly; legacy localStorage is not accepted as a substitute for migration evidence. +The stock panel's draft/chat display intent is memory-only. Record and capture +the initial candidate/restarted view before any navigation. If it opens the +Recent/draft view, verify the original IndexedDB active pointer first, then +select the existing chat through normal history UI. Do not call that selection +automatic restoration of the previously visible conversation. Both installers use normal silent per-user NSIS arguments. The candidate version `0.0.0-sha-9d4e90b` is below 1.1.90, so this is **not** released automatic updater diff --git a/scripts/qa-official-windows/desktop.cjs b/scripts/qa-official-windows/desktop.cjs index 5fa156707..6a5d392e5 100644 --- a/scripts/qa-official-windows/desktop.cjs +++ b/scripts/qa-official-windows/desktop.cjs @@ -401,13 +401,16 @@ async function main() { } await launch('candidate-after-install', pinned.version); panel = await aiPanel(true); - await panel.getByText('QA_BETA_REPLY_TWO', { exact: true }).waitFor({ timeout: 30000 }); const migrated = await until('IDB migration completed', async () => { const value = await snapshot(); return value.idb?.meta.some(m => m.key === 'migrationCompleted' && m.value?.migrationCompleted === true) && value; }); - report.migratedChats = await assertChats(baseline, migrated); fs.writeFileSync(path.join(evidence, 'candidate-migrated-storage.json'), JSON.stringify(migrated, null, 2)); + report.migratedChats = await assertChats(baseline, migrated); + report.candidateInitialView = { automaticallyOpenedBeta: await panel.getByText('QA_BETA_REPLY_TWO', { exact: true }).isVisible(), visibleText: await panel.innerText(), policy: 'Stock panelViewByScope is memory-only; exact persisted active pointer checked before any chat selection' }; + await screenshot('candidate-initial-view-before-history-selection'); + if (!report.candidateInitialView.automaticallyOpenedBeta) await chooseChat(panel, 'QA_BETA_USER_ONE'); + await panel.getByText('QA_BETA_REPLY_TWO', { exact: true }).waitFor(); await screenshot('03-candidate-beta-active'); await chooseChat(panel, 'QA_ALPHA_USER_ONE'); await screenshot('04-candidate-alpha'); await chooseChat(panel, 'QA_BETA_USER_ONE'); @@ -415,10 +418,13 @@ async function main() { await send(panel, 'QA_BETA_AFTER_UPGRADE'); await screenshot('05-candidate-appended'); await quit(); await launch('candidate-restarted', pinned.version); panel = await aiPanel(true); - await panel.getByText('QA_BETA_REPLY_AFTER_UPGRADE', { exact: true }).waitFor({ timeout: 30000 }); const restarted = await snapshot(); - report.restartedChats = await assertChats(baseline, restarted, true); fs.writeFileSync(path.join(evidence, 'candidate-restarted-storage.json'), JSON.stringify(restarted, null, 2)); + report.restartedChats = await assertChats(baseline, restarted, true); + report.restartInitialView = { automaticallyOpenedBeta: await panel.getByText('QA_BETA_REPLY_AFTER_UPGRADE', { exact: true }).isVisible(), visibleText: await panel.innerText(), policy: 'Report automatic view restoration separately from unchanged IndexedDB active pointer and complete persisted turns' }; + await screenshot('restarted-initial-view-before-history-selection'); + if (!report.restartInitialView.automaticallyOpenedBeta) await chooseChat(panel, 'QA_BETA_USER_ONE'); + await panel.getByText('QA_BETA_REPLY_AFTER_UPGRADE', { exact: true }).waitFor(); await screenshot('06-candidate-restarted'); report.restartPersistence = 'passed'; await quit(); event('Windows installed real GUI acceptance completed');