test(electron): fix cloud test (#4411)

This commit is contained in:
Alex Yang authored and GitHub committed 2023-09-19 02:08:35 +00:00
1 parent 63bd1fbf02
commit 9aafaf865e
3 files changed
+16 -12

No files matched your search

+5 -2
View File
@@ -133,12 +133,15 @@ export async function loginUser(
page: Page,
userEmail: string,
config?: {
isElectron?: boolean;
beforeLogin?: () => Promise<void>;
afterLogin?: () => Promise<void>;
}
) {
await openHomePage(page);
await waitForEditorLoad(page);
if (config?.isElectron !== true) {
await openHomePage(page);
await waitForEditorLoad(page);
}
await clickSideBarCurrentWorkspaceBanner(page);
await page.getByTestId('cloud-signin-button').click({