feat(workbench): integrate runtime data and map tooling
This commit is contained in:
@@ -4,7 +4,7 @@ test("Dev Panel opens as a floating desktop panel and closes with Escape", async
|
||||
await page.goto("/", { waitUntil: "domcontentloaded" });
|
||||
await page.waitForFunction(() => Boolean(window.__waterNetworkMap));
|
||||
await page.waitForFunction(() => Boolean(
|
||||
window.__waterNetworkMap?.getLayer("scada-hit")
|
||||
window.__waterNetworkMap?.getLayer("scada-pressure-hit")
|
||||
));
|
||||
const trigger = page.getByRole("button", { name: "切换地图 Dev Panel" });
|
||||
await expect(trigger).toBeVisible();
|
||||
@@ -33,6 +33,13 @@ test("Dev Panel opens as a floating desktop panel and closes with Escape", async
|
||||
await panel.getByRole("button", { name: "开启水流" }).click();
|
||||
await expect(panel.getByRole("button", { name: "关闭水流" })).toBeEnabled();
|
||||
|
||||
const sourceSelect = panel.getByRole("combobox", { name: "业务源" });
|
||||
await sourceSelect.click();
|
||||
await expect(page.getByRole("option", { name: "管线", exact: true })).toBeVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(panel).toBeVisible();
|
||||
await expect(sourceSelect).toBeFocused();
|
||||
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(panel).toBeHidden();
|
||||
});
|
||||
@@ -54,7 +61,8 @@ test("labels remain active per business group and clear globally", async ({ page
|
||||
const panel = page.getByTestId("map-dev-panel");
|
||||
const apply = panel.getByRole("button", { name: "应用标注", exact: true });
|
||||
await apply.click();
|
||||
await panel.getByLabel("业务图层组").selectOption("junctions");
|
||||
await panel.getByRole("combobox", { name: "业务图层组" }).click();
|
||||
await page.getByRole("option", { name: "节点", exact: true }).click();
|
||||
await apply.click();
|
||||
|
||||
await expect.poll(() => page.evaluate(() => ({
|
||||
|
||||
Reference in New Issue
Block a user