Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

639 B
Raw Blame
import { expect } from '@playwright/test';

import { test as baseTest } from './playwright';

type CurrentDocCollection = {
  meta: { id: string; flavour: string };
};

export const test = baseTest.extend<{
  workspace: {
    current: () => Promise<CurrentDocCollection>;
  };
}>({
  page: async ({ page }, use) => {
    await page.goto('/');
    await expect(
      page.locator('.affine-page-viewport[data-mode="page"]')
    ).toBeVisible({
      timeout: 30 * 1000,
    });
    await page.goto('/');
    await use(page);
    console.log(
      'Browser User Agent:',
      await page.evaluate(() => navigator.userAgent)
    );
  },
});