mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat!: affine cloud support (#3813)
Co-authored-by: Hongtao Lye <codert.sn@gmail.com> Co-authored-by: liuyi <forehalo@gmail.com> Co-authored-by: LongYinan <lynweklm@gmail.com> Co-authored-by: X1a0t <405028157@qq.com> Co-authored-by: JimmFly <yangjinfei001@gmail.com> Co-authored-by: Peng Xiao <pengxiao@outlook.com> Co-authored-by: xiaodong zuo <53252747+zuoxiaodong0815@users.noreply.github.com> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> Co-authored-by: Qi <474021214@qq.com> Co-authored-by: danielchim <kahungchim@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ test('Create new workspace, then delete it', async ({ page, workspace }) => {
|
||||
.getByTestId('delete-workspace-input')
|
||||
.type(currentWorkspaceName as string);
|
||||
const promise = page
|
||||
.getByTestId('affine-toast')
|
||||
.getByTestId('affine-notification')
|
||||
.waitFor({ state: 'attached' });
|
||||
await page.getByTestId('delete-workspace-confirm-button').click();
|
||||
await promise;
|
||||
@@ -46,7 +46,7 @@ test('Create new workspace, then delete it', async ({ page, workspace }) => {
|
||||
|
||||
expect(currentWorkspace.flavour).toContain('local');
|
||||
});
|
||||
|
||||
//FIXME: this test is broken
|
||||
test('Delete last workspace', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitEditorLoad(page);
|
||||
@@ -60,12 +60,8 @@ test('Delete last workspace', async ({ page }) => {
|
||||
await page
|
||||
.getByTestId('delete-workspace-input')
|
||||
.type(currentWorkspaceName as string);
|
||||
const promise = page
|
||||
.getByTestId('affine-toast')
|
||||
.waitFor({ state: 'attached' });
|
||||
await page.getByTestId('delete-workspace-confirm-button').click();
|
||||
await promise;
|
||||
await page.reload();
|
||||
await openHomePage(page);
|
||||
await expect(page.getByTestId('new-workspace')).toBeVisible();
|
||||
await page.getByTestId('new-workspace').click();
|
||||
await page.type('[data-testid="create-workspace-input"]', 'Test Workspace');
|
||||
|
||||
@@ -124,8 +124,9 @@ test('create multi workspace in the workspace list', async ({
|
||||
await page.waitForTimeout(1000);
|
||||
// check workspace list length
|
||||
{
|
||||
const workspaceCards1 = await page.$$('data-testid=workspace-card');
|
||||
expect(workspaceCards1.length).toBe(3);
|
||||
await page.waitForTimeout(1000);
|
||||
const workspaceCards = page.getByTestId('workspace-card');
|
||||
expect(await workspaceCards.count()).toBe(3);
|
||||
}
|
||||
|
||||
const workspaceChangePromise = page.evaluate(() => {
|
||||
|
||||
@@ -8,8 +8,10 @@ import {
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import { expect, type Page } from '@playwright/test';
|
||||
|
||||
const openQuickSearchByShortcut = async (page: Page) =>
|
||||
const openQuickSearchByShortcut = async (page: Page) => {
|
||||
await withCtrlOrMeta(page, () => page.keyboard.press('k', { delay: 50 }));
|
||||
await page.waitForTimeout(500);
|
||||
};
|
||||
|
||||
async function assertTitle(page: Page, text: string) {
|
||||
const edgeless = page.locator('affine-edgeless-page');
|
||||
|
||||
@@ -18,6 +18,6 @@ test('goto not found workspace', async ({ page }) => {
|
||||
// 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', coreUrl).toString());
|
||||
await page.waitForTimeout(1000);
|
||||
await page.waitForTimeout(3000);
|
||||
expect(page.url()).toBe(new URL('/404', coreUrl).toString());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user