Skip to content

Commit

Permalink
Add tests for interoperabel page
Browse files Browse the repository at this point in the history
  • Loading branch information
mpanne committed Mar 3, 2025
1 parent 039a6b9 commit cc84a28
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions tests/e2e/interoperabelPage.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { expect, test } from "@playwright/test";
import {
ROUTE_INTEROPERABILITY,
ROUTE_PRECHECK,
} from "~/resources/staticRoutes";

test.describe("test interoperabel landing page", () => {
test.beforeEach("Go to interoperabel landing page", async ({ page }) => {
await page.goto(ROUTE_INTEROPERABILITY.url);
});

test("links to pre-check", async ({ page }) => {
await page.getByRole("link", { name: "Zur Vorprüfung" }).click();
await expect(page).toHaveURL(ROUTE_PRECHECK.url);
await expect(page.getByRole("main")).toContainText(
"Vorprüfung: Digitalbezug einschätzen",
);
});

[
{
name: "Verordnung für ein interoperables Europa (EU 2024/903)",
href: "https://eur-lex.europa.eu/legal-content/DE/TXT/?uri=CELEX%3A32024R0903",
},
{
name: "EUR-Lex - Verordnung für ein interoperables Europa EU 2024/903",
href: "https://eur-lex.europa.eu/legal-content/DE/TXT/?uri=CELEX%3A32024R0903",
},
{
name: "Ressourcen auf dem Interoperable Europe Portal",
href: "https://interoperable-europe.ec.europa.eu/",
},
{
name: "Interoperabilitätsrahmen",
href: "https://interoperable-europe.ec.europa.eu/collection/nifo-national-interoperability-framework-observatory/solution/european-interoperability-framework-eif-toolbox",
},
{
name: "Richtlinien Interoperabilitätsbewertungen",
href: "https://interoperable-europe.ec.europa.eu/collection/assessments/assessment-guidelines",
},
{
name: "Interoperable Europe Portal - FAQs",
href: "https://interoperable-europe.ec.europa.eu/interoperable-europe/faqs",
},
{
name: "European Commission - European Interoperability Framework",
href: "https://ec.europa.eu/isa2/eif_en/",
},
{
name: "Guidelines for interoperability assessments",
href: "https://interoperable-europe.ec.europa.eu/collection/assessments/assessment-guidelines",
},
].forEach(({ name, href }) => {
test(`link "${name}" has href "${href}"`, async ({ page }) => {
const links = await page.getByRole("link", { name: name }).all();

for (const link of links) {
await expect(link).toHaveAttribute("href", href);
}
});
});
});

0 comments on commit cc84a28

Please sign in to comment.