From a85c4e72cbb79a25d8b0f2620754e8995b3753a2 Mon Sep 17 00:00:00 2001 From: duang777 Date: Sat, 24 Oct 2026 13:48:44 +0800 Subject: [PATCH] fix(tests): close analysis explicitly before changing its scope Escape correctly dismisses an open context-help popover before its parent reader. Use the close control and wait for the analysis reader to disappear before asserting that selecting an unanalysed source does not open or execute analysis. Signed-off-by: duang777 --- examples/personal-workspace-browser/research-history.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/personal-workspace-browser/research-history.mjs b/examples/personal-workspace-browser/research-history.mjs index ccdec6dc2a..cbc7ac2622 100644 --- a/examples/personal-workspace-browser/research-history.mjs +++ b/examples/personal-workspace-browser/research-history.mjs @@ -927,7 +927,8 @@ Path(sys.argv[1]).write_text(json.dumps({'goal_id':goal,'display_name':'Syntheti assert.match(await progress.innerText(), /原生测量.*未采集/); await history.getByRole("button", {name: "查看分析", exact: true}).click(); await analysis.locator("header p").first().filter({hasText: /^Synthetic analysis C$/}).waitFor(); - await analysis.press('Escape'); + await analysis.getByRole('button', {name: '关闭分析', exact: true}).click(); + await analysis.waitFor({state: 'hidden'}); await progress.getByRole('combobox').selectOption('d'.repeat(64)); await progress.locator(`.research-progress-scope[data-pack-id="${"d".repeat(64)}"]`).waitFor(); await progress.locator('.research-progress-basis > summary').click();