Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

test(reading): distinguish navigator entries from breadcrumbs

Bingxi Zhao (Frank)da9b3f002333
diff --git a/web/tests/e2e/reading-location-history.audit.ts b/web/tests/e2e/reading-location-history.audit.ts
index d8fbd839f..e85546a28 100644
--- a/web/tests/e2e/reading-location-history.audit.ts
+++ b/web/tests/e2e/reading-location-history.audit.ts
@@ -206,7 +206,7 @@ test("back and forward cross materials, survive reload, and stay session-scoped"
await page.getByRole("button", { name: "History material A second" }).click();
await expect(page.getByText("History A2 text.")).toBeVisible();
- await page.getByRole("button", { name: "History material B" }).click();
+ await page.locator(".dt-reading-navigator").getByRole("button", { name: "History material B" }).click();
await expect(page.getByText("History B1 text.")).toBeVisible();
await page.getByRole("button", { name: "Back", exact: true }).click();
@@ -220,7 +220,7 @@ test("back and forward cross materials, survive reload, and stay session-scoped"
await page.goto(`/learning/reading/${WORKSPACE_ID}/sessions/${SESSION_TWO}`, { waitUntil: "domcontentloaded" });
// A fresh load starts with the contents navigator collapsed (v1.6.10).
await page.getByRole("button", { name: "Expand contents", exact: true }).click();
- await page.getByRole("button", { name: "History material B", exact: true }).click();
+ await page.locator(".dt-reading-navigator").getByRole("button", { name: "History material B", exact: true }).click();
await expect(
page.getByRole("button", { name: "Back", exact: true }),
).toBeDisabled();