Skip to content

CONSOLE-5197: Add Playwright E2E test infrastructure for Prow/CI#16374

Open
vikram-raj wants to merge 2 commits intoopenshift:mainfrom
vikram-raj:prow-playwright-e2e
Open

CONSOLE-5197: Add Playwright E2E test infrastructure for Prow/CI#16374
vikram-raj wants to merge 2 commits intoopenshift:mainfrom
vikram-raj:prow-playwright-e2e

Conversation

@vikram-raj
Copy link
Copy Markdown
Member

@vikram-raj vikram-raj commented Apr 29, 2026

Analysis / Root cause:
OpenShift Console currently uses Cypress for E2E testing in Prow/CI with package selection support. This PR enhances the Playwright E2E test infrastructure to provide similar package selection functionality, making it easier for developers to run tests for specific packages.

Solution description:
Enhanced the Playwright E2E test infrastructure with three main improvements:

1. Package Selection System

Added package selection similar to existing Cypress workflow:

  • -p <package> flag: Run tests for specific packages by name (e.g., -p console, -p helm)
  • -l flag: List all available package IDs and their paths
  • Package mappings: Support for 10 packages:
    • console → packages/integration-tests
    • olm → packages/operator-lifecycle-manager/integration-tests
    • dev-console → packages/dev-console/integration-tests
    • shipwright → packages/shipwright-plugin/integration-tests
    • webterminal → packages/webterminal-plugin/integration-tests
    • telemetry → packages/console-telemetry-plugin/integration-tests
    • knative → packages/knative-plugin/integration-tests
    • helm → packages/helm-plugin/integration-tests
    • topology → packages/topology/integration-tests
    • container-security → packages/container-security/integration-tests
  • Validation: Mutual exclusion between -p and -d flags to prevent user error

2. Yarn Script Integration

Added convenience scripts to package.json for easier test execution:

yarn test-playwright-e2e              # Run from frontend root
yarn test-playwright-e2e-list         # List available packages
yarn test-playwright-console          # Run console package tests
yarn test-playwright-olm              # Run OLM package tests
yarn test-playwright-dev-console      # Run dev-console tests
# ... (10 total package-specific scripts)

3. Environment Variable Alignment

Breaking Change: Renamed PLAYWRIGHT_BASE_URL to WEB_CONSOLE_URL for consistency with test-cypress.sh

This aligns the Playwright test script with the existing Cypress script environment variables. Scripts or CI/CD pipelines using PLAYWRIGHT_BASE_URL will need to update to WEB_CONSOLE_URL.

Other Improvements

  • Simplified usage documentation in script header
  • Moved option parsing before environment setup for better error messages
  • Clear error messages for unknown packages with instructions

Screenshots / screen recording:
N/A - Infrastructure/tooling change only

Test setup:
Prerequisites to test this PR:

  1. Have an OpenShift cluster running
  2. Be logged in with oc CLI, or set BRIDGE_BASE_ADDRESS
  3. Install Playwright in your test directory:
    cd frontend
    yarn add -D @playwright/test
    yarn playwright install

Test cases:

  • Run ./frontend/integration-tests/test-playwright-e2e.sh -l to list packages
  • Run ./frontend/integration-tests/test-playwright-e2e.sh -p console to test console package
  • Run yarn test-playwright-e2e-list from frontend directory
  • Run yarn test-playwright-helm to test helm package
  • Verify mutual exclusion: ./integration-tests/test-playwright-e2e.sh -p console -d . (should error)
  • Verify unknown package error: ./integration-tests/test-playwright-e2e.sh -p invalid (should show helpful message)
  • Test with -c flag to verify user creation works
  • Run ./test-prow-playwright-e2e.sh e2e from repo root
  • Verify WEB_CONSOLE_URL is set correctly (replaces PLAYWRIGHT_BASE_URL)

Browser conformance:
N/A - Infrastructure/tooling change (scripts support any browser Playwright supports)

Additional info:

  • Package selection mirrors existing Cypress workflow for consistency
  • All 10 integration-tests directories are mapped and available
  • Script maintains backward compatibility with -d flag for custom paths
  • Breaking change: PLAYWRIGHT_BASE_URL renamed to WEB_CONSOLE_URL (documented in commit message)
  • Scripts are marked executable (chmod +x)
  • Comprehensive usage documentation in script header comments

Migration Guide for Breaking Change:
If you have scripts or CI/CD pipelines using PLAYWRIGHT_BASE_URL, update them to use WEB_CONSOLE_URL:

# Before:
export PLAYWRIGHT_BASE_URL="https://console.example.com"

