Skip to content

A local-first personal finance app

:white_check_mark: (e2e) improving stability - reducing flakiness (#932)

Matiss Janis Aboltinsf8b73355ab52
diff --git a/packages/desktop-client/e2e/budget.test.js b/packages/desktop-client/e2e/budget.test.js
index 6b3a8da28b..d1160a5bc7 100644
--- a/packages/desktop-client/e2e/budget.test.js
+++ b/packages/desktop-client/e2e/budget.test.js
@@ -1,17 +1,14 @@
import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page';
-import { Navigation } from './page-models/navigation';
test.describe('Budget', () => {
let page;
- let navigation; // eslint-disable-line no-unused-vars
let configurationPage;
let budgetPage;
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
- navigation = new Navigation(page);
configurationPage = new ConfigurationPage(page);
await page.goto('/');
@@ -25,7 +22,9 @@ test.describe('Budget', () => {
test('renders the summary information: available funds, overspent, budgeted and for next month', async () => {
const summary = budgetPage.budgetSummary.first();
- await expect(summary.getByText('Available Funds')).toBeVisible();
+ await expect(summary.getByText('Available Funds')).toBeVisible({
+ timeout: 10000,
+ });
await expect(summary.getByText(/^Overspent in /)).toBeVisible();
await expect(summary.getByText('Budgeted')).toBeVisible();
await expect(summary.getByText('For Next Month')).toBeVisible();
diff --git a/packages/desktop-client/e2e/onboarding.test.js b/packages/desktop-client/e2e/onboarding.test.js
index 4b20e66f86..05bc3ff778 100644
--- a/packages/desktop-client/e2e/onboarding.test.js
+++ b/packages/desktop-client/e2e/onboarding.test.js
@@ -76,6 +76,6 @@ test.describe('Onboarding', () => {
await navigation.clickOnNoServer();
- expect(await configurationPage.heading).toHaveText('Where’s the server?');
+ await expect(configurationPage.heading).toHaveText('Where’s the server?');
});
});
diff --git a/upcoming-release-notes/932.md b/upcoming-release-notes/932.md
new file mode 100644
index 0000000000..4032e0c083
--- /dev/null
+++ b/upcoming-release-notes/932.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Improving e2e test stability