mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(core): transform workspace db when enable cloud (#7744)
This commit is contained in:
@@ -5,9 +5,12 @@ import {
|
||||
enableCloudWorkspace,
|
||||
loginUser,
|
||||
} from '@affine-test/kit/utils/cloud';
|
||||
import { clickPageModeButton } from '@affine-test/kit/utils/editor';
|
||||
import {
|
||||
clickNewPageButton,
|
||||
getBlockSuiteEditorTitle,
|
||||
waitForEditorLoad,
|
||||
waitForEmptyEditor,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import {
|
||||
openSettingModal,
|
||||
@@ -94,3 +97,31 @@ test('should have pagination in member list', async ({ page }) => {
|
||||
await page.waitForTimeout(500);
|
||||
expect(await page.locator('[data-testid="member-item"]').count()).toBe(3);
|
||||
});
|
||||
|
||||
test('should transform local favorites data', async ({ page }) => {
|
||||
await page.reload();
|
||||
await waitForEditorLoad(page);
|
||||
await createLocalWorkspace(
|
||||
{
|
||||
name: 'test',
|
||||
},
|
||||
page
|
||||
);
|
||||
await page.getByTestId('explorer-bar-add-favorite-button').first().click();
|
||||
await clickPageModeButton(page);
|
||||
await waitForEmptyEditor(page);
|
||||
|
||||
await getBlockSuiteEditorTitle(page).fill('this is a new fav page');
|
||||
await expect(
|
||||
page
|
||||
.getByTestId('explorer-favorites')
|
||||
.locator('[draggable] >> text=this is a new fav page')
|
||||
).toBeVisible();
|
||||
|
||||
await enableCloudWorkspace(page);
|
||||
await expect(
|
||||
page
|
||||
.getByTestId('explorer-favorites')
|
||||
.locator('[draggable] >> text=this is a new fav page')
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user