Skip to content

Commit cb6db34

Browse files
fix: add OCI URL replacement for plugins in plugin-list.yam with key and value pairs
1 parent b60ade2 commit cb6db34

11 files changed

Lines changed: 66 additions & 36 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default defineConfig({
3333
{ text: "Examples", link: "/examples/" },
3434
{ text: "Overlay Testing", link: "/overlay/" },
3535
{
36-
text: "v1.1.9",
36+
text: "v1.1.10",
3737
items: [{ text: "Changelog", link: "/changelog" }],
3838
},
3939
],

docs/api/playwright/base-config.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,22 @@ Raw base configuration object. Use for advanced customization.
5353
testDir: "./tests",
5454
timeout: 90000,
5555
expect: {
56-
timeout: 30000,
56+
timeout: 10000,
5757
},
58-
fullyParallel: true,
5958
forbidOnly: !!process.env.CI,
60-
retries: process.env.CI ? 1 : 0,
61-
workers: "50%",
62-
reporter: [["list"], ["html"]],
59+
retries: Number(process.env.PLAYWRIGHT_RETRIES ?? 0),
60+
workers: process.env.PLAYWRIGHT_WORKERS || "50%",
61+
outputDir: "node_modules/.cache/e2e-test-results",
62+
reporter: [["list"], ["html"], ["json"]],
6363
use: {
6464
viewport: { width: 1920, height: 1080 },
65-
video: "on",
65+
video: { mode: "retain-on-failure", size: { width: 1280, height: 720 } },
6666
trace: "retain-on-failure",
6767
screenshot: "only-on-failure",
68+
actionTimeout: 10000,
69+
navigationTimeout: 50000,
6870
},
69-
globalSetup: require.resolve("./global-setup"),
71+
globalSetup: resolve(import.meta.dirname, "../playwright/global-setup.js"),
7072
}
7173
```
7274

@@ -89,14 +91,16 @@ export default playwrightDefineConfig({
8991
|---------|-------|
9092
| `testDir` | `"./tests"` |
9193
| `timeout` | `90000` |
92-
| `expect.timeout` | `30000` |
93-
| `fullyParallel` | `true` |
94-
| `retries` | `1` (CI), `0` (local) |
95-
| `workers` | `"50%"` |
94+
| `expect.timeout` | `10000` |
95+
| `retries` | `0` (configurable via `PLAYWRIGHT_RETRIES`) |
96+
| `workers` | `"50%"` (configurable via `PLAYWRIGHT_WORKERS`) |
97+
| `outputDir` | `"node_modules/.cache/e2e-test-results"` |
9698
| `viewport` | `1920x1080` |
97-
| `video` | `"on"` |
99+
| `video` | `"retain-on-failure"` at `1280x720` |
98100
| `trace` | `"retain-on-failure"` |
99101
| `screenshot` | `"only-on-failure"` |
102+
| `actionTimeout` | `10000` |
103+
| `navigationTimeout` | `50000` |
100104

101105
## Customization Examples
102106

docs/changelog.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [1.1.9] - Current
5+
## [1.1.10] - Current
6+
7+
### Fixed
8+
- **`plugins-list.yaml` parsing**: Parse as proper YAML instead of text splitting, correctly handling entries with build flags (e.g., `--embed-package`, `--suppress-native-package`) and YAML comments.
9+
10+
### Changed
11+
- **Video recording**: Changed mode from `"on"` to `"retain-on-failure"` and reduced size from `1920x1080` to `1280x720` to save disk space.
12+
- **Workers and retries**: Now configurable via `PLAYWRIGHT_WORKERS` (default: `"50%"`) and `PLAYWRIGHT_RETRIES` (default: `0`) environment variables.
13+
14+
## [1.1.9]
615

716
### Fixed
817
- **OCI URL replacement with user-provided `dynamic-plugins.yaml`**: When a workspace provides its own `dynamic-plugins.yaml`, plugin package paths were not replaced with OCI URLs for PR builds. Extracted shared `replaceWithOCIUrls()` function so both `generateDynamicPluginsConfigFromMetadata()` and `loadAndInjectPluginMetadata()` code paths now perform OCI replacement when `GIT_PR_NUMBER` is set.

docs/guide/configuration/environment-variables.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ These are set automatically during deployment:
2020
| `K8S_CLUSTER_ROUTER_BASE` | OpenShift ingress domain | Global setup |
2121
| `RHDH_BASE_URL` | Full RHDH URL | RHDHDeployment |
2222

23+
## Playwright Variables
24+
25+
| Variable | Description | Default |
26+
|----------|-------------|---------|
27+
| `PLAYWRIGHT_WORKERS` | Number of parallel workers (e.g., `"4"`, `"50%"`) | `"50%"` |
28+
| `PLAYWRIGHT_RETRIES` | Number of test retries on failure | `0` |
29+
2330
## Optional Variables
2431

2532
| Variable | Description | Default |

docs/guide/core-concepts/playwright-config.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ The `defineConfig` function extends your configuration with sensible defaults fo
2626
| `testDir` | `./tests` | Test files location |
2727
| `timeout` | 90,000ms | Test timeout |
2828
| `expect.timeout` | 10,000ms | Assertion timeout |
29-
| `retries` | 1 (CI), 0 (local) | Test retries |
30-
| `workers` | 50% of CPUs | Parallel workers |
29+
| `retries` | `0` (configurable via `PLAYWRIGHT_RETRIES`) | Test retries |
30+
| `workers` | `"50%"` (configurable via `PLAYWRIGHT_WORKERS`) | Parallel workers |
3131
| `outputDir` | `node_modules/.cache/e2e-test-results` | Playwright artifacts |
3232

3333
### Reporter Settings
@@ -44,7 +44,7 @@ The `defineConfig` function extends your configuration with sensible defaults fo
4444
| `trace` | `"retain-on-failure"` |
4545
| `screenshot` | `"only-on-failure"` |
4646
| `viewport` | `{ width: 1920, height: 1080 }` |
47-
| `video` | `"on"` |
47+
| `video` | `"retain-on-failure"` at `1280x720` |
4848
| `actionTimeout` | 10,000ms |
4949
| `navigationTimeout` | 50,000ms |
5050

@@ -118,11 +118,14 @@ export default defineConfig({
118118
## Environment Variables for Configuration
119119

120120
```bash
121-
# Affects retries (2 in CI, 0 locally)
121+
# Enables forbidOnly and auto-cleanup
122122
CI=true
123123

