<p dir="auto">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"'</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.32.3]</li>
<li>Operating System: [macOS 13.2]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.<br>
myFixture.ts</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// 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 &quot;todoPage&quot; and &quot;settingsPage&quot;.
// This new &quot;test&quot; can be used in multiple test files, and each of them will get the fixtures.
export const myFixture = base.extend&lt;MyFixtures&gt;({
  todoPage: async ({ page }, use) =&gt; {
    // 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) =&gt; {
    await use(new SettingsPage(page));
  },
});
export { expect } from '@playwright/test';"><pre class="notranslate"><code class="notranslate">// 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&lt;MyFixtures&gt;({
  todoPage: async ({ page }, use) =&gt; {
    // 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) =&gt; {
    await use(new SettingsPage(page));
  },
});
export { expect } from '@playwright/test';
</code></pre></div>




<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto">[https://github.com/your_profile/playwright_issue_title]</p>
<p dir="auto">or</p>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import {PlaywrightTestConfig, devices} from &quot;@playwright/test&quot;;
const config: PlaywrightTestConfig = {
    workers: 4,
    timeout: 1000 * 60  * 10,
    reporter: [
        [&quot;allure-playwright&quot;, {outputFolder: &quot;./allure-results/&quot;}],
        [&quot;line&quot;],
    ],
    use: {
        trace: &quot;retain-on-failure&quot;,
        headless: false,
        screenshot: {
            mode: &quot;only-on-failure&quot;,
            fullPage: true,
        }
    },
    projects: [
        {
            name: &quot;XXXXX&quot;,
            use: {
                channel: &quot;chrome&quot;,
                ...devices[&quot;Desktop Chrome&quot;],
                acceptDownloads:true,
                viewport: {width: 1920, height: 937}
            },
        }
    ]
};
export default config;"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-v">PlaywrightTestConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"@playwright/test"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">config</span>: <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-c1">workers</span>: <span class="pl-c1">4</span><span class="pl-kos">,</span>
    <span class="pl-c1">timeout</span>: <span class="pl-c1">1000</span> <span class="pl-c1">*</span> <span class="pl-c1">60</span>  <span class="pl-c1">*</span> <span class="pl-c1">10</span><span class="pl-kos">,</span>
    <span class="pl-c1">reporter</span>: <span class="pl-kos">[</span>
        <span class="pl-kos">[</span><span class="pl-s">"allure-playwright"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">outputFolder</span>: <span class="pl-s">"./allure-results/"</span><span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-kos">[</span><span class="pl-s">"line"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">trace</span>: <span class="pl-s">"retain-on-failure"</span><span class="pl-kos">,</span>
        <span class="pl-c1">headless</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
        <span class="pl-c1">screenshot</span>: <span class="pl-kos">{</span>
            <span class="pl-c1">mode</span>: <span class="pl-s">"only-on-failure"</span><span class="pl-kos">,</span>
            <span class="pl-c1">fullPage</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span><span class="pl-kos">,</span>
    <span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
        <span class="pl-kos">{</span>
            <span class="pl-c1">name</span>: <span class="pl-s">"XXXXX"</span><span class="pl-kos">,</span>
            <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
                <span class="pl-c1">channel</span>: <span class="pl-s">"chrome"</span><span class="pl-kos">,</span>
                ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">"Desktop Chrome"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
                <span class="pl-c1">acceptDownloads</span>:<span class="pl-c1">true</span><span class="pl-kos">,</span>
                <span class="pl-c1">viewport</span>: <span class="pl-kos">{</span><span class="pl-c1">width</span>: <span class="pl-c1">1920</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-c1">937</span><span class="pl-kos">}</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">]</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="myFixture('should check the box using setChecked', async ({ page,settingsPage }) =&gt; {
  await settingsPage.setContent(`&lt;input id='checkbox' type='checkbox'&gt;&lt;/input&gt;`);

});"><pre class="notranslate"><span class="pl-en">myFixture</span><span class="pl-kos">(</span><span class="pl-s">'should check the box using setChecked'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page<span class="pl-kos">,</span>settingsPage <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">await</span> <span class="pl-s1">settingsPage</span><span class="pl-kos">.</span><span class="pl-en">setContent</span><span class="pl-kos">(</span><span class="pl-s">`&lt;input id='checkbox' type='checkbox'&gt;&lt;/input&gt;`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
<li>[...]</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">[Describe expected behavior]</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">[Describe actual behavior]</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33]</li>
<li>Operating System: [Windows 11, Ubuntu 22]</li>
<li>Browser: [WebKit]</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test(&quot;doc + xhr&quot;, async ({ page }) =&gt; {
    await page.route(&quot;**/*&quot;, (route, req) =&gt; {
        if (req.isNavigationRequest() &amp;&amp; req.resourceType() === &quot;document&quot;) {
            return route.fulfill({
                body: `
                   &lt;!DOCTYPE html&gt;
                    &lt;html&gt;
                        &lt;head&gt;
                            &lt;title&gt;Hi&lt;/title&gt;
                        &lt;/head&gt;
                        &lt;body&gt;
                        &lt;/body&gt;
                    &lt;/html&gt;
                `,
                contentType: &quot;text/html&quot;
            });
        }
        route.fulfill();
    });

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

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

    await page.waitForTimeout(1000);
});"><pre class="notranslate"><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"doc + xhr"</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">route</span><span class="pl-kos">(</span><span class="pl-s">"**/*"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">route</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-en">isNavigationRequest</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-en">resourceType</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">===</span> <span class="pl-s">"document"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-k">return</span> <span class="pl-s1">route</span><span class="pl-kos">.</span><span class="pl-en">fulfill</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
                <span class="pl-c1">body</span>: <span class="pl-s">`</span>
<span class="pl-s">                   &lt;!DOCTYPE html&gt;</span>
<span class="pl-s">                    &lt;html&gt;</span>
<span class="pl-s">                        &lt;head&gt;</span>
<span class="pl-s">                            &lt;title&gt;Hi&lt;/title&gt;</span>
<span class="pl-s">                        &lt;/head&gt;</span>
<span class="pl-s">                        &lt;body&gt;</span>
<span class="pl-s">                        &lt;/body&gt;</span>
<span class="pl-s">                    &lt;/html&gt;</span>
<span class="pl-s">                `</span><span class="pl-kos">,</span>
                <span class="pl-c1">contentType</span>: <span class="pl-s">"text/html"</span>
            <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-kos">}</span>
        <span class="pl-s1">route</span><span class="pl-kos">.</span><span class="pl-en">fulfill</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"http://test.local/page.html"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">title</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</span><span class="pl-kos">(</span><span class="pl-s">"Hi"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">evaluate</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
        <span class="pl-k">const</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">XMLHttpRequest</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-s1">x</span><span class="pl-kos">.</span><span class="pl-en">open</span><span class="pl-kos">(</span><span class="pl-s">"GET"</span><span class="pl-kos">,</span> <span class="pl-s1">location</span><span class="pl-kos">.</span><span class="pl-c1">href</span><span class="pl-kos">,</span> <span class="pl-c1">false</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-s1">x</span><span class="pl-kos">.</span><span class="pl-en">send</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">waitForTimeout</span><span class="pl-kos">(</span><span class="pl-c1">1000</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test] Passes on chromium and firefox</li>
<li>Fails on webkit</li>
</ul>
<p dir="auto"><strong>Expected</strong><br>
Should also pass on webkit<br>
<strong>Actual</strong><br>
Fails only on webkit</p>
<p dir="auto">[Describe actual behavior]<br>
Test does the following:<br>
Loads an html page, and then dispatches an xhr to the same url as the page is on.<br>
When that xhr is intercepted, it is treated as navigation and document request, instead of an xhr.<br>
On chrome and firefox this doesn't happen.</p>