@smartsoft001-mobilems/claude-plugins 2.75.0 → 2.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: test-e2e
3
+ description: Orchestrate E2E Playwright test creation — scaffold project, inject data-testid attributes, write Page Objects and test specs, and run tests.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Task
12
+ ---
13
+
14
+ # E2E Test Skill
15
+
16
+ Orchestrate the full E2E Playwright testing workflow: ensure project infrastructure exists, inject `data-testid` attributes into changed component templates, write Page Objects and test specs, and run tests.
17
+
18
+ ## Usage
19
+
20
+ ```
21
+ /test-e2e [component-paths or 'changed']
22
+ ```
23
+
24
+ ### Parameters
25
+
26
+ - **component-paths**: Explicit paths to component files (e.g., `libs/shared/angular/src/lib/components/contact-form/contact-form.component.ts`)
27
+ - **`changed`**: Automatically detect changed component templates from `git diff`
28
+
29
+ ## Workflow
30
+
31
+ Execute each step in order:
32
+
33
+ ### Step 1: Identify Target Components
34
+
35
+ **If `changed` is specified:**
36
+
37
+ ```bash
38
+ # Find changed component templates
39
+ git diff --name-only HEAD | grep -E "\.component\.(html|ts)$"
40
+ ```
41
+
42
+ **If explicit paths are provided:**
43
+
44
+ Use the provided paths directly.
45
+
46
+ **Output:** List of component files to process.
47
+
48
+ ### Step 2: Scaffold E2E Project
49
+
50
+ **Delegate to `e2e-project-scaffolder` agent:**
51
+
52
+ ```
53
+ Check if E2E Playwright project exists for the target application.
54
+ If not, scaffold one with Nx generator, multi-browser config, and base Page Object.
55
+ ```
56
+
57
+ The agent will:
58
+ 1. Check for existing E2E project (idempotent)
59
+ 2. Scaffold if missing: Playwright config, directory structure, base page
60
+ 3. Report status
61
+
62
+ **If project already exists:** Continue to Step 3.
63
+ **If scaffolded:** Continue to Step 3.
64
+
65
+ ### Step 3: Inject `data-testid` Attributes
66
+
67
+ **Delegate to `e2e-data-testid-injector` agent:**
68
+
69
+ ```
70
+ Scan the following changed component templates and inject data-testid attributes:
71
+
72
+ Components:
73
+ - [list of component files from Step 1]
74
+
75
+ Rules:
76
+ - Naming convention: {component-name}-{element-type}-{identifier}
77
+ - Target interactive elements only
78
+ - NEVER overwrite existing data-testid attributes
79
+ - Preserve template formatting
80
+ ```
81
+
82
+ The agent will:
83
+ 1. Read each component template
84
+ 2. Identify interactive elements without `data-testid`
85
+ 3. Inject attributes following naming convention
86
+ 4. Report injection summary
87
+
88
+ ### Step 4: Write E2E Tests
89
+
90
+ **Delegate to `e2e-test-writer` agent:**
91
+
92
+ ```
93
+ Write Playwright E2E tests for the following components:
94
+
95
+ Components:
96
+ - [list of component files from Step 1]
97
+
98
+ E2E project location: [path from Step 2]
99
+
100
+ Requirements:
101
+ - Create Page Object per component extending BasePage
102
+ - Create test spec per component
103
+ - Use data-testid selectors exclusively
104
+ - Cover: visibility, interactions, form submissions, navigation, error states
105
+ - Use Playwright auto-waiting (no manual sleeps)
106
+ - Cross-reference all selectors against template data-testid values
107
+ ```
108
+
109
+ The agent will:
110
+ 1. Read component `.ts` and `.html` files
111
+ 2. Create Page Objects in `e2e/src/pages/`
112
+ 3. Create test specs in `e2e/src/specs/`
113
+ 4. Cross-reference selectors against templates
114
+
115
+ ### Step 5: Run E2E Tests
116
+
117
+ ```bash
118
+ # Run E2E tests
119
+ npx nx e2e {app-name}-e2e
120
+ ```
121
+
122
+ **If tests pass:** Report success.
123
+ **If tests fail:** Analyze failures and fix — delegate back to `e2e-test-writer` if needed.
124
+
125
+ ### Step 6: Report Results
126
+
127
+ Generate a summary report:
128
+
129
+ ```markdown
130
+ ## E2E Test Report
131
+
132
+ ### Components Processed
133
+
134
+ | Component | Testids Injected | Tests Written | Status |
135
+ | --------- | ---------------- | ------------- | ------ |
136
+ | ContactFormComponent | 5 | 6 | PASS |
137
+ | ArticleListComponent | 3 | 4 | PASS |
138
+
139
+ ### Summary
140
+
141
+ - **E2E Project**: [existed / scaffolded]
142
+ - **Testids injected**: [total count]
143
+ - **Tests created**: [total count]
144
+ - **Test execution**: [PASS / FAIL with details]
145
+
146
+ ### Files Modified
147
+
148
+ | File | Change |
149
+ | ---- | ------ |
150
+ | `contact-form.component.html` | Added 5 data-testid attributes |
151
+ | `e2e/src/pages/contact-form.page.ts` | New Page Object |
152
+ | `e2e/src/specs/contact-form.spec.ts` | New test spec (6 tests) |
153
+ ```
154
+
155
+ ## Rules
156
+
157
+ 1. **Always scaffold first** — ensure E2E project exists before writing tests
158
+ 2. **Always inject testids first** — ensure selectors exist before writing Page Objects
159
+ 3. **Use agents for specialized work** — delegate to the right agent for each step
160
+ 4. **Run tests after writing** — verify tests pass before reporting success
161
+ 5. **Report comprehensively** — include injection summary, tests created, and execution status
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-legacy",
3
3
  "description": "Development flow skills for legacy Angular 14 projects with Linear-driven workflow",
4
- "version": "2.75.0"
4
+ "version": "2.77.0"
5
5
  }