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: .claude/skills/deploy-rhdh/SKILL.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,30 +51,30 @@ Vault authentication, cluster service account setup, RHDH deployment, and test e
51
51
52
52
### CLI Mode (Preferred)
53
53
54
-
CLI mode requires **all three** flags (`-j`, `-r`, `-t`) to avoid falling into interactive mode:
54
+
**CRITICAL**: CLI mode requires **all three** flags (`-j`, `-r`, `-t`). If `-r` is omitted, the script falls into interactive mode and will hang in automated contexts.
**Example** — deploying for a main branch OCP Helm nightly job (deploy-only):
62
+
```bash
63
+
cd e2e-tests
64
+
./local-run.sh -j periodic-ci-redhat-developer-rhdh-main-e2e-ocp-v4-20-helm-nightly -r rhdh-community/rhdh -t next -s
65
+
```
66
+
61
67
**Parameters:**
62
68
-`-j / --job`: The **full Prow CI job name** extracted from the Prow URL. The `openshift-ci-tests.sh` handler uses bash glob patterns (like `*ocp*helm*nightly*`) to match, so the full name works correctly. Example: `periodic-ci-redhat-developer-rhdh-main-e2e-ocp-v4-20-helm-nightly`
63
69
-`-r / --repo`: Image repository (**required** for CLI mode — without it the script enters interactive mode)
64
70
-`-t / --tag`: Image tag (e.g., `1.9`, `next`)
65
71
-`-s / --skip-tests`: Deploy only, skip test execution (useful when you want to run tests manually afterward)
66
72
67
-
Do NOT use shortened job names like `nightly-ocp-helm` for `-j` — these do not match the glob patterns in `openshift-ci-tests.sh`.
73
+
**WARNING**: Do NOT use shortened job names like `nightly-ocp-helm` for `-j` — these do not match the glob patterns in `openshift-ci-tests.sh`.
68
74
69
75
### Image Selection
70
76
71
-
Match the image repo and tag to the release branch:
Copy file name to clipboardExpand all lines: .claude/skills/diagnose-and-fix/SKILL.md
+16-92Lines changed: 16 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,16 @@ Analyze the root cause of a failing E2E test and implement a fix following RHDH
12
12
13
13
Use this skill after reproducing a failure (via `reproduce-failure`) when you have confirmed the test fails and need to determine the root cause and implement a fix.
14
14
15
+
## IMPORTANT: Try the Playwright Healer Agent First
16
+
17
+
**For locator drift and timing/race condition failures (categories 1 and 2 below), always invoke the Playwright healer agent BEFORE doing manual investigation.** The healer can run the test, inspect the live UI, generate correct locators, and edit the code — often resolving the issue end-to-end without manual intervention.
18
+
19
+
```
20
+
@playwright-test-healer Fix the failing test in playwright/e2e/plugins/<plugin>/<spec-file>.spec.ts
21
+
```
22
+
23
+
Only proceed with manual diagnosis if the healer agent cannot resolve the issue (e.g., the failure involves data dependencies, platform-specific behavior, or deployment configuration problems).
24
+
15
25
## Failure Pattern Recognition
16
26
17
27
### 1. Locator Drift
@@ -21,8 +31,8 @@ Use this skill after reproducing a failure (via `reproduce-failure`) when you ha
21
31
**Cause**: The UI has changed and selectors no longer match.
22
32
23
33
**Fix approach**:
24
-
-Use the Playwright healer agent (`@playwright-test-healer`) to replay the test, inspect the current UI via page snapshots, and generate updated locators
25
-
-Update to semantic selectors (see Coding Conventions below)
34
+
-Invoke the Playwright healer agent (`@playwright-test-healer`) — it will replay the test, inspect the current UI via page snapshots, generate updated locators, and edit the code automatically
35
+
-If the healer cannot resolve it, manually update to semantic role-based locators (see project rules)
26
36
- Verify the updated locator works by re-running the test
27
37
28
38
### 2. Timing / Race Condition
@@ -32,7 +42,8 @@ Use this skill after reproducing a failure (via `reproduce-failure`) when you ha
32
42
**Cause**: Test acts before the UI is ready, or waits are insufficient.
33
43
34
44
**Fix approach**:
35
-
- Replace `page.waitForTimeout()` with proper waits: `expect(locator).toBeVisible()`, `page.waitForLoadState()`
45
+
- Invoke the Playwright healer agent first — it can identify timing issues by stepping through the test and observing UI state transitions
46
+
- If manual fixes are needed: replace `page.waitForTimeout()` with proper waits: `expect(locator).toBeVisible()`, `page.waitForLoadState()`
36
47
- Use `expect().toPass()` with retry intervals for inherently async checks:
37
48
```typescript
38
49
awaitexpect(async () => {
@@ -123,96 +134,9 @@ Use `@playwright-test-planner` when you need to understand a complex user flow b
123
134
124
135
Use `@playwright-test-generator` when a test needs major rework and you need to generate new test steps from a plan.
125
136
126
-
## RHDH Project Coding Conventions
127
-
128
-
### Locator Best Practices
129
-
130
-
**Always use semantic (role-based) locators** from `e2e-tests/playwright/support/selectors/semantic-selectors.ts`:
-**Never** use `page.waitForNetworkIdle()` or `networkidle` — it's deprecated and unreliable
213
-
-**Never** use raw CSS class selectors (`.MuiButton-root`) — use semantic selectors
214
-
-**Avoid**`page.waitForTimeout()` for synchronization — use proper waits
215
-
-**Never** hardcode secrets or credentials in test files
139
+
Follow the coding conventions defined in the project rules (`playwright-locators`, `ci-e2e-testing`). Key points: use semantic role-based locators, include component annotations in every spec file, never use CSS class selectors or `waitForNetworkIdle()`.
0 commit comments