File size: 450 Bytes
a0ebf39 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import { test as base } from '@playwright/test';
import { MockApi } from './mock-api';
type Fixtures = {
mockApi: MockApi;
};
export const test = base.extend<Fixtures>({
mockApi: async ({ page }, use) => {
const mockApi = new MockApi(page);
// Always mock server-providers — called on every page load by root layout
await mockApi.mockServerProviders();
await use(mockApi);
},
});
export { expect } from '@playwright/test';
|