Skip to content

feat: Add Playwright setup#22462

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

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

Conversation

@bupd
Copy link
Copy Markdown
Member

@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
Copy Markdown

codecov Bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.81%. Comparing base (729e277) to head (ddc4137).

❗ There is a different number of reports uploaded between BASE (729e277) and HEAD (ddc4137). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (729e277) HEAD (ddc4137)
unittests 2 1
Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
unittests 46.81% <ø> (-19.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 827 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.

Comment thread .github/workflows/playwright.yml Fixed
@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
Copy Markdown
Member 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
Copy Markdown
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.

Comment thread src/portal/e2e/login-logout.spec.ts Outdated
Comment thread src/portal/e2e/login-logout.spec.ts Outdated
Comment thread src/portal/e2e/login-logout.spec.ts Outdated
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Member Author

bupd commented Dec 23, 2025

please /label never-stale

@github-actions
Copy link
Copy Markdown

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.

@bupd bupd added release-note/infra Infra related changes e.g. release, test, ship etc... target/2.16.0 and removed release-note/ignore-for-release Do not include PR or Issue for release notes labels May 8, 2026
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/infra Infra related changes e.g. release, test, ship etc... target/2.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Internal Pipeline to Github Actions

7 participants