Issue 1:
I have several fixtures files for different testcases, after upgrade the playwright version to 1.32.3, all test files not work,always show error message 'Error: test file "browser_ui/xxx/xxx_management.test.ts" should not import test file "src\fixture\myFixture.ts"'

System info

Playwright Version: [v1.32.3]

Operating System: [macOS 13.2]

Browser: [All, Chromium, Firefox, WebKit]

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

myFixture.ts

// my-test.ts
import { test as base } from '@playwright/test';
import { TodoPage } from './todo-page';
import { SettingsPage } from './settings-page';

// Declare the types of your fixtures.
type MyFixtures = {
todoPage: TodoPage;
settingsPage: SettingsPage;
};

// Extend base test by providing "todoPage" and "settingsPage".
// This new "test" can be used in multiple test files, and each of them will get the fixtures.
export const myFixture = base.extend<MyFixtures>({
todoPage: async ({ page }, use) => {
// Set up the fixture.
const todoPage = new TodoPage(page);
await todoPage.goto();
await todoPage.addToDo('item1');
await todoPage.addToDo('item2');

// Use the fixture value in the test.
await use(todoPage);

// Clean up the fixture.
await todoPage.removeAll();
},

settingsPage: async ({ page }, use) => {
await use(new SettingsPage(page));
},
});
export { expect } from '@playwright/test';

Link to the GitHub repository with the repro

[https://github.com/your_profile/playwright_issue_title]

or

Config file

// playwright.config.ts
import {PlaywrightTestConfig, devices} from "@playwright/test";
const config: PlaywrightTestConfig = {
workers: 4,
timeout: 1000 * 60 * 10,
reporter: [
["allure-playwright", {outputFolder: "./allure-results/"}],
["line"],
],
use: {
trace: "retain-on-failure",
headless: false,
screenshot: {
mode: "only-on-failure",
fullPage: true,
}
},
projects: [
{
name: "XXXXX",
use: {
channel: "chrome",
...devices["Desktop Chrome"],
acceptDownloads:true,
viewport: {width: 1920, height: 937}
},
}
]
};
export default config;

Test file (self-contained)

myFixture('should check the box using setChecked', async ({ page,settingsPage }) => {
await settingsPage.setContent(`<input id='checkbox' type='checkbox'></input>`);

});

Steps

[Run the test]

[...]

Expected

[Describe expected behavior]

Actual

[Describe actual behavior]

Issue 2:
System info

Playwright Version: [v1.33]

Operating System: [Windows 11, Ubuntu 22]

Browser: [WebKit]

Source code

I provided exact source code that allows reproducing the issue locally.

Test file (self-contained)

test("doc + xhr", async ({ page }) => {
await page.route("**/*", (route, req) => {
if (req.isNavigationRequest() && req.resourceType() === "document") {
return route.fulfill({
body: `
<!DOCTYPE html>
<html>
<head>
<title>Hi</title>
</head>
<body>
</body>
</html>
`,
contentType: "text/html"
});
}
route.fulfill();
});

await page.goto("http://test.local/page.html");
expect(await page.title()).toBe("Hi");

await page.evaluate(() => {
const x = new XMLHttpRequest();
x.open("GET", location.href, false);
x.send();
});

await page.waitForTimeout(1000);
});

Steps

[Run the test] Passes on chromium and firefox

Fails on webkit

Expected

Should also pass on webkit

Actual

Fails only on webkit

[Describe actual behavior]

Test does the following:

Loads an html page, and then dispatches an xhr to the same url as the page is on.

When that xhr is intercepted, it is treated as navigation and document request, instead of an xhr.

On chrome and firefox this doesn't happen.