mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 02:21:51 +08:00
test: fix flaky title insert (#3884)
(cherry picked from commit b5afbe385f)
This commit is contained in:
@@ -179,7 +179,7 @@ test('Not show navigation path if page is not a subpage or current page is not i
|
|||||||
expect(await page.getByTestId('navigation-path').count()).toBe(0);
|
expect(await page.getByTestId('navigation-path').count()).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Assert the recent browse pages are on the recent list', async ({
|
test('assert the recent browse pages are on the recent list', async ({
|
||||||
page,
|
page,
|
||||||
}) => {
|
}) => {
|
||||||
await openHomePage(page);
|
await openHomePage(page);
|
||||||
@@ -187,20 +187,35 @@ test('Assert the recent browse pages are on the recent list', async ({
|
|||||||
|
|
||||||
// create first page
|
// create first page
|
||||||
await newPage(page);
|
await newPage(page);
|
||||||
await page.keyboard.insertText('sgtokidoki');
|
{
|
||||||
|
const title = getBlockSuiteEditorTitle(page);
|
||||||
|
await title.type('sgtokidoki', {
|
||||||
|
delay: 50,
|
||||||
|
});
|
||||||
|
}
|
||||||
await page.waitForTimeout(200);
|
await page.waitForTimeout(200);
|
||||||
|
|
||||||
// create second page
|
// create second page
|
||||||
await openQuickSearchByShortcut(page);
|
await openQuickSearchByShortcut(page);
|
||||||
const addNewPage = page.getByTestId('quick-search-add-new-page');
|
const addNewPage = page.getByTestId('quick-search-add-new-page');
|
||||||
await addNewPage.click();
|
await addNewPage.click();
|
||||||
await page.keyboard.insertText('theliquidhorse');
|
{
|
||||||
|
const title = getBlockSuiteEditorTitle(page);
|
||||||
|
await title.type('theliquidhorse', {
|
||||||
|
delay: 50,
|
||||||
|
});
|
||||||
|
}
|
||||||
await page.waitForTimeout(200);
|
await page.waitForTimeout(200);
|
||||||
|
|
||||||
// create thrid page
|
// create thrid page
|
||||||
await openQuickSearchByShortcut(page);
|
await openQuickSearchByShortcut(page);
|
||||||
await addNewPage.click();
|
await addNewPage.click();
|
||||||
await page.keyboard.insertText('battlekot');
|
{
|
||||||
|
const title = getBlockSuiteEditorTitle(page);
|
||||||
|
await title.type('battlekot', {
|
||||||
|
delay: 50,
|
||||||
|
});
|
||||||
|
}
|
||||||
await page.waitForTimeout(200);
|
await page.waitForTimeout(200);
|
||||||
|
|
||||||
await openQuickSearchByShortcut(page);
|
await openQuickSearchByShortcut(page);
|
||||||
|
|||||||
Reference in New Issue
Block a user