mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
test(electron): add cloud test (#4184)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
@@ -19,12 +19,20 @@ export async function createLocalWorkspace(
|
||||
// open create workspace modal
|
||||
await page.getByTestId('new-workspace').click();
|
||||
|
||||
const isDesktop: boolean = await page.evaluate(() => {
|
||||
return !!window.appInfo?.electron;
|
||||
}, []);
|
||||
|
||||
// input workspace name
|
||||
await page.getByPlaceholder('Set a Workspace name').click();
|
||||
await page.getByPlaceholder('Set a Workspace name').fill(params.name);
|
||||
|
||||
// click create button
|
||||
return page.getByRole('button', { name: 'Create' }).click({
|
||||
await page.getByRole('button', { name: 'Create' }).click({
|
||||
delay: 500,
|
||||
});
|
||||
|
||||
if (isDesktop) {
|
||||
await page.getByTestId('create-workspace-continue-button').click();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user