Files
pikasTech-HWLAB/web/hwlab-cloud-web/tests/workbench-e2e/specs/deep-link.spec.ts
T

14 lines
890 B
TypeScript

import { expect, fakeServerState, gotoWorkbench, saveScreenshot, test } from "../fixtures/test";
import { selectors, sessionTab } from "../fixtures/selectors";
test.use({ scenarioId: "deep-link" });
test("deep link hydrates the same authority path as tab selection", async ({ page }, testInfo) => {
await gotoWorkbench(page, "/workbench/sessions/cnv_failed?projectId=prj_hwpod_workbench");
await expect(page.locator(sessionTab("cnv_failed"))).toHaveAttribute("data-active", "true");
await expect(page.locator(`${selectors.messageCard}[data-role="agent"][data-status="failed"]`)).toContainText("缺少受控依赖");
await expect(page.locator(`${selectors.traceTimeline}[data-status="failed"]`)).toBeVisible();
await expect.poll(async () => (await fakeServerState(page)).selectedConversationId).toBe("cnv_failed");
await saveScreenshot(page, testInfo, "deep-link-failed");
});