124-
# Custom test directory
125-
# (set via defineConfig, not env var)
124+
# Configure retries (default: 0)
125+
PLAYWRIGHT_RETRIES=2
126+
127+
# Configure parallel workers (default: "50%")
128+
PLAYWRIGHT_WORKERS=4
126129
```
127130

128131
## Using Base Config Directly
@@ -204,7 +207,7 @@ export default defineConfig({
204207
// Browser settings
205208
use: {
206209
viewport: { width: 1920, height: 1080 },
207-
video: "on",
210+
video: { mode: "retain-on-failure", size: { width: 1280, height: 720 } },
208211
trace: "retain-on-failure",
209212
screenshot: "only-on-failure",
210213
},

docs/overlay/examples/basic-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ workspaces/<plugin>/e2e-tests/
6767
"eslint-plugin-check-file": "^3.3.1",
6868
"eslint-plugin-playwright": "^2.4.0",
6969
"prettier": "^3.7.4",
70-
"rhdh-e2e-test-utils": "1.1.9",
70+
"rhdh-e2e-test-utils": "1.1.10",
7171
"typescript": "^5.9.3",
7272
"typescript-eslint": "^8.50.0"
7373
}

docs/overlay/examples/tech-radar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ workspaces/tech-radar/e2e-tests/
7070
"eslint-plugin-check-file": "^3.3.1",
7171
"eslint-plugin-playwright": "^2.4.0",
7272
"prettier": "^3.7.4",
73-
"rhdh-e2e-test-utils": "1.1.9",
73+
"rhdh-e2e-test-utils": "1.1.10",
7474
"typescript": "^5.9.3",
7575
"typescript-eslint": "^8.50.0"
7676
}

docs/overlay/test-structure/directory-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Defines the test package with dependencies and scripts:
6767
"eslint-plugin-check-file": "^3.3.1",
6868
"eslint-plugin-playwright": "^2.4.0",
6969
"prettier": "^3.7.4",
70-
"rhdh-e2e-test-utils": "1.1.9",
70+
"rhdh-e2e-test-utils": "1.1.10",
7171
"typescript": "^5.9.3",
7272
"typescript-eslint": "^8.50.0"
7373
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rhdh-e2e-test-utils",
3-
"version": "1.1.9",
3+
"version": "1.1.10",
44
"description": "Test utilities for RHDH E2E tests",
55
"license": "Apache-2.0",
66
"type": "module",

src/playwright/base-config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { resolve } from "path";
1111
export const baseConfig: PlaywrightTestConfig = {
1212
testDir: "./tests",
1313
forbidOnly: !!process.env.CI,
14-
retries: process.env.CI ? 1 : 0,
15-
workers: "50%",
14+
retries: Number(process.env.PLAYWRIGHT_RETRIES ?? 0),
15+
workers: process.env.PLAYWRIGHT_WORKERS || "50%",
1616
outputDir: "node_modules/.cache/e2e-test-results",
1717
timeout: 90_000,
1818
reporter: [
@@ -26,8 +26,8 @@ export const baseConfig: PlaywrightTestConfig = {
2626
screenshot: "only-on-failure",
2727
viewport: { width: 1920, height: 1080 },
2828
video: {
29-
mode: "on",
30-
size: { width: 1920, height: 1080 },
29+
mode: "retain-on-failure",
30+
size: { width: 1280, height: 720 },
3131
},
3232
actionTimeout: 10_000,
3333
navigationTimeout: 50_000,

0 commit comments

Comments
 (0)