Skip to content

test: update playwright, add tests, run in github actions#680

Open
ChristianMurphy wants to merge 4 commits intomasterfrom
test/expand-playwright-tests
Open

test: update playwright, add tests, run in github actions#680
ChristianMurphy wants to merge 4 commits intomasterfrom
test/expand-playwright-tests

Conversation

@ChristianMurphy
Copy link
Member

Checklist
Description of change

Upgrades Playwright from 1.23 to 1.58, adds 44 new end-to-end smoke tests covering all user roles and key portal features, and runs them automatically in GitHub Actions CI.

Changes

Playwright upgrade

  • @playwright/test upgraded from ~1.23.0 to ^1.58.2
  • The old version had ESM module resolution failures with Node 24

New test files (44 tests)

File Tests Coverage
guest-page.spec.ts 4 Welcome page portlets, search box, guest has no waffle/notifications, footer
per-role-pages.spec.ts 20 Tabs and portlets for admin (6), student (7), faculty (3), staff (4)
web-components.spec.ts 6 Waffle menu open/quicklinks, notification icon/dropdown, customize button, feedback link
favorites.spec.ts 4 Add/remove favorites via API, Options menu favorite link, favorite menu items per portlet
portlet-options.spec.ts 10 Options dropdown for locked vs unlocked portlets, maximized view, edit mode, direct URL navigation

CI integration

  • Added a playwright job to CI.yml
  • Runs independently from the existing build matrix (single config: Ubuntu, Java 8, Temurin)
  • Starts a full portal via portalInit + tomcatStart, waits for readiness, then runs all Playwright tests
  • Uploads playwright-report/ as a build artifact on success or failure
  • Always stops Tomcat in cleanup

Housekeeping

  • Added test-results/ and playwright-report/ to .gitignore

Test results

All 81 tests pass (37 pre-existing + 44 new):

Running 81 tests using 2 workers
  81 passed (1.0m)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request upgrades Playwright from version 1.23.0 to 1.58.2 and adds 44 new end-to-end smoke tests covering guest access, user roles (admin, student, faculty, staff), web components, favorites functionality, and portlet options. The tests are integrated into GitHub Actions CI to run automatically on every push and pull request.

Changes:

  • Upgraded @playwright/test from ~1.23.0 to ^1.58.2 to resolve ESM module resolution issues with Node 24 and gain access to modern Playwright features
  • Added 44 comprehensive smoke tests across 5 new test files covering portal functionality for different user roles and features
  • Integrated Playwright tests into GitHub Actions CI with portal initialization, automated readiness checks, and artifact upload on completion

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
package.json Upgraded @playwright/test dependency from ~1.23.0 to ^1.58.2
package-lock.json Updated lock file with new Playwright dependencies and removed deprecated @types/node transitive dependency
.gitignore Added test-results/ and playwright-report/ directories to ignore Playwright test artifacts
.github/workflows/CI.yml Added new playwright job that initializes portal, starts Tomcat, runs E2E tests, and uploads test reports
tests/ux/smoke/guest-page.spec.ts Added 4 tests verifying guest page rendering, search box, absence of authenticated features, and footer
tests/ux/smoke/per-role-pages.spec.ts Added 20 tests validating tabs and portlets for admin, student, faculty, and staff roles
tests/ux/smoke/web-components.spec.ts Added 6 tests for waffle menu, notifications, customize button, and feedback link web components
tests/ux/smoke/favorites.spec.ts Added 4 tests covering favorites API operations, options menu interactions, and favorite menu items
tests/ux/smoke/portlet-options.spec.ts Added 10 tests for portlet options dropdown, maximized view, edit mode, and direct URL navigation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants