From ea5389b6cda5a0c40dd54a2fdeb6642ede1cfd64 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Sat, 28 Sep 2024 08:31:40 -0700 Subject: [PATCH] Wait for transaction table to be visible --- packages/desktop-client/e2e/onboarding.test.js | 4 +++- packages/desktop-client/e2e/page-models/configuration-page.js | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/desktop-client/e2e/onboarding.test.js b/packages/desktop-client/e2e/onboarding.test.js index 926d24bcd94..3f5a7368187 100644 --- a/packages/desktop-client/e2e/onboarding.test.js +++ b/packages/desktop-client/e2e/onboarding.test.js @@ -93,7 +93,9 @@ test.describe('Onboarding', () => { test('navigates back to start page by clicking on “no server” in an empty budget file', async () => { await configurationPage.clickOnNoServer(); - await configurationPage.startFresh(); + const accountPage = await configurationPage.startFresh(); + + await expect(accountPage.transactionTable).toBeVisible(); await navigation.clickOnNoServer(); await page.getByRole('button', { name: 'Start using a server' }).click(); diff --git a/packages/desktop-client/e2e/page-models/configuration-page.js b/packages/desktop-client/e2e/page-models/configuration-page.js index 3b5e8c6c99e..903ec5dfdd9 100644 --- a/packages/desktop-client/e2e/page-models/configuration-page.js +++ b/packages/desktop-client/e2e/page-models/configuration-page.js @@ -1,3 +1,4 @@ +import { AccountPage } from './account-page'; import { BudgetPage } from './budget-page'; export class ConfigurationPage { @@ -18,6 +19,8 @@ export class ConfigurationPage { async startFresh() { await this.page.getByRole('button', { name: 'Start fresh' }).click(); + + return new AccountPage(this.page); } async importBudget(type, file) {