Skip to content

Commit

Permalink
feat(e2e): add tests for seo url (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
kstala authored Jul 18, 2023
1 parent ff9155d commit 16c4202
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions apps/e2e-tests/tests/checkForSeoUrl.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { test, expect, request } from "@playwright/test";
import { HomePage } from "../page-objects/HomePage";

test.describe.only("Check for seo-url requests", () => {
let homePage: HomePage;

// Before Hook
test.beforeEach(async ({ page }) => {
homePage = new HomePage(page);
await homePage.visitMainPage();
});

test("should not show any seo-url requests during internal navigation", async ({ page }) => {
let SeoUrlRequest = false;
page.on("request", (request) => {
if (request.url().includes("seo-url")) SeoUrlRequest = true;
});

await homePage.visitMainPage();
await page.waitForLoadState("networkidle");
await expect(SeoUrlRequest).toBe(false);
await homePage.openCartPage();
await page.waitForLoadState("networkidle");
await expect(SeoUrlRequest).toBe(false);
await page
.getByRole("link", { name: "Summer Trends", exact: true })
.click();
await page.waitForLoadState("networkidle");
await expect(SeoUrlRequest).toBe(false);
});
});

2 comments on commit 16c4202

@vercel
Copy link

@vercel vercel bot commented on 16c4202 Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

frontends-demo – ./templates/vue-demo-store

frontends-demo-shopware-frontends.vercel.app
frontends-demo-git-main-shopware-frontends.vercel.app
frontends-demo.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 16c4202 Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.