feat: Add Playwright setup#22462
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #22462 +/- ##
===========================================
- Coverage 66.05% 46.81% -19.24%
===========================================
Files 1074 253 -821
Lines 116799 14353 -102446
Branches 2955 2955
===========================================
- Hits 77155 6720 -70435
+ Misses 35364 7272 -28092
+ Partials 4280 361 -3919
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
b9e34d6 to
ce207d4
Compare
|
/label release-note/ignore |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Playwright as an end-to-end testing framework for Harbor's portal, providing an alternative to the existing Cypress setup. The implementation includes basic configuration, a sample login/logout test, and CI integration to run tests automatically on pull requests.
Key Changes:
- Added Playwright configuration and dependencies to the portal project
- Created initial E2E test for login/logout workflow
- Implemented GitHub Actions workflow to run Playwright tests with artifact reporting
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/portal/playwright.config.ts | Playwright configuration with browser setup, retry logic, and reporting options |
| src/portal/package.json | Added @playwright/test dependency for E2E testing |
| src/portal/e2e/login-logout.spec.ts | Basic test validating login and logout functionality |
| src/portal/.gitignore | Excluded Playwright-generated artifacts from version control |
| .github/workflows/playwright.yml | CI workflow to execute Playwright tests on PRs with Harbor deployment |
Files not reviewed (1)
- src/portal/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Vad1mo
left a comment
There was a problem hiding this comment.
thats a really cool thing with the recording, easy to spot what is wrong..
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com> fix: playwright github action Signed-off-by: bupd <bupdprasanth@gmail.com> fix: playwright github action Signed-off-by: bupd <bupdprasanth@gmail.com> fix: rename login logout test Signed-off-by: bupd <bupdprasanth@gmail.com> fix: playwright testing Signed-off-by: bupd <bupdprasanth@gmail.com> feat: correct test Signed-off-by: bupd <bupdprasanth@gmail.com>
|
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
|
please /label |
|
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
Comprehensive Summary of your change
This adds the first step of proposal goharbor/community#268
note
one best thing about this is: https://github.com/goharbor/harbor/actions/runs/18526331097/artifacts/4275726026
test run: https://github.com/goharbor/harbor/actions/runs/18526331097/job/52797918784?pr=22462
use this to view the test-report and why did it fail. we will get a screenshot a video and a error context.
Screenshots
Issue being fixed
Fixes #22134
Please indicate you've done the following: