mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 20:31:29 +03:00
39 lines
815 B
TypeScript
39 lines
815 B
TypeScript
import { test } from '@affine-test/kit/electron';
|
|
import {
|
|
createRandomUser,
|
|
enableCloudWorkspace,
|
|
loginUser,
|
|
} from '@affine-test/kit/utils/cloud';
|
|
import { waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
|
|
import { createLocalWorkspace } from '@affine-test/kit/utils/workspace';
|
|
|
|
process.env.DEV_SERVER_URL = 'http://localhost:8080';
|
|
|
|
let user: {
|
|
name: string;
|
|
email: string;
|
|
password: string;
|
|
};
|
|
|
|
test.beforeEach(async () => {
|
|
user = await createRandomUser();
|
|
});
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await loginUser(page, user.email, {
|
|
isElectron: true,
|
|
});
|
|
});
|
|
|
|
test('new page', async ({ page }) => {
|
|
await page.reload();
|
|
await waitForEditorLoad(page);
|
|
await createLocalWorkspace(
|
|
{
|
|
name: 'test',
|
|
},
|
|
page
|
|
);
|
|
await enableCloudWorkspace(page);
|
|
});
|