Skip to content

feat: Add Playwright setup#22462

Open
bupd wants to merge 4 commits intogoharbor:mainfrom
bupd:playwright
Open

feat: Add Playwright setup#22462
bupd wants to merge 4 commits intogoharbor:mainfrom
bupd:playwright

Conversation

@bupd
Copy link
Contributor

@bupd bupd commented Oct 15, 2025

Comprehensive Summary of your change

This adds the first step of proposal goharbor/community#268

  • Add configs related to playwright
  • Add initial tests
  • Add github action to run playwright tests.

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

Screenshot_2025-10-15_16-43-55

Issue being fixed

Fixes #22134

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.84%. Comparing base (c8c11b4) to head (b97a6f9).
⚠️ Report is 694 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22462       +/-   ##
===========================================
+ Coverage   45.36%   65.84%   +20.47%     
===========================================
  Files         244     1073      +829     
  Lines       13333   116095   +102762     
  Branches     2719     2931      +212     
===========================================
+ Hits         6049    76445    +70396     
- Misses       6983    35411    +28428     
- Partials      301     4239     +3938     
Flag Coverage Δ
unittests 65.84% <ø> (+20.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 987 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bupd bupd force-pushed the playwright branch 5 times, most recently from b9e34d6 to ce207d4 Compare October 15, 2025 13:43
@bupd bupd marked this pull request as ready for review October 15, 2025 17:02
@bupd bupd requested a review from a team as a code owner October 15, 2025 17:02
@bupd
Copy link
Contributor Author

bupd commented Oct 15, 2025

/label release-note/ignore

@Vad1mo Vad1mo requested a review from Copilot October 24, 2025 07:53
@Vad1mo Vad1mo added the release-note/ignore-for-release Do not include PR or Issue for release notes label Oct 24, 2025
Copy link
Contributor

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 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.

Copy link
Member

@Vad1mo Vad1mo left a comment

Choose a reason for hiding this comment

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

thats a really cool thing with the recording, easy to spot what is wrong..

bupd added 3 commits October 24, 2025 13:44
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>
@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Dec 23, 2025
@bupd
Copy link
Contributor Author

bupd commented Dec 23, 2025

please /label never-stale

@github-actions
Copy link

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.

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

Labels

never-stale Do not stale playwright release-note/ignore-for-release Do not include PR or Issue for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Internal Pipeline to Github Actions

6 participants