You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/e2e-tests/CI.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,6 +158,22 @@ The OpenShift CI definitions for PR checks and nightly runs, as well as executio
158
158
159
159
Detailed steps on how the tests and reports are managed can be found in the `run_tests()` function within the `utils.sh` script. The CI pipeline executes tests directly using Playwright's `--project` flag (e.g., `npx playwright test --project=showcase`) rather than yarn script aliases. The `check_and_test()` and `run_tests()` functions accept an explicit Playwright project argument, decoupling the namespace from the test project name for more flexible reuse.
160
160
161
+
### Playwright Project Names (Single Source of Truth)
162
+
163
+
All Playwright project names are defined in a single JSON file: [`e2e-tests/playwright/projects.json`](../../e2e-tests/playwright/projects.json). This file serves as the single source of truth for:
164
+
165
+
-**TypeScript** (`playwright.config.ts`): Imports via `e2e-tests/playwright/projects.ts`
166
+
-**CI/CD Scripts**: Loaded via `.ibm/pipelines/playwright-projects.sh` as `$PW_PROJECT_*` environment variables
167
+
168
+
When adding or modifying Playwright projects, update `projects.json` first. The project names are automatically available as:
When the test run is complete, the status will be reported under your PR checks.
162
178
163
179
> **Important:** The environment in which the PR tests are executed is shared and ephemeral. All PR tests queue for the same environment, which is destroyed and recreated for each PR. Test outputs (screenshots, recordings, walkthroughs, etc.) are stored for a retention period of **6 months** and can be accessed by checking the **Details -> Artifacts** of the test check on the PR.
Copy file name to clipboardExpand all lines: docs/e2e-tests/README.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,15 +89,33 @@ The Playwright command line supports many options; see them [here](https://playw
89
89
npx playwright test e2e-tests/playwright/e2e/your-test-file.spec.ts
90
90
```
91
91
92
-
Our project contains multiple test suites for different environments and configurations. Some useful scripts to run the tests:
92
+
Our project contains multiple test suites for different environments and configurations. Run tests using the Playwright project names defined in [`projects.json`](../../e2e-tests/playwright/projects.json):
93
93
94
94
```bash
95
-
yarn showcase # Runs the showcase test suite
96
-
yarn showcase-rbac # Runs the showcase RBAC test suite
97
-
yarn showcase-1-2-x # Runs the showcase 1.2.x test suite
98
-
yarn showcase-rbac-1-2-x # Runs the showcase RBAC 1.2.x test suite
95
+
# Source the project variables (from repo root)
96
+
source .ibm/pipelines/playwright-projects.sh
97
+
98
+
# Run tests using the project variables
99
+
npx playwright test --project="$PW_PROJECT_SHOWCASE"# General showcase tests
100
+
npx playwright test --project="$PW_PROJECT_SHOWCASE_RBAC"# RBAC tests
101
+
npx playwright test --project="$PW_PROJECT_SHOWCASE_K8S"# Kubernetes tests
102
+
npx playwright test --project="$PW_PROJECT_SHOWCASE_OPERATOR"# Operator tests
103
+
104
+
# Or use the project names directly
105
+
npx playwright test --project=showcase
106
+
npx playwright test --project=showcase-rbac
99
107
```
100
108
109
+
### Playwright Project Names
110
+
111
+
All Playwright project names are defined in [`e2e-tests/playwright/projects.json`](../../e2e-tests/playwright/projects.json). This is the single source of truth for project names used in:
See the [CI documentation](CI.md#playwright-project-names-single-source-of-truth) for more details.
118
+
101
119
## Setting Up Backstage Configuration During the Pipeline
102
120
103
121
[app-config-rhdh.yaml](../../.ibm/pipelines/resources/config_map/app-config-rhdh.yaml) is the configuration file used to add plugins or any other kind of configuration into Backstage during pipeline execution.
0 commit comments