mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
refactor: lazy load workspaces (#3091)
This commit is contained in:
@@ -19,6 +19,7 @@ test('database is useable', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
await page.keyboard.insertText('test title');
|
||||
await page.keyboard.press('Enter');
|
||||
const title = page.locator('.affine-default-page-block-title');
|
||||
@@ -29,9 +30,11 @@ test('database is useable', async ({ page }) => {
|
||||
await page.reload();
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
await page.keyboard.insertText('test title2');
|
||||
await page.keyboard.press('Enter');
|
||||
const title2 = page.locator('.affine-default-page-block-title');
|
||||
await page.waitForTimeout(500);
|
||||
expect(await title2.innerText()).toBe('test title2');
|
||||
await addDatabase(page);
|
||||
const database2 = page.locator('.affine-database-table');
|
||||
@@ -42,11 +45,13 @@ test('link page is useable', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
await page.keyboard.insertText('page1');
|
||||
await page.keyboard.press('Enter');
|
||||
const title = page.locator('.affine-default-page-block-title');
|
||||
expect(await title.innerText()).toBe('page1');
|
||||
await newPage(page);
|
||||
await waitEditorLoad(page);
|
||||
await page.keyboard.insertText('page2');
|
||||
await page.keyboard.press('Enter');
|
||||
const title2 = page.locator('.affine-default-page-block-title');
|
||||
@@ -59,7 +64,9 @@ test('link page is useable', async ({ page }) => {
|
||||
await page.keyboard.press('1');
|
||||
await page.keyboard.press('Enter');
|
||||
const link = page.locator('.affine-reference');
|
||||
expect(link).toBeVisible();
|
||||
await page.waitForTimeout(500);
|
||||
await expect(link).toBeVisible();
|
||||
await page.click('.affine-reference');
|
||||
await page.waitForTimeout(500);
|
||||
expect(await title.innerText()).toBe('page1');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user