fix(storybook): fix test (#5325)

<img width="440" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/329f9c12-cc0b-4aae-9352-3811ab0a27a6">
This commit is contained in:
JimmFly
2023-12-18 13:36:56 +00:00
parent a1c9ac80d8
commit cef9e0539d
9 changed files with 41 additions and 30 deletions

View File

@@ -16,7 +16,7 @@ export async function waitForAllPagesLoad(page: Page) {
export async function clickNewPageButton(page: Page) {
// fixme(himself65): if too fast, the page will crash
await page.getByTestId('new-page-button').first().click({
await page.getByTestId('sidebar-new-page-button').click({
delay: 100,
});
await waitForEditorLoad(page);

View File

@@ -13,5 +13,5 @@ export async function clickSideBarCurrentWorkspaceBanner(page: Page) {
}
export async function clickNewPageButton(page: Page) {
return page.getByTestId('new-page-button').click();
return page.getByTestId('sidebar-new-page-button').click();
}