Skip to content

Commit bd6ae24

Browse files
authored
Merge pull request #2024 from jpwhite4/tests
Robustness improvements for playwright
2 parents af327c6 + a88cc7a commit bd6ae24

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/playwright/lib/internal_dashboard.page.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ class InternalDashboard extends BasePage implements LoginInterface {
1414

1515
async login(username: string, password: string, display: string) {
1616
await this.verifyLocation('/internal_dashboard', 'XDMoD Internal Dashboard');
17-
await this.usernameLocator.isVisible();
18-
await this.passwordLocator.isVisible();
19-
await this.submitLocator.isVisible();
2017

2118
await this.usernameLocator.fill(username);
2219
await this.passwordLocator.fill(password);
2320
await this.submitLocator.click();
24-
await this.submitLocator.isHidden();
21+
await expect(this.submitLocator).toBeHidden();
2522

26-
await this.logoutLinkLocator.isVisible();
2723
await expect(this.loggedInDisplayLocator).toContainText(display);
24+
25+
const userManagementTab = this.page.locator(selectors.header.tabs.user_management());
26+
await expect(userManagementTab).toBeVisible({ timeout: 10_000 });
2827
}
2928

3029
async logout() {

tests/playwright/playwright.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {PlaywrightTestConfig, devices} from '@playwright/test';
2-
// Comment to trigger CI man do I hate trello boards...
2+
33
const config: PlaywrightTestConfig = {
44
forbidOnly: !!process.env.CI,
55
retries: process.env.CI ? 2 : 0,
66
timeout: 60000,
7-
workers: 5,
7+
workers: 1,
88
use: {
99
trace: 'on-first-retry',
1010
video: 'on-first-retry',

0 commit comments

Comments
 (0)