# After:
export WEB_CONSOLE_URL="https://console.example.com"

Reviewers and assignees:

🤖 Generated with Claude Code

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Apr 29, 2026

@vikram-raj: This pull request references CONSOLE-5197 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:
OpenShift Console currently uses Cypress for E2E testing in Prow/CI. This PR adds infrastructure to support Playwright E2E tests, providing an alternative test framework option with different capabilities and workflow.

Solution description:
Added two new bash scripts to support Playwright E2E testing in both local development and CI environments:

  1. frontend/integration-tests/test-playwright-e2e.sh - Main test runner script
  • Automatically discovers cluster console URL from oc CLI or uses BRIDGE_BASE_ADDRESS
  • Handles kubeadmin password for login flows (from KUBEADMIN_PASSWORD_FILE or INSTALLER_DIR)
  • Supports running from subdirectories within frontend/ with -d flag
  • Flexible Playwright test argument pass-through
  • Security-conscious password handling (prevents logging)
  • Path validation to prevent directory traversal
  1. test-prow-playwright-e2e.sh - Prow/CI entrypoint wrapper
  • Wraps test-playwright-e2e.sh for CI environments
  • Handles user creation via contrib/create-user.sh (htpasswd IDP)
  • Supports multiple test scenarios: e2e, release, smoke
  • Includes CSP validation check (test-puppeteer-csp)
  • Follows same patterns as existing Cypress Prow tests

The scripts follow bash best practices:

  • set -euo pipefail for robust error handling
  • Proper variable quoting throughout
  • Clear error messages and validation
  • Comprehensive usage documentation

Screenshots / screen recording:
N/A - Infrastructure/tooling change only

Test setup:
Prerequisites to test this PR:

  1. Have an OpenShift cluster running
  2. Be logged in with oc CLI, or set BRIDGE_BASE_ADDRESS
  3. Install Playwright in your test directory:
cd frontend/packages/your-plugin
yarn add -D @playwright/test
yarn playwright install
  1. Create a playwright.config.ts in the test directory

Test cases:

  • Run ./frontend/integration-tests/test-playwright-e2e.sh from frontend directory
  • Verify script discovers cluster console URL correctly
  • Test with -d packages/my-plugin to run from subdirectory
  • Test with -c flag to verify user creation works
  • Run ./test-prow-playwright-e2e.sh e2e from repo root
  • Verify CSP check runs after tests complete
  • Verify kubeadmin password handling (no password in logs)

Browser conformance:
N/A - Infrastructure/tooling change (scripts support any browser Playwright supports)

Additional info:

  • Both scripts include comprehensive usage documentation in header comments
  • Scripts are marked executable (chmod +x)
  • Follows same operational patterns as existing test-cypress.sh
  • Second commit fixes a shell tracing issue found during review

Reviewers and assignees:

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from rhamilto and sanketpathak April 29, 2026 14:20
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vikram-raj
Once this PR has been reviewed and has the lgtm label, please assign rhamilto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

Two new executable shell scripts are introduced to standardize Playwright E2E test execution. test-playwright-e2e.sh serves as the primary entrypoint, handling environment configuration (kubeadmin credentials, base address derivation via oc), CLI argument parsing (-d for install directory, -c for user creation), dependency installation, and test execution via playwright test. test-prow-playwright-e2e.sh wraps this for CI/Prow environments, setting strict Bash options, populating cluster credentials and console URL, provisioning test users, and supporting scenario-based test selection (e2e, release, smoke). Together these establish a consistent interface for E2E test execution across local and CI contexts.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly references the Jira issue (CONSOLE-5197) and accurately describes the main change: adding Playwright E2E test infrastructure for Prow/CI environments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR adds bash shell scripts for Playwright E2E testing infrastructure, not Go Ginkgo test definitions, making the Ginkgo test validation check inapplicable.
Test Structure And Quality ✅ Passed This PR adds bash shell scripts for Playwright E2E testing infrastructure, not Go Ginkgo tests, making the Ginkgo-focused custom check inapplicable.
Microshift Test Compatibility ✅ Passed PR adds only bash shell scripts for Playwright E2E test infrastructure, not new Ginkgo Go e2e tests. The check applies exclusively to new Ginkgo e2e tests with declarations like It(), Describe(), Context(), When().
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any Ginkgo e2e tests. The changes consist solely of two executable bash scripts that serve as test infrastructure and CI orchestration for Playwright tests in the frontend. These are shell scripts that configure environments, parse arguments, and invoke test runners — they contain no Go code and do not define Ginkgo test cases.
Topology-Aware Scheduling Compatibility ✅ Passed PR contains only test infrastructure bash scripts with no Kubernetes resource definitions, deployment manifests, operator code, or scheduling constraints, making the custom check inapplicable.
Ote Binary Stdout Contract ✅ Passed OTE Binary Stdout Contract applies only to Go test binaries; this PR adds only Bash shell scripts for Playwright E2E orchestration, not Go test code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds shell scripts for Playwright test orchestration, not Ginkgo e2e tests. Check only applies to Go-based Ginkgo tests with IPv4 assumptions.
Description check ✅ Passed PR description is comprehensive and well-structured, covering analysis, solution (package selection system, yarn script integration, environment variable changes), test setup, and test cases with clear migration guidance for the breaking change.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
frontend/integration-tests/test-playwright-e2e.sh (1)

