diff --git a/e2e/playwright/native-file-menu.spec.ts b/e2e/playwright/native-file-menu.spec.ts index a6ece3aed..260dd3a2b 100644 --- a/e2e/playwright/native-file-menu.spec.ts +++ b/e2e/playwright/native-file-menu.spec.ts @@ -2266,14 +2266,15 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => { // Run electron snippet to find the Menu! await page.waitForTimeout(100) // wait for createModelingPageMenu() to run - await tronApp.electron.evaluate(async ({ app }) => { - if (!app || !app.applicationMenu) fail() + await expect.poll(async () => await tronApp.electron.evaluate(async ({ app }) => { + if (!app || !app.applicationMenu) return false const menu = app.applicationMenu.getMenuItemById( 'Help.Refresh and report a bug' ) - if (!menu) fail() + if (!menu) return false menu.click() - }) + return true + })).toBe(true) // Core dump and refresh magic number timeout await scene.connectionEstablished() await expect(toolbar.startSketchBtn).toBeVisible() diff --git a/e2e/playwright/testing-samples-loading.spec.ts b/e2e/playwright/testing-samples-loading.spec.ts index b2f41b826..c0806387c 100644 --- a/e2e/playwright/testing-samples-loading.spec.ts +++ b/e2e/playwright/testing-samples-loading.spec.ts @@ -79,7 +79,7 @@ test.describe('Testing in-app sample loading', () => { test( 'Desktop: should create new file by default, optionally overwrite', { tag: '@electron' }, - async ({ editor, context, page }, testInfo) => { + async ({ editor, context, page, scene, cmdBar }, testInfo) => { const { dir } = await context.folderSetupFn(async (dir) => { const bracketDir = join(dir, 'bracket') await fsp.mkdir(bracketDir, { recursive: true }) @@ -126,7 +126,7 @@ test.describe('Testing in-app sample loading', () => { await test.step(`Test setup`, async () => { await page.setBodyDimensions({ width: 1200, height: 500 }) await projectCard.click() - await u.waitForPageLoad() + await scene.settled(cmdBar) }) await test.step(`Precondition: check the initial code`, async () => {