import { test as base } from '@playwright/test';
import { ApiHelper } from '../helper/api.helper';

type ApiFixture = {
    apiHelper: ApiHelper;
};

export const test = base.extend<ApiFixture>({
    apiHelper: async ({ page, request }, use) => {
        const apiHelper = new ApiHelper(page, request);
        await use(apiHelper);
    }
});

