forked from longtao.wu/droboticflow
🐛 Wait for Fanyu Capture selector options
This commit is contained in:
parent
b7eb013782
commit
566802093e
@ -248,6 +248,16 @@ async function exerciseHierarchyCascade(page, fixture) {
|
||||
await page.waitForURL((url) => url.searchParams.get("workflowId") === workflowId, { timeout: 30_000 });
|
||||
|
||||
const captureSelect = await unique(page.getByLabel("3. Capture 子目录", { exact: true }), "cascade Capture selector");
|
||||
let captureReady = false;
|
||||
for (let attempt = 0; attempt < 60; attempt += 1) {
|
||||
const options = await captureSelect.locator("option").allTextContents();
|
||||
if (options.includes(captureDirectory)) {
|
||||
captureReady = true;
|
||||
break;
|
||||
}
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
if (!captureReady) throw new Error(`Capture option ${captureDirectory} did not load after workflow selection`);
|
||||
await captureSelect.selectOption(captureDirectory, { timeout: 30_000 });
|
||||
await page.waitForURL((url) => url.searchParams.get("capture") === captureDirectory, { timeout: 30_000 });
|
||||
|
||||
@ -424,7 +434,7 @@ async function inspectRoleWorkbench({ name, emailName, passwordName, allowedRole
|
||||
const pageDiagnostics = watchPage(page, `${name}-workbench`);
|
||||
try {
|
||||
await page.goto(annotationURL(route, fixture), { waitUntil: "domcontentloaded", timeout: 60_000 });
|
||||
await unique(page.getByRole("heading", { name: expectedText, exact: true }), `${name} workbench title`);
|
||||
await unique(page.getByRole("link", { name: expectedText, exact: true }), `${name} workbench navigation`);
|
||||
const pool = await locateFixturePool(page, fixture, { acceptance: name === "acceptance" });
|
||||
const hierarchy = await assertHierarchy(page, fixture, { taskRequired: name !== "acceptance" });
|
||||
if (name === "annotator") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user