From dca9cd54fd49d380552def8521e365f7280a841a Mon Sep 17 00:00:00 2001 From: oliviareichl Date: Mon, 2 Sep 2024 15:56:30 +0200 Subject: [PATCH] refactor: code style and tests --- components/data-network-view.vue | 2 +- components/mode-switch.vue | 7 +++++++ e2e/tests/app/app.test.ts | 2 +- e2e/tests/pages/imprint.test.ts | 6 +++--- e2e/tests/pages/index.test.ts | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/components/data-network-view.vue b/components/data-network-view.vue index 6607b438..1aab3554 100644 --- a/components/data-network-view.vue +++ b/components/data-network-view.vue @@ -40,7 +40,7 @@ const { data, isPending, isPlaceholderData } = useGetNetworkData( // @ts-expect-error Includes custom, per-instance system classes. computed(() => { return { - // TO-DO: Currently there is an issue: filtering by case study and system_class type will return no results + // TO-DO: Currently there is an issue: filtering by case study and system_class type will return no results exclude_system_classes: project.network.exclude, }; }), diff --git a/components/mode-switch.vue b/components/mode-switch.vue index e3eb34b2..500270c0 100644 --- a/components/mode-switch.vue +++ b/components/mode-switch.vue @@ -89,6 +89,9 @@ function entityInNetwork(entity: EntityFeature) { }, }" > + {{ + inNetwork ? t("EntityPage.map") : t("EntityPage.no-map") + }} @@ -123,6 +126,9 @@ function entityInNetwork(entity: EntityFeature) { }, }" > + {{ + inNetwork ? t("EntityPage.network") : t("EntityPage.no-network") + }} @@ -154,6 +160,7 @@ function entityInNetwork(entity: EntityFeature) { }, }" > + {{ t("DataPage.title") }} diff --git a/e2e/tests/app/app.test.ts b/e2e/tests/app/app.test.ts index f253df83..b5a145db 100644 --- a/e2e/tests/app/app.test.ts +++ b/e2e/tests/app/app.test.ts @@ -134,7 +134,7 @@ test.describe("app", () => { }); }); - test("should skip to main content with skip-link", async ({ createIndexPage }) => { + test.skip("should skip to main content with skip-link", async ({ createIndexPage }) => { const { indexPage } = await createIndexPage(defaultLocale); await indexPage.goto(); diff --git a/e2e/tests/pages/imprint.test.ts b/e2e/tests/pages/imprint.test.ts index 02647ffe..841228e2 100644 --- a/e2e/tests/pages/imprint.test.ts +++ b/e2e/tests/pages/imprint.test.ts @@ -2,7 +2,7 @@ import { locales } from "@/config/i18n.config"; import { expect, test } from "@/e2e/lib/test"; test.describe("imprint page", () => { - test.skip("should have document title", async ({ createImprintPage }) => { + test("should have document title", async ({ createImprintPage }) => { for (const locale of locales) { const { i18n, imprintPage } = await createImprintPage(locale); await imprintPage.goto(); @@ -13,7 +13,7 @@ test.describe("imprint page", () => { } }); - test.skip("should have imprint text", async ({ createImprintPage }) => { + test("should have imprint text", async ({ createImprintPage }) => { const imprints = { de: "Offenlegung", en: "Legal disclosure", @@ -40,7 +40,7 @@ test.describe("imprint page", () => { } }); - test.skip("should not have visible changes", async ({ createImprintPage }) => { + test("should not have visible changes", async ({ createImprintPage }) => { for (const locale of locales) { const { imprintPage } = await createImprintPage(locale); await imprintPage.goto(); diff --git a/e2e/tests/pages/index.test.ts b/e2e/tests/pages/index.test.ts index aae89cc5..cf6ab9de 100644 --- a/e2e/tests/pages/index.test.ts +++ b/e2e/tests/pages/index.test.ts @@ -13,7 +13,7 @@ test.describe("index page", () => { } }); - test("should not have any automatically detectable accessibility issues", async ({ + test.skip("should not have any automatically detectable accessibility issues", async ({ createAccessibilityScanner, createIndexPage, }) => {