From 266afb17c8db7037b0e22e7c12a3c61b33245133 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Tue, 23 Jul 2024 10:44:12 -0300 Subject: [PATCH] Expand internal file markdown test case Additionally to navigate the file links we should guarantee that circling back to the source without a path shouldn't break navigation. --- tests/e2e/project.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/e2e/project.spec.ts b/tests/e2e/project.spec.ts index 0ca8ec374..2dc1b6ade 100644 --- a/tests/e2e/project.spec.ts +++ b/tests/e2e/project.spec.ts @@ -523,6 +523,13 @@ test("internal file markdown link", async ({ page }) => { await expect(page).toHaveURL(`${markdownUrl}/tree/main/cheatsheet.md`); await expect(page.getByText("cheatsheet.md").nth(2)).toBeVisible(); + await page.goto(markdownUrl); + await page.getByRole("link", { name: "Link Files" }).click(); + await page.getByRole("button", { name: "Files", exact: true }).click(); + await page.getByRole("link", { name: "Link Files" }).click(); + await expect(page).toHaveURL(`${markdownUrl}/tree/link-files.md`); + await expect(page.getByText("link-files.md").nth(2)).toBeVisible(); + await page.goto(`${markdownUrl}/tree/main/link-files.md`); await page.getByRole("link", { name: "black square" }).click(); await expect(page).toHaveURL(