-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2e): add tests for seo url (#326)
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
16c4202
There was a problem hiding this comment.
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
16c4202
There was a problem hiding this comment.
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:
shopware-frontends-docs – ./
shopware-frontends-docs-shopware-frontends.vercel.app
shopware-frontends-docs-git-main-shopware-frontends.vercel.app
frontends.shopware.com
shopware-frontends-docs.vercel.app