mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-12 06:29:45 +08:00
0c7b20dc18
#### PR Dependency Tree * **PR #15464** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Replaced the project’s formatting and linting workflow with Oxfmt and Oxlint. * Added shared formatting and linting configuration, editor integration, and updated automated checks. * Updated generated files, scripts, and lint guidance to use the new tooling. * **Style** * Reformatted templates, source code, examples, and configuration files for consistent readability. * No user-facing functionality or rendering behavior changed. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
// oxlint-disable no-empty-pattern
|
|
import { test as base } from '@affine-test/kit/playwright';
|
|
import type { Page } from '@playwright/test';
|
|
|
|
import { ChatPanelUtils } from '../utils/chat-panel-utils';
|
|
import { EditorUtils } from '../utils/editor-utils';
|
|
import { SettingsPanelUtils } from '../utils/settings-panel-utils';
|
|
import { TestUtils } from '../utils/test-utils';
|
|
|
|
interface TestUtilsFixtures {
|
|
utils: {
|
|
testUtils: TestUtils;
|
|
chatPanel: typeof ChatPanelUtils;
|
|
editor: typeof EditorUtils;
|
|
settings: typeof SettingsPanelUtils;
|
|
};
|
|
loggedInPage: Page;
|
|
}
|
|
|
|
export const test = base.extend<TestUtilsFixtures>({
|
|
utils: async ({}, use) => {
|
|
const testUtils = TestUtils.getInstance();
|
|
await use({
|
|
testUtils,
|
|
chatPanel: ChatPanelUtils,
|
|
editor: EditorUtils,
|
|
settings: SettingsPanelUtils,
|
|
});
|
|
},
|
|
loggedInPage: async ({ browser }, use) => {
|
|
const context = await browser.newContext({
|
|
storageState: 'storageState.json',
|
|
});
|
|
const page = await context.newPage();
|
|
await use(page);
|
|
await context.close();
|
|
},
|
|
});
|
|
|
|
export type TestFixtures = typeof test;
|