Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d961cb2
feat: add playwright config
bupd Oct 15, 2025
6b29e01
feat: add login logout playwright test
bupd Oct 15, 2025
445888e
feat: add playwright workflow
bupd Oct 15, 2025
b97a6f9
Merge branch 'main' into playwright
bupd Dec 23, 2025
14e1ad9
feat: create initial test structure and login helper function
adityachopra29 Dec 31, 2025
8ad8a76
feat: create createProject function
adityachopra29 Dec 31, 2025
dddc440
feat: create deleteRepo
adityachopra29 Dec 31, 2025
ff8e514
feat: create pushImage to project function
adityachopra29 Dec 31, 2025
56c584e
feat: create runGc function
adityachopra29 Dec 31, 2025
8b17936
change image pushed
adityachopra29 Dec 31, 2025
4255416
add project quota sorting
adityachopra29 Dec 31, 2025
7c79b02
fix: fix quota sorting function errors
adityachopra29 Dec 31, 2025
7785e1d
fix: cleanup
adityachopra29 Jan 1, 2026
a25fd0f
minor changes
adityachopra29 Jan 1, 2026
d6ed01a
add tag1 option to pushImage
adityachopra29 Jan 1, 2026
eaa1554
fix indentation
adityachopra29 Jan 2, 2026
ecde6b1
create helper function for Push Image
adityachopra29 Jan 3, 2026
ff56518
feat: add Garbage Collection test support
adityachopra29 Jan 3, 2026
4dd5eb5
feat: add GC Untagged Images test
adityachopra29 Jan 3, 2026
47e10a7
feat:create Project Quotas Control Under GC test
adityachopra29 Jan 4, 2026
97d6a4e
fix: add Harbor IP env var
adityachopra29 Jan 6, 2026
cc3c0cc
feat: create helper functions for Garbage Collection Accessory test
adityachopra29 Jan 10, 2026
6f6a3de
modify env var setup
adityachopra29 Jan 13, 2026
d44d01e
feat: create Garbage Collection Accessory test uptil prepareAccessor…
adityachopra29 Jan 15, 2026
155d76d
modify .sample.env file for cosign
adityachopra29 Jan 16, 2026
9ba5510
feat: complete Garbage Collection Accessory test and add helper funct…
adityachopra29 Jan 16, 2026
4eb7f91
change gcNow to return jobId
adityachopra29 Jan 16, 2026
c245fa9
feat:simplified xpaths to playwright best practices
adityachopra29 Jan 17, 2026
6833e18
fix: minor changes
adityachopra29 Jan 18, 2026
f72b6e3
refac(e2e): code cleanup
adityachopra29 Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Playwright Tests

env:
POSTGRESQL_HOST: localhost
POSTGRESQL_PORT: 5432
POSTGRESQL_USR: postgres
POSTGRESQL_PWD: root123
POSTGRESQL_DATABASE: registry
DOCKER_COMPOSE_VERSION: 2.27.1
HARBOR_ADMIN: admin
HARBOR_ADMIN_PASSWD: Harbor12345
CORE_SECRET: tempString
KEY_PATH: "/data/secret/keys/secretkey"
REDIS_HOST: localhost
REG_VERSION: v2.7.1-patch-2819-2553
UI_BUILDER_VERSION: 1.6.0

on:
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '**.md'
- 'tests/**'
- '!tests/**.sh'
- '!tests/apitests/**'
- '!tests/ci/**'
- '!tests/resources/**'
- '!tests/robot-cases/**'
- '!tests/robot-cases/Group1-Nightly/**'

permissions:
contents: read
pull-requests: read
actions: read

jobs:
E2E_PLAYWRIGHT:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: 1.23.2
- uses: actions/setup-node@v5
with:
node-version: '18'
- uses: actions/checkout@v5
with:
path: src/github.com/goharbor/harbor
- name: setup env
run: |
cd src/github.com/goharbor/harbor
pwd
go env
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo "GOPATH=$(go env GOPATH):$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
echo "TOKEN_PRIVATE_KEY_PATH=${GITHUB_WORKSPACE}/src/github.com/goharbor/harbor/tests/private_key.pem" >> $GITHUB_ENV
IP=`hostname -I | awk '{print $1}'`
echo "IP=$IP" >> $GITHUB_ENV
echo "BASE_URL=https://$IP" >> $GITHUB_ENV
shell: bash
- name: before_install
run: |
set -x
cd src/github.com/goharbor/harbor
curl -L https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
- name: Start Harbor for E2E
run: |
cd src/github.com/goharbor/harbor
docker system prune -a -f
bash ./tests/showtime.sh ./tests/ci/api_common_install.sh $IP DB
- name: Install Playwright dependencies
run: |
cd src/github.com/goharbor/harbor/src/portal
npm ci
npx playwright install --with-deps
- name: Run Playwright tests
run: |
cd src/github.com/goharbor/harbor/src/portal
npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: src/github.com/goharbor/harbor/src/portal/playwright-report/
retention-days: 30
7 changes: 7 additions & 0 deletions src/portal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
11 changes: 11 additions & 0 deletions src/portal/.sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
HARBOR_USERNAME="<your_admin_username>" # e.g., admin
HARBOR_PASSWORD="<your_admin_password>" # e.g., Harbor12345
IP="<ip_of_harbor_instance" #e.g., harbor.mycompany.com
BASE_URL="<your_harbor_instance_url>" # e.g., https://harbor.mycompany.com
LOCAL_REGISTRY="<your_registry_hostname>" # e.g., docker.io
LOCAL_REGISTRY_NAMESPACE="<namespace_in_registry>" #e.g., library

# Do not modify
COSIGN_PASSWORD=""
COSIGN_EXPERIMENTAL=1
COSIGN_OCI_EXPERIMENTAL=1
Loading