test(electron): add cloud test (#4184)

Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
Alex YangandPeng Xiao authored and GitHub committed 2023-09-17 20:26:06 +00:00
1 parent 40e094dcdd
commit cdad7edf15
28 files changed
+366 -83

No files matched your search

+9 -1
View File
@@ -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();
}
}