49-54: Declare and assign separately to avoid masking return values.

Per ShellCheck SC2155: combining export with command substitution masks the exit status of cat. While the file existence check mitigates risk, separating declaration and assignment is the more robust pattern.

♻️ Proposed fix
 if [ -z "${BRIDGE_KUBEADMIN_PASSWORD:-}" ]; then
   pass_file="${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}"
   if [ -f "$pass_file" ]; then
-    export BRIDGE_KUBEADMIN_PASSWORD="$(cat "$pass_file")"
+    BRIDGE_KUBEADMIN_PASSWORD="$(cat "$pass_file")"
+    export BRIDGE_KUBEADMIN_PASSWORD
   fi
 fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/integration-tests/test-playwright-e2e.sh` around lines 49 - 54, The
existing combined export with command substitution masks cat's exit status;
change the BRIDGE_KUBEADMIN_PASSWORD assignment to be done in two steps: set a
local variable (e.g., tmp_pass) by running cat "$pass_file" and check its exit
status if desired, then export BRIDGE_KUBEADMIN_PASSWORD="$tmp_pass". Update the
block that computes pass_file (using KUBEADMIN_PASSWORD_FILE and INSTALLER_DIR)
and replace the single-line export with this two-step assignment so
BRIDGE_KUBEADMIN_PASSWORD, pass_file, KUBEADMIN_PASSWORD_FILE and INSTALLER_DIR
are used but command substitution is not performed inside export.
test-prow-playwright-e2e.sh (2)

26-27: Minor inconsistency in parameter expansion operators.

Line 26 uses :- (substitute only) while line 27 uses := (set and substitute). This inconsistency could cause subtle issues if INSTALLER_DIR is referenced later without a default. For consistency with line 26 and the pattern in test-playwright-e2e.sh, consider using :-.

♻️ Proposed fix for consistency
 ARTIFACT_DIR=${ARTIFACT_DIR:-/tmp/artifacts}
-INSTALLER_DIR=${INSTALLER_DIR:=${ARTIFACT_DIR}/installer}
+INSTALLER_DIR=${INSTALLER_DIR:-${ARTIFACT_DIR}/installer}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test-prow-playwright-e2e.sh` around lines 26 - 27, The assignment uses
inconsistent parameter expansion: change INSTALLER_DIR from using := to :- to
avoid assigning into the environment (use the same pattern as ARTIFACT_DIR);
specifically update the INSTALLER_DIR expansion so
INSTALLER_DIR=${INSTALLER_DIR:-${ARTIFACT_DIR}/installer} (referencing the
INSTALLER_DIR and ARTIFACT_DIR variables) to ensure it only substitutes a
default without mutating the variable.

29-33: Declare and assign separately to avoid masking return values.

Per ShellCheck SC2155: combining export with command substitution masks the exit status of cat and oc get. While set -e will still catch downstream failures, separating declaration and assignment makes error attribution clearer.

Additionally, unlike test-playwright-e2e.sh, this script doesn't guard against a missing password file—if it's absent, the script fails immediately. This is likely intentional for CI, but worth documenting explicitly.

♻️ Proposed fix
 # don't log kubeadmin-password
 set +x
-export BRIDGE_KUBEADMIN_PASSWORD="$(cat "${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}")"
+BRIDGE_KUBEADMIN_PASSWORD="$(cat "${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password}")"
+export BRIDGE_KUBEADMIN_PASSWORD
 set -x
