Skip to content

Commit 6cc7ee8

Browse files
committed
feat(ui5): Split skill based on phase applicability
1 parent f3666fe commit 6cc7ee8

2 files changed

Lines changed: 30 additions & 26 deletions

File tree

plugins/ui5/skills/opa5/SKILL.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,12 @@ description: This skill should be used in any OPA5 task - creating, modifying, e
55

66
# OPA5 guidelines and tools
77

8-
## Set up inspection tools **before executing the OPA5 test**
9-
**Purpose:** Efficient inspection of test failures with minimal steps.
10-
**Prerequisites:** A tool to load the OPA5 test in the browser and evaluate javascript in the browser window (e.g. MCP Playwright)
11-
12-
### 1. Set up TestRecorder tooling (UI5 version ≥ 1.147 only)
13-
**Purpose:**
14-
- Diagnose issues by inspecting the live control tree in the browser, including private/internal controls the test needs to find;
15-
- Collect reliable OPA5 snippets for non-trivial actions and assertions.
16-
**Setup:** Follow `references/enable-testrecorder-tooling.md` for detailed instructions.
17-
18-
### 2. Enable pause-on-failure mode (all UI5 versions)
19-
**Purpose:** When enabled, execution pauses on the first test failure and the app remains live in the browser exactly as it was at the point of failure — no teardown, no reload happens automatically. The paused state persists until you explicitly navigate away, so you can inspect the actual UI directly (without reloading) in the browser to see why it differs from what the test expected.
20-
**Setup:** Add the following line to your test entry point (right before `Opa5.extendConfig`):
21-
```javascript
22-
// Inside the existing sap.ui.define callback in your test entry point
23-
sap.ui.test.qunitPause.pauseRule = "assert,timeout"; // enables pause on assertion failures and timeouts
24-
// Opa5.extendConfig({...});
25-
```
26-
27-
## Verification workflow
28-
1. Enable the inspection tools above and load the test in the browser.
29-
2. When the test pauses on failure, inspect the app first — verify the full causal chain with no gaps before changing any code. Rule out app-side issues before assuming the test is wrong.
30-
3. Iterate on the test until all journeys pass.
31-
4. Once all journeys pass, remove the `sap.ui.testrecorder` library from the app and the pause-on-failure rule `sap.ui.test.qunitPause.pauseRule`.
32-
33-
## Handle special cases
8+
## Handle special cases (follow when planning and writing an OPA5 test)
349
- **Initial configuration for OPA5 test** → follow `references/configuration.md`
3510
- **If the test-case spans multiple views** → follow `references/handle-multiple-views.md`
3611
- **Teardown the app** → follow `references/handle-teardown.md`
12+
13+
## Set up browser inspection tools (follow every time **before running the OPA5 test**)
14+
**Purpose:** Efficient inspection of test failures with minimal steps.
15+
**Instructions:** → follow `references/setup-inspection-tools.md`
16+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Set up browser inspection tools
2+
3+
**Prerequisites:** A tool to load the OPA5 test in the browser and evaluate javascript in the browser window (e.g. MCP Playwright)
4+
5+
## 1. Set up TestRecorder tooling (UI5 version ≥ 1.147 only)
6+
**Purpose:**
7+
- Diagnose issues by inspecting the live control tree in the browser, including private/internal controls the test needs to find;
8+
- Collect reliable OPA5 snippets for non-trivial actions and assertions.
9+
**Setup:** Follow `enable-testrecorder-tooling.md` for detailed instructions.
10+
11+
## 2. Enable pause-on-failure mode (all UI5 versions)
12+
**Purpose:** When enabled, execution pauses on the first test failure and the app remains live in the browser exactly as it was at the point of failure — no teardown, no reload happens automatically. The paused state persists until you explicitly navigate away, so you can inspect the actual UI directly (without reloading) in the browser to see why it differs from what the test expected.
13+
**Setup:** Add the following line to your test entry point (right before `Opa5.extendConfig`):
14+
```javascript
15+
// Inside the existing sap.ui.define callback in your test entry point
16+
sap.ui.test.qunitPause.pauseRule = "assert,timeout"; // enables pause on assertion failures and timeouts
17+
// Opa5.extendConfig({...});
18+
```
19+
20+
## Workflow
21+
1. Enable the inspection tools above and load the test in the browser.
22+
2. When the test pauses on failure, inspect the app in the browser — verify the full causal chain with no gaps before changing any code. Rule out app-side issues before assuming the test is wrong.
23+
3. Iterate on the test until all journeys pass.
24+
4. Once all journeys pass, remove the `sap.ui.testrecorder` library from the app and the pause-on-failure rule `sap.ui.test.qunitPause.pauseRule`.

0 commit comments

Comments
 (0)