Skip to content

Commit

Permalink
Replace path for documentation links in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
monachilada committed Jun 20, 2024
1 parent e4b544a commit 96b2123
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/dito/tests/e2e/general.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test.describe("test links", () => {
test("links in landing page work", async ({ page }) => {
await page.goto(staticRoutes.PATH_LANDING);
await page.getByRole("link", { name: "Zur Dokumentation" }).click();
await expect(page).toHaveURL(staticRoutes.PATH_DOCUMENTATION);
await expect(page).toHaveURL(staticRoutes.PATH_DOCUMENTATION_PDF);

Check failure on line 97 in packages/dito/tests/e2e/general.spec.ts

View workflow job for this annotation

GitHub Actions / check-test-build-deploy (dito) / check-and-test-shared / check-and-test

[chromium] › general.spec.ts:94:3 › test links › links in landing page work

2) [chromium] › general.spec.ts:94:3 › test links › links in landing page work ─────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveURL(expected) Locator: locator(':root') Expected string: "http://localhost:3000/assets/digitalcheck-begleitende-dokumentation.pdf" Received string: "http://localhost:3000/" Call log: - expect.toHaveURL with timeout 5000ms - waiting for locator(':root') - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" 95 | await page.goto(staticRoutes.PATH_LANDING); 96 | await page.getByRole("link", { name: "Zur Dokumentation" }).click(); > 97 | await expect(page).toHaveURL(staticRoutes.PATH_DOCUMENTATION_PDF); | ^ 98 | }); 99 | 100 | test("links leading to external pages open in new tab", async ({ page }) => { at /home/runner/work/digitalcheck-apps/digitalcheck-apps/packages/dito/tests/e2e/general.spec.ts:97:24

Check failure on line 97 in packages/dito/tests/e2e/general.spec.ts

View workflow job for this annotation

GitHub Actions / check-test-build-deploy (dito) / check-and-test-shared / check-and-test

[chromium] › general.spec.ts:94:3 › test links › links in landing page work

2) [chromium] › general.spec.ts:94:3 › test links › links in landing page work ─────────────────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 5000ms waiting for expect(locator).toHaveURL(expected) Locator: locator(':root') Expected string: "http://localhost:3000/assets/digitalcheck-begleitende-dokumentation.pdf" Received string: "http://localhost:3000/" Call log: - expect.toHaveURL with timeout 5000ms - waiting for locator(':root') - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" - locator resolved to <html lang="en">…</html> - unexpected value "http://localhost:3000/" 95 | await page.goto(staticRoutes.PATH_LANDING); 96 | await page.getByRole("link", { name: "Zur Dokumentation" }).click(); > 97 | await expect(page).toHaveURL(staticRoutes.PATH_DOCUMENTATION_PDF); | ^ 98 | }); 99 | 100 | test("links leading to external pages open in new tab", async ({ page }) => { at /home/runner/work/digitalcheck-apps/digitalcheck-apps/packages/dito/tests/e2e/general.spec.ts:97:24
});

test("links leading to external pages open in new tab", async ({ page }) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/dito/tests/e2e/preCheck.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PDFDocument } from "pdf-lib";
import { preCheck } from "resources/content";
import {
PATH_ASSESSMENT,
PATH_DOCUMENTATION,
PATH_DOCUMENTATION_PDF,
PATH_PRECHECK,
PATH_RESULT,
} from "resources/staticRoutes";
Expand Down Expand Up @@ -473,7 +473,7 @@ test.describe("test result page", () => {
await page.getByRole("button", { name: "Übernehmen" }).click();
}
await page.getByRole("link", { name: "Dokumentation" }).click();
await expect(page).toHaveURL(PATH_DOCUMENTATION);
await expect(page).toHaveURL(PATH_DOCUMENTATION_PDF);
});

test("result page with no answers redirects to precheck", async ({
Expand Down

0 comments on commit 96b2123

Please sign in to comment.