-export BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')"
+BRIDGE_BASE_ADDRESS="$(oc get consoles.config.openshift.io cluster -o jsonpath='{.status.consoleURL}')"
+export BRIDGE_BASE_ADDRESS
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test-prow-playwright-e2e.sh` around lines 29 - 33, Split the combined
export+command-substitution assignments so the exit status of cat/oc is not
masked: first assign BRIDGE_KUBEADMIN_PASSWORD="$(cat
"${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password"}")" to a
variable (without export), check the command exit status or test file existence
(e.g. guard that the kubeadmin password file exists) and then export
BRIDGE_KUBEADMIN_PASSWORD; do the same for BRIDGE_BASE_ADDRESS by assigning the
output of oc get consoles.config.openshift.io ... to a variable, verify the
command succeeded, and then export BRIDGE_BASE_ADDRESS; reference
BRIDGE_KUBEADMIN_PASSWORD, KUBEADMIN_PASSWORD_FILE, INSTALLER_DIR,
BRIDGE_BASE_ADDRESS and the oc get consoles.config.openshift.io call when
locating the lines to change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/integration-tests/test-playwright-e2e.sh`:
- Around line 49-54: The existing combined export with command substitution
masks cat's exit status; change the BRIDGE_KUBEADMIN_PASSWORD assignment to be
done in two steps: set a local variable (e.g., tmp_pass) by running cat
"$pass_file" and check its exit status if desired, then export
BRIDGE_KUBEADMIN_PASSWORD="$tmp_pass". Update the block that computes pass_file
(using KUBEADMIN_PASSWORD_FILE and INSTALLER_DIR) and replace the single-line
export with this two-step assignment so BRIDGE_KUBEADMIN_PASSWORD, pass_file,
KUBEADMIN_PASSWORD_FILE and INSTALLER_DIR are used but command substitution is
not performed inside export.

In `@test-prow-playwright-e2e.sh`:
- Around line 26-27: The assignment uses inconsistent parameter expansion:
change INSTALLER_DIR from using := to :- to avoid assigning into the environment
(use the same pattern as ARTIFACT_DIR); specifically update the INSTALLER_DIR
expansion so INSTALLER_DIR=${INSTALLER_DIR:-${ARTIFACT_DIR}/installer}
(referencing the INSTALLER_DIR and ARTIFACT_DIR variables) to ensure it only
substitutes a default without mutating the variable.
- Around line 29-33: Split the combined export+command-substitution assignments
so the exit status of cat/oc is not masked: first assign
BRIDGE_KUBEADMIN_PASSWORD="$(cat
"${KUBEADMIN_PASSWORD_FILE:-${INSTALLER_DIR}/auth/kubeadmin-password"}")" to a
variable (without export), check the command exit status or test file existence
(e.g. guard that the kubeadmin password file exists) and then export
BRIDGE_KUBEADMIN_PASSWORD; do the same for BRIDGE_BASE_ADDRESS by assigning the
output of oc get consoles.config.openshift.io ... to a variable, verify the
command succeeded, and then export BRIDGE_BASE_ADDRESS; reference
BRIDGE_KUBEADMIN_PASSWORD, KUBEADMIN_PASSWORD_FILE, INSTALLER_DIR,
BRIDGE_BASE_ADDRESS and the oc get consoles.config.openshift.io call when
locating the lines to change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 377bba5c-95b1-42b3-bcf9-a9d6a82af102

📥 Commits

Reviewing files that changed from the base of the PR and between 5846f6a and 4114813.

📒 Files selected for processing (2)
  • frontend/integration-tests/test-playwright-e2e.sh
  • test-prow-playwright-e2e.sh
📜 Review details
🧰 Additional context used
🪛 Shellcheck (0.11.0)
frontend/integration-tests/test-playwright-e2e.sh

[warning] 52-52: Declare and assign separately to avoid masking return values.

(SC2155)

test-prow-playwright-e2e.sh

[warning] 31-31: Declare and assign separately to avoid masking return values.

(SC2155)


[warning] 33-33: Declare and assign separately to avoid masking return values.

(SC2155)

🔇 Additional comments (6)
frontend/integration-tests/test-playwright-e2e.sh (4)

1-43: LGTM on script header and initialization.

The documentation is thorough, strict bash options (set -euo pipefail) are correctly applied, and the frontend/ working directory enforcement is a sensible guard. The NO_COLOR handling for CI environments aligns with the existing Cypress test patterns.


56-72: LGTM on BRIDGE_BASE_ADDRESS derivation.

Good defensive checks: verifying oc availability before use, validating the query result is non-empty, and providing actionable error messages. The JSONPath query for consoles.config.openshift.io/cluster is correct for fetching the console URL.


74-93: LGTM on argument parsing and dependency handling.

The getopts handling is clean, the usage message covers the expected interface, and the conditional yarn install guard avoids redundant installs. The create-user.sh invocation correctly uses REPO_ROOT for the absolute path.


95-120: LGTM on path validation and Playwright execution.

The directory traversal prevention (lines 102-105) is well-implemented: it resolves the path canonically before checking containment, handling both exact matches and subdirectories. The fallback to frontend/node_modules for the Playwright binary is a pragmatic approach for monorepo subdirectory packages. Using exec to replace the shell process is efficient.

test-prow-playwright-e2e.sh (2)

35-51: LGTM on user creation and scenario dispatch.

The create-user.sh invocation is safe since the script is idempotent (it checks for existing htpasswd secret). Scenario handling is clean with explicit error on unknown values. The e2e/tests/smoke path argument for the smoke scenario correctly passes to playwright test.


53-55: LGTM on CSP check and directory cleanup.

The NO_SANDBOX=true yarn test-puppeteer-csp follows the established pattern from Cypress Prow tests. The popd correctly balances the earlier pushd.

@vikram-raj
Copy link
Copy Markdown
Member Author

/cc @jhadvig

@openshift-ci openshift-ci Bot requested a review from jhadvig April 29, 2026 14:58
# Environment:
# BRIDGE_BASE_ADDRESS If unset, from oc get consoles.config.openshift.io cluster
# BRIDGE_BASE_PATH Default /
# PLAYWRIGHT_BASE_URL Default ${BRIDGE_BASE_ADDRESS}${BRIDGE_BASE_PATH}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rename to WEB_CONSOLE_URL

#
# Usage (always from repo frontend/):
# ./integration-tests/test-playwright-e2e.sh [playwright test arguments...]
# ./integration-tests/test-playwright-e2e.sh -d packages/my-plugin/e2e tests/smoke.spec.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we're going to set up a Playwright project for each package, so we won't need this option. The script will pass --project=my-plugin to Playwright.

maybe we can replace this option with -n <project-name>

# BRIDGE_BASE_PATH Default /
# PLAYWRIGHT_BASE_URL Default ${BRIDGE_BASE_ADDRESS}${BRIDGE_BASE_PATH}
# INSTALLER_DIR, ARTIFACT_DIR, KUBEADMIN_PASSWORD_FILE Kubeadmin password for login flows
# OPENSHIFT_CI If true, sets NO_COLOR=1 (same as test-cypress.sh)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

when is it false?

# BRIDGE_BASE_PATH Default /
# PLAYWRIGHT_BASE_URL Default ${BRIDGE_BASE_ADDRESS}${BRIDGE_BASE_PATH}
# INSTALLER_DIR, ARTIFACT_DIR, KUBEADMIN_PASSWORD_FILE Kubeadmin password for login flows
# OPENSHIFT_CI If true, sets NO_COLOR=1 (same as test-cypress.sh)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's set CI=true as Playwright will recognize it and use CI ad-hoc settings

Comment on lines +41 to +43
if [ "$OPENSHIFT_CI" = true ]; then
export NO_COLOR=1
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not need to set NO_COLOR, it'll be handled by Playwright if CI is true

exit 1
fi

exec "$playwright_bin" test "$@"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we build a set of scripts defined in package.json as we do in Cypress?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vikram-raj vikram-raj force-pushed the prow-playwright-e2e branch from 4114813 to 2289d0f Compare May 4, 2026 12:05
…2E tests

Enhance the Playwright E2E test infrastructure with package selection
similar to the existing Cypress workflow, plus convenience yarn scripts.

**Package Selection**:
- Add -p flag to run tests for specific packages (console, olm, dev-console, etc.)
- Add -l flag to list available package IDs and their paths
- Support 10 packages: console, olm, dev-console, shipwright, webterminal,
  telemetry, knative, helm, topology, container-security
- Mutual exclusion validation between -p and -d flags

**Yarn Scripts**:
- Add test-playwright-e2e (run from frontend root)
- Add test-playwright-e2e-list (show available packages)
- Add test-playwright-{package} scripts for all 10 supported packages

**Breaking Change**:
- Rename PLAYWRIGHT_BASE_URL to WEB_CONSOLE_URL for consistency with
  test-cypress.sh. Scripts using PLAYWRIGHT_BASE_URL will need to update.

**Other Changes**:
- Simplify usage documentation
- Move option parsing before environment setup for better UX

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@vikram-raj vikram-raj force-pushed the prow-playwright-e2e branch from 2289d0f to 1fb3066 Compare May 4, 2026 12:13
@vikram-raj vikram-raj requested a review from stefanonardo May 4, 2026 12:14
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 4, 2026

@vikram-raj: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants