Skip to content
Snippets Groups Projects
Unverified Commit f8b73355 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

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

Small changes to the e2e tests to improve the stability.
parent 38d2e698
No related branches found
No related tags found
No related merge requests found
import { test, expect } from '@playwright/test'; import { test, expect } from '@playwright/test';
import { ConfigurationPage } from './page-models/configuration-page'; import { ConfigurationPage } from './page-models/configuration-page';
import { Navigation } from './page-models/navigation';
test.describe('Budget', () => { test.describe('Budget', () => {
let page; let page;
let navigation; // eslint-disable-line no-unused-vars
let configurationPage; let configurationPage;
let budgetPage; let budgetPage;
test.beforeAll(async ({ browser }) => { test.beforeAll(async ({ browser }) => {
page = await browser.newPage(); page = await browser.newPage();
navigation = new Navigation(page);
configurationPage = new ConfigurationPage(page); configurationPage = new ConfigurationPage(page);
await page.goto('/'); await page.goto('/');
...@@ -25,7 +22,9 @@ test.describe('Budget', () => { ...@@ -25,7 +22,9 @@ test.describe('Budget', () => {
test('renders the summary information: available funds, overspent, budgeted and for next month', async () => { test('renders the summary information: available funds, overspent, budgeted and for next month', async () => {
const summary = budgetPage.budgetSummary.first(); 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(/^Overspent in /)).toBeVisible();
await expect(summary.getByText('Budgeted')).toBeVisible(); await expect(summary.getByText('Budgeted')).toBeVisible();
await expect(summary.getByText('For Next Month')).toBeVisible(); await expect(summary.getByText('For Next Month')).toBeVisible();
......
...@@ -76,6 +76,6 @@ test.describe('Onboarding', () => { ...@@ -76,6 +76,6 @@ test.describe('Onboarding', () => {
await navigation.clickOnNoServer(); await navigation.clickOnNoServer();
expect(await configurationPage.heading).toHaveText('Where’s the server?'); await expect(configurationPage.heading).toHaveText('Where’s the server?');
}); });
}); });
---
category: Maintenance
authors: [MatissJanis]
---
Improving e2e test stability
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment