mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
fix(core): skip onboarding in e2e tests (#12044)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated test setup to automatically skip onboarding steps during environment initialization. - Simplified test utility methods by removing notification handling logic from chat panel and editor mode switching processes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import fs from 'node:fs';
|
||||
|
||||
import { skipOnboarding } from '@affine-test/kit/playwright';
|
||||
import {
|
||||
createRandomAIUser,
|
||||
enableCloudWorkspace,
|
||||
@@ -20,7 +21,9 @@ async function setupTestEnvironment(page: Page) {
|
||||
|
||||
export default async function globalSetup() {
|
||||
const browser = await chromium.launch();
|
||||
const page = await browser.newPage();
|
||||
const context = await browser.newContext();
|
||||
await skipOnboarding(context);
|
||||
const page = await context.newPage();
|
||||
await page.goto('http://localhost:8080/', { timeout: 240 * 1000 });
|
||||
const user = await getUser();
|
||||
await page.getByTestId('sidebar-user-avatar').click({
|
||||
|
||||
Reference in New Issue
Block a user