import { expect, test as base } from '@playwright/test';

export const test = base.extend({
  page: async ({ page }, applyFixture) => {
    await page.addInitScript(() => {
      localStorage.setItem(
        'user-store',
        JSON.stringify({
          state: { token: 'e2e-token' },
          version: 0,
        }),
      );
    });

    await applyFixture(page);
  },
});

export { expect };
