Skip to content

Commit e6d2c24

Browse files
Fix CI: Install Playwright browsers before running tests (#12)
* Initial plan * Add Playwright browser installation step to CI workflow Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com> * Fix navigation timing issues by adding explicit waits --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com>
1 parent e5a08d9 commit e6d2c24

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
working-directory: ./automated-testing
2828
run: npm install
2929

30+
- name: Install Playwright Browsers
31+
working-directory: ./automated-testing
32+
run: npx playwright install --with-deps
33+
3034
- name: Run npm Tests
3135
working-directory: ./automated-testing
32-
run: npm test
36+
run: npm test

automated-testing/pages/DashboardPage.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,27 @@ export class DashboardPage {
2424
}
2525

2626
async navigateToAdmin() {
27+
await this.adminMenu.waitFor({ state: 'visible' });
2728
await this.adminMenu.click();
2829
}
2930

3031
async navigateToPIM() {
32+
await this.pimMenu.waitFor({ state: 'visible' });
3133
await this.pimMenu.click();
3234
}
3335

3436
async navigateToLeave() {
37+
await this.leaveMenu.waitFor({ state: 'visible' });
3538
await this.leaveMenu.click();
3639
}
3740

3841
async navigateToTime() {
42+
await this.timeMenu.waitFor({ state: 'visible' });
3943
await this.timeMenu.click();
4044
}
4145

4246
async navigateToRecruitment() {
47+
await this.recruitmentMenu.waitFor({ state: 'visible' });
4348
await this.recruitmentMenu.click();
4449
}
4550

@@ -49,4 +54,4 @@ export class DashboardPage {
4954
await this.page.keyboard.press('Escape'); // Close dropdown
5055
return username || '';
5156
}
52-
}
57+
}

0 commit comments

Comments
 (0)