mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +08:00
fix(test): e2e stability (#14749)
#### PR Dependency Tree * **PR #14749** 👈 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 * **Bug Fixes** * Improved link preview reliability by updating request identification to better match modern browsers. * **Tests** * Made end-to-end and integration tests deterministic and more robust, improving AI chat, image generation, attachment handling, settings visibility, and editor flows. * **Chores** * Updated underlying tooling versions to enhance stability and compatibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -37,9 +37,12 @@ export async function waitForAllPagesLoad(page: Page) {
|
||||
}
|
||||
|
||||
export async function clickNewPageButton(page: Page, title?: string) {
|
||||
await page.getByTestId('sidebar-new-page-button').click({
|
||||
// default timeout is 5000ms, but it's not enough for the CI first page load
|
||||
timeout: 20000,
|
||||
const newPageButton = page.getByTestId('sidebar-new-page-button');
|
||||
await expect(newPageButton).toBeVisible({
|
||||
timeout: 30000,
|
||||
});
|
||||
await newPageButton.click({
|
||||
timeout: 30000,
|
||||
});
|
||||
await waitForEmptyEditor(page);
|
||||
if (title) {
|
||||
|
||||
Reference in New Issue
Block a user