mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
@@ -1,5 +1,8 @@
|
||||
import { skipOnboarding } from '@affine-test/kit/playwright';
|
||||
import { createRandomAIUser } from '@affine-test/kit/utils/cloud';
|
||||
import {
|
||||
createRandomAIUser,
|
||||
switchDefaultChatModel,
|
||||
} from '@affine-test/kit/utils/cloud';
|
||||
import { openHomePage, setCoreUrl } from '@affine-test/kit/utils/load-page';
|
||||
import {
|
||||
clickNewPageButton,
|
||||
@@ -58,7 +61,12 @@ export class TestUtils {
|
||||
await waitForEditorLoad(page);
|
||||
}
|
||||
|
||||
public async setupTestEnvironment(page: Page) {
|
||||
public async setupTestEnvironment(
|
||||
page: Page,
|
||||
defaultModel = 'gemini-2.5-flash'
|
||||
) {
|
||||
await switchDefaultChatModel(defaultModel);
|
||||
|
||||
await skipOnboarding(page.context());
|
||||
await openHomePage(page);
|
||||
await this.createNewPage(page);
|
||||
|
||||
Reference in New Issue
Block a user