import { test as base } from "@playwright/test"; import { createBookingsFixture } from "../fixtures/bookings"; import { createPaymentsFixture } from "../fixtures/payments"; import { createUsersFixture } from "../fixtures/users"; interface Fixtures { users: ReturnType; bookings: ReturnType; payments: ReturnType; } /** * @see https://playwright.dev/docs/test-fixtures */ export const test = base.extend({ users: async ({ page }, use, workerInfo) => { const usersFixture = createUsersFixture(page, workerInfo); await use(usersFixture); }, bookings: async ({ page }, use) => { const bookingsFixture = createBookingsFixture(page); await use(bookingsFixture); }, payments: async ({ page }, use) => { const payemntsFixture = createPaymentsFixture(page); await use(payemntsFixture); }, });