mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): avoid page full refresh (#3341)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
@@ -42,6 +42,7 @@ const createAndPinCollection = async (
|
||||
await page.getByTestId('collection-bar-option-pin').click();
|
||||
await page.waitForTimeout(100);
|
||||
};
|
||||
|
||||
test('Show collections items in sidebar', async ({ page }) => {
|
||||
await createAndPinCollection(page);
|
||||
const collections = page.getByTestId('collections');
|
||||
|
||||
@@ -15,10 +15,9 @@ test('goto not found page', async ({ page }) => {
|
||||
test('goto not found workspace', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
const currentUrl = page.url();
|
||||
// if doesn't wait for timeout, data won't be saved into indexedDB
|
||||
await page.waitForTimeout(1000);
|
||||
await page.goto(new URL('/workspace/invalid/all', webUrl).toString());
|
||||
await waitEditorLoad(page);
|
||||
expect(page.url()).toEqual(currentUrl);
|
||||
await page.waitForTimeout(1000);
|
||||
expect(page.url()).toBe(new URL('/404', webUrl).toString());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user