From d31e0c0e717564f8eb0f83f1bc54565eb6d4edd5 Mon Sep 17 00:00:00 2001 From: Brooooooklyn Date: Mon, 31 Mar 2025 15:23:21 +0000 Subject: [PATCH] ci: run some optimize on CI e2e (#11330) --- tests/kit/src/utils/page-logic.ts | 4 ++-- tools/cli/src/webpack/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kit/src/utils/page-logic.ts b/tests/kit/src/utils/page-logic.ts index bc5c88c34..b4cb999d0 100644 --- a/tests/kit/src/utils/page-logic.ts +++ b/tests/kit/src/utils/page-logic.ts @@ -37,9 +37,9 @@ export async function waitForAllPagesLoad(page: Page) { } export async function clickNewPageButton(page: Page, title?: string) { - // fixme(himself65): if too fast, the page will crash await page.getByTestId('sidebar-new-page-button').click({ - delay: 100, + // default timeout is 5000ms, but it's not enough for the CI first page load + timeout: 8000, }); await waitForEmptyEditor(page); if (title) { diff --git a/tools/cli/src/webpack/index.ts b/tools/cli/src/webpack/index.ts index 1da245034..172ebca57 100644 --- a/tools/cli/src/webpack/index.ts +++ b/tools/cli/src/webpack/index.ts @@ -396,7 +396,7 @@ export function createWebpackConfig( ); } - if (flags.mode === 'development') { + if (flags.mode === 'development' && !IN_CI) { config.optimization = { ...config.optimization, minimize: false,