Issue 1:
I am reporting as a bug, although it might be my bad code, but could not figure it out... Might be useful for future searches.

I am trying to split my fixtures into multiple files.

I get an error pointing to the base.extend

Error: test.extend() accepts fixtures object, not a test object.

Did you mean to call test._extendTest()?

System info

Playwright Version: [v1.33]

Operating System: [ macOS 13.3]

Browser: [ Chromium]

Other info:

Source code

//fake-time.fixtures.ts
import { test as base } from '@playwright/test';

export type FakeTimeFixtures = {
useFakeTime: (dateTime: string) => Promise<void>
};

export const fakeTimeFixtures = base.extend<FakeTimeFixtures>({
useFakeTime: async ({ page }, use) => {
const addFakeTimeScript = async (dateTime: string): Promise<void> => {
const fakeNow = new Date(dateTime).valueOf();
//implementation code
}`);
};
await use(addFakeTimeScript);
}
});

//fixtures.ts

import { test as base } from '@playwright/test';
import { fakeTimeFixtures, FakeTimeFixtures } from './fake-time.fixtures.ts';

type MyFixtures = {
someFixture: (component: Locator) => Promise<string>;
};

export const test = base.extend<FakeTimeFixtures & MyFixtures> ({
...fakeTimeFixtures
someFixture: // implementation of the fixture
});

export { expect } from '@playwright/test';

I am not even sure if it is a TS or a PW error. Any idea?

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

Link to the GitHub repository with the repro

[https://github.com/Tallyb/pw-fixtures-error ]

Steps

npx playwright test

Expected

Tests should run

Actual

error message as above

Issue 2:
System info

Playwright Version: [v1.33.0]

Operating System: [MACOS 13.1]

Browser: [Firefox]

Other info:

Source code

I'm unable to provide source code or a cloned repo publicly so I'd like to explain an issue that is only happening in Firefox and see if I can get any guidance/answers. I have a test that goes to a page and ends up checking 2 checkboxes:

await verifyDevicePage.marketingCheckbox.check();
await verifyDevicePage.transactionalCheckbox.check();

In Chrome and Safari, the whole test passes. In Firefox, it fails at these checkboxes and it's always the same error. I have tried changing the .check() over to .click(). I've tried chaining locators. I've tried refreshing the page. I've tried waiting for element to be visible. I've tried using the force option. I've tried using a timeout. I've tried using double clicks. I've tried scrolling element into view before check or click. I've tried changing the locators to locators that Playwright suggests when using --ui. Nothing is seeming to work.

We use POM and custom automation locators in question and they currently look like:

this.marketingCheckbox = page.locator('[data-automation="transactional"]');
this.transactionalCheckbox = page.locator('[data-automation="marketing"]')

Error: locator.check: Target closed
=========================== logs ===========================
waiting for locator('[data-automation="marketing"]')
locator resolved to <input name="" id="marketing" type="checkbox" _ngconten…/>
attempting click action
waiting for element to be visible, enabled and stable
element is not visible - waiting...