forked from longtao.wu/droboticflow
🧪 Verify continuous-work intent across layout switches
This commit is contained in:
parent
a575373167
commit
6acc5803ae
@ -67,6 +67,38 @@ try {
|
||||
await page.getByRole("button", { name: "继续工作", exact: true }).click();
|
||||
const workbench = page.getByTestId("capture-annotation-workbench");
|
||||
await workbench.waitFor();
|
||||
const continuousWork = page.getByRole("region", { name: "连续工作", exact: true });
|
||||
const activeTaskURL = page.url();
|
||||
await continuousWork.getByRole("button", { name: "开始连续工作", exact: true }).click();
|
||||
for (const switchLabel of ["切回原布局", "进入专注视图"]) {
|
||||
await page.getByRole("button", { name: switchLabel, exact: true }).click();
|
||||
assert.match(await continuousWork.innerText(), /连续工作中:真实送检成功后继续下一条/);
|
||||
assert.ok(
|
||||
await continuousWork.getByRole("button", { name: "完成当前任务后停止", exact: true }).isVisible(),
|
||||
"continuous intent survives each layout switch in the recovered session",
|
||||
);
|
||||
assert.equal(page.url(), activeTaskURL, "continuous-mode toggle keeps the same task");
|
||||
assert.equal(writes.length, 0, "continuous-mode layout switch never claims or writes");
|
||||
}
|
||||
await continuousWork.getByRole("button", { name: "完成当前任务后停止", exact: true }).click();
|
||||
for (const switchLabel of ["切回原布局", "进入专注视图"]) {
|
||||
await page.getByRole("button", { name: switchLabel, exact: true }).click();
|
||||
assert.match(await continuousWork.innerText(), /已设置完成当前任务后停止;不会再领取下一条/);
|
||||
assert.ok(
|
||||
await continuousWork.getByRole("button", { name: "恢复连续工作", exact: true }).isVisible(),
|
||||
"stop-after-current stays selected after each layout switch",
|
||||
);
|
||||
assert.equal(
|
||||
await continuousWork.getByRole("button", { name: "完成当前任务后停止", exact: true }).count(),
|
||||
0,
|
||||
"layout switching does not silently re-enable continuous work",
|
||||
);
|
||||
assert.equal(page.url(), activeTaskURL, "stop-after-current keeps the same task");
|
||||
assert.equal(writes.length, 0, "stopped layout switch never claims or writes");
|
||||
}
|
||||
console.log(
|
||||
"PASS recovered-session continuous intent and stop-after-current survive both layout directions without claims",
|
||||
);
|
||||
await page.waitForFunction(
|
||||
() =>
|
||||
[...document.querySelectorAll("video")].length === 2 &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user