Skip to content

Commit

Permalink
test: avoid hardcoding string
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Jun 21, 2024
1 parent 73555f1 commit f1f6759
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/app/analytics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ if (process.env.NUXT_PUBLIC_MATOMO_BASE_URL && process.env.NUXT_PUBLIC_MATOMO_ID

test.describe("analytics service", () => {
test("should track page views", async ({ createIndexPage }) => {
const { indexPage } = await createIndexPage(defaultLocale);
const { indexPage, i18n } = await createIndexPage(defaultLocale);
const { page } = indexPage;
const initialResponsePromise = page.waitForResponse(baseUrl);
await indexPage.goto();
const initialResponse = await initialResponsePromise;
expect(initialResponse.status()).toBe(204);

const responsePromise = page.waitForResponse(baseUrl);
await page.getByRole("link", { name: "Imprint" }).click();
await page.getByRole("link", { name: i18n.t("AppFooter.links.imprint") }).click();
const response = await responsePromise;
expect(response.status()).toBe(204);
});
Expand Down

0 comments on commit f1f6759

Please sign in to comment.