mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 07:17:00 +08:00
feat: add preloading template
This commit is contained in:
@@ -2,11 +2,11 @@ import { test } from '@affine-test/kit/playwright';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import { openHomePage, webUrl } from '../libs/load-page';
|
||||
import { waitMarkdownImported } from '../libs/page-logic';
|
||||
import { waitEditorLoad } from '../libs/page-logic';
|
||||
|
||||
test('goto not found page', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitMarkdownImported(page);
|
||||
await waitEditorLoad(page);
|
||||
const currentUrl = page.url();
|
||||
const invalidUrl = currentUrl.replace(/\/$/, '') + '/invalid';
|
||||
await page.goto(invalidUrl);
|
||||
@@ -15,9 +15,9 @@ test('goto not found page', async ({ page }) => {
|
||||
|
||||
test('goto not found workspace', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitMarkdownImported(page);
|
||||
await waitEditorLoad(page);
|
||||
const currentUrl = page.url();
|
||||
await page.goto(new URL('/workspace/invalid/all', webUrl).toString());
|
||||
await page.waitForSelector('v-line');
|
||||
await waitEditorLoad(page);
|
||||
expect(page.url()).toEqual(currentUrl);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user