2023-09-17 23:26:06 +03:00
|
|
|
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';
|
|
|
|
|
2023-09-19 05:08:35 +03:00
|
|
|
process.env.DEV_SERVER_URL = 'http://localhost:8080';
|
|
|
|
|
2023-09-17 23:26:06 +03:00
|
|
|
let user: {
|
|
|
|
name: string;
|
|
|
|
email: string;
|
|
|
|
password: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
test.beforeEach(async () => {
|
|
|
|
user = await createRandomUser();
|
|
|
|
});
|
|
|
|
|
2024-10-15 10:18:28 +03:00
|
|
|
test('new page', async ({ page }) => {
|
|
|
|
await loginUser(page, user, {
|
2023-09-19 05:08:35 +03:00
|
|
|
isElectron: true,
|
|
|
|
});
|
2023-09-17 23:26:06 +03:00
|
|
|
await waitForEditorLoad(page);
|
|
|
|
await createLocalWorkspace(
|
|
|
|
{
|
|
|
|
name: 'test',
|
|
|
|
},
|
|
|
|
page
|
|
|
|
);
|
|
|
|
await enableCloudWorkspace(page);
|
|
|
|
});
|