-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
When I run this script, a 2nd window opens up and lands on my login page. Is that supposed to happen? I can't tell if axe is checking against my login page or the page I want it to in the test.
import { test, expect, type Page } from "@playwright/test";
import { LoginPage } from "@pom/login";
import { ROLE_TYPE } from "user";
import { checkA11y, injectAxe } from "axe-playwright";
test.describe("Uploads Accessibility", () => {
let page: Page;
let loginPage: LoginPage;
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
loginPage = new LoginPage(page);
await loginPage.goto();
await loginPage.login(ROLE_TYPE.STANDARD);
});
test.afterAll(async () => {
await page.close();
});
test("Check Segments Page For Accessibility Issues", async ({ page }) => {
await page.goto("/urltotest");
await injectAxe(page);
// here is where 2nd page opens up
await checkA11y(page, null, {
detailedReport: true,
detailedReportOptions: { html: true },
});
});
});
Metadata
Metadata
Assignees
Labels
No labels