@esimplicitylabs/katalyst-xspec 0.6.0 → 0.7.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.
@@ -7,7 +7,6 @@ Common patterns for TUI (Terminal User Interface) testing with the Katalyst BDD
7
7
  ### Start and Verify
8
8
 
9
9
  ```gherkin
10
- @tui
11
10
  Scenario: Application starts successfully
12
11
  Given I start the TUI application
13
12
  When I wait for "Welcome"
@@ -17,7 +16,6 @@ Scenario: Application starts successfully
17
16
  ### Execute Command
18
17
 
19
18
  ```gherkin
20
- @tui
21
19
  Scenario: Run a command
22
20
  Given I start the TUI application
23
21
  When I type "help"
@@ -28,7 +26,6 @@ Scenario: Run a command
28
26
  ### Interactive Input
29
27
 
30
28
  ```gherkin
31
- @tui
32
29
  Scenario: Respond to prompt
33
30
  Given I start the TUI application
34
31
  When I wait for "Enter your name:"
@@ -42,7 +39,6 @@ Scenario: Respond to prompt
42
39
  ### Menu Navigation
43
40
 
44
41
  ```gherkin
45
- @tui
46
42
  Scenario: Navigate main menu
47
43
  Given I start the TUI application
48
44
  When I wait for "Main Menu"
@@ -61,7 +57,6 @@ Scenario: Navigate main menu
61
57
  ### Arrow Key Navigation
62
58
 
63
59
  ```gherkin
64
- @tui
65
60
  Scenario: Navigate with arrow keys
66
61
  Given I start the TUI application
67
62
  When I wait for "Select option:"
@@ -73,7 +68,6 @@ Scenario: Navigate with arrow keys
73
68
  ### Navigate to Specific Item
74
69
 
75
70
  ```gherkin
76
- @tui
77
71
  Scenario: Select specific menu item
78
72
  Given I start the TUI application
79
73
  When I wait for "Menu"
@@ -84,7 +78,6 @@ Scenario: Select specific menu item
84
78
  ### Back Navigation
85
79
 
86
80
  ```gherkin
87
- @tui
88
81
  Scenario: Go back to previous screen
89
82
  Given I start the TUI application
90
83
  When I navigate to "Settings" and select
@@ -98,7 +91,6 @@ Scenario: Go back to previous screen
98
91
  ### Fill Single Field
99
92
 
100
93
  ```gherkin
101
- @tui
102
94
  Scenario: Fill text field
103
95
  Given I start the TUI application
104
96
  When I wait for "Username:"
@@ -112,11 +104,10 @@ Scenario: Fill text field
112
104
  ### Fill Form with Table
113
105
 
114
106
  ```gherkin
115
- @tui
116
107
  Scenario: Fill complete form
117
108
  Given I start the TUI application
118
109
  When I wait for "New User"
119
- And I fill the form:
110
+ And I fill the TUI form:
120
111
  | Field | Value |
121
112
  | Name | John Doe |
122
113
  | Email | john@example.com |
@@ -128,7 +119,6 @@ Scenario: Fill complete form
128
119
  ### Select from Dropdown
129
120
 
130
121
  ```gherkin
131
- @tui
132
122
  Scenario: Select dropdown value
133
123
  Given I start the TUI application
134
124
  When I wait for "Configuration"
@@ -143,7 +133,6 @@ Scenario: Select dropdown value
143
133
  ### Special Keys
144
134
 
145
135
  ```gherkin
146
- @tui
147
136
  Scenario: Use special keys
148
137
  Given I start the TUI application
149
138
  When I press "F1"
@@ -155,7 +144,6 @@ Scenario: Use special keys
155
144
  ### Modifier Keys
156
145
 
157
146
  ```gherkin
158
- @tui
159
147
  Scenario: Keyboard shortcuts
160
148
  Given I start the TUI application
161
149
  When I press ctrl+s
@@ -171,7 +159,6 @@ Scenario: Keyboard shortcuts
171
159
  ### Text Editing
172
160
 
173
161
  ```gherkin
174
- @tui
175
162
  Scenario: Edit text
176
163
  Given I start the TUI application
177
164
  When I wait for "Editor"
@@ -254,7 +241,6 @@ Scenario: Long operation
254
241
  ### Confirm Dialog
255
242
 
256
243
  ```gherkin
257
- @tui
258
244
  Scenario: Confirm action
259
245
  Given I start the TUI application
260
246
  When I type "delete all"
@@ -267,7 +253,6 @@ Scenario: Confirm action
267
253
  ### Cancel Dialog
268
254
 
269
255
  ```gherkin
270
- @tui
271
256
  Scenario: Cancel action
272
257
  Given I start the TUI application
273
258
  When I type "delete all"
@@ -280,7 +265,6 @@ Scenario: Cancel action
280
265
  ### Dismiss Dialog
281
266
 
282
267
  ```gherkin
283
- @tui
284
268
  Scenario: Dismiss with escape
285
269
  Given I start the TUI application
286
270
  When I press "F1"
@@ -294,7 +278,6 @@ Scenario: Dismiss with escape
294
278
  ### Create Baseline Snapshot
295
279
 
296
280
  ```gherkin
297
- @tui
298
281
  Scenario: Capture main screen
299
282
  Given I start the TUI application
300
283
  When I wait for "Dashboard"
@@ -304,7 +287,6 @@ Scenario: Capture main screen
304
287
  ### Verify Against Snapshot
305
288
 
306
289
  ```gherkin
307
- @tui
308
290
  Scenario: Verify screen matches snapshot
309
291
  Given I start the TUI application
310
292
  When I wait for "Dashboard"
@@ -314,7 +296,6 @@ Scenario: Verify screen matches snapshot
314
296
  ### Multiple Snapshots
315
297
 
316
298
  ```gherkin
317
- @tui
318
299
  Scenario: Capture workflow snapshots
319
300
  Given I start the TUI application
320
301
  When I wait for "Welcome"
@@ -332,7 +313,6 @@ Scenario: Capture workflow snapshots
332
313
  ### Error Messages
333
314
 
334
315
  ```gherkin
335
- @tui
336
316
  Scenario: Show error on invalid input
337
317
  Given I start the TUI application
338
318
  When I type "invalid-command"
@@ -343,11 +323,10 @@ Scenario: Show error on invalid input
343
323
  ### Validation Errors
344
324
 
345
325
  ```gherkin
346
- @tui
347
326
  Scenario: Form validation
348
327
  Given I start the TUI application
349
328
  When I wait for "New User"
350
- And I fill the form:
329
+ And I fill the TUI form:
351
330
  | Field | Value |
352
331
  | Email | not-an-email |
353
332
  And I submit the form
@@ -359,7 +338,6 @@ Scenario: Form validation
359
338
  ### Restart Application
360
339
 
361
340
  ```gherkin
362
- @tui
363
341
  Scenario: Application restart
364
342
  Given I start the TUI application
365
343
  When I wait for "Ready"
@@ -375,7 +353,6 @@ Scenario: Application restart
375
353
  ### Quit Application
376
354
 
377
355
  ```gherkin
378
- @tui
379
356
  Scenario: Graceful quit
380
357
  Given I start the TUI application
381
358
  When I quit the application
@@ -390,7 +367,6 @@ Scenario: Force quit
390
367
  ## Complete Example: CLI Todo App
391
368
 
392
369
  ```gherkin
393
- @tui
394
370
  Feature: Todo CLI Application
395
371
  As a user
396
372
  I want to manage todos from the terminal
@@ -446,7 +422,7 @@ Feature: Todo CLI Application
446
422
  And I press enter
447
423
  Then I should see "Settings"
448
424
 
449
- When I fill the form:
425
+ When I fill the TUI form:
450
426
  | Field | Value |
451
427
  | Theme | Dark |
452
428
  | Compact | Yes |
@@ -7,7 +7,6 @@ Common patterns for UI testing with the Katalyst BDD framework.
7
7
  ### Basic Navigation
8
8
 
9
9
  ```gherkin
10
- @ui
11
10
  Scenario: Navigate to page
12
11
  Given I navigate to "/dashboard"
13
12
  Then I should see text "Dashboard"
@@ -17,7 +16,6 @@ Scenario: Navigate to page
17
16
  ### Navigation with Auth
18
17
 
19
18
  ```gherkin
20
- @ui
21
19
  Scenario: Navigate after login
22
20
  Given I am authenticated in UI as "user"
23
21
  Given I navigate to "/profile"
@@ -27,7 +25,6 @@ Scenario: Navigate after login
27
25
  ### Back Navigation
28
26
 
29
27
  ```gherkin
30
- @ui
31
28
  Scenario: Go back to previous page
32
29
  Given I navigate to "/page1"
33
30
  When I click the link "Go to Page 2"
@@ -41,7 +38,6 @@ Scenario: Go back to previous page
41
38
  ### Simple Login Form
42
39
 
43
40
  ```gherkin
44
- @ui
45
41
  Scenario: User login
46
42
  Given I navigate to "/login"
47
43
  When I fill in "Email" with "user@example.com"
@@ -54,7 +50,6 @@ Scenario: User login
54
50
  ### Login with Fetch Intercept (Bypassing Auth)
55
51
 
56
52
  ```gherkin
57
- @ui
58
53
  Scenario: Test page as authenticated user
59
54
  Given I am authenticated in UI as "admin"
60
55
  Given I navigate to "/admin/dashboard"
@@ -64,7 +59,6 @@ Scenario: Test page as authenticated user
64
59
  ### Login with Specific Roles
65
60
 
66
61
  ```gherkin
67
- @ui
68
62
  Scenario: Test with multiple roles
69
63
  Given I am authenticated in UI as "admin,manager,editor"
70
64
  Given I navigate to "/settings"
@@ -75,7 +69,6 @@ Scenario: Test with multiple roles
75
69
  ### Login with Tenant
76
70
 
77
71
  ```gherkin
78
- @ui
79
72
  Scenario: Multi-tenant login
80
73
  Given I am authenticated in UI as "admin" for tenant "acme-corp"
81
74
  Given I navigate to "/dashboard"
@@ -87,7 +80,6 @@ Scenario: Multi-tenant login
87
80
  ### Simple Form Fill
88
81
 
89
82
  ```gherkin
90
- @ui
91
83
  Scenario: Fill contact form
92
84
  Given I navigate to "/contact"
93
85
  When I fill in "Name" with "John Doe"
@@ -100,7 +92,6 @@ Scenario: Fill contact form
100
92
  ### Form with Data Table
101
93
 
102
94
  ```gherkin
103
- @ui
104
95
  Scenario: Fill registration form
105
96
  Given I navigate to "/register"
106
97
  When I fill the form:
@@ -117,7 +108,6 @@ Scenario: Fill registration form
117
108
  ### Form with Dropdowns
118
109
 
119
110
  ```gherkin
120
- @ui
121
111
  Scenario: Fill form with dropdown
122
112
  Given I navigate to "/settings"
123
113
  When I fill in "Display Name" with "John"
@@ -130,7 +120,6 @@ Scenario: Fill form with dropdown
130
120
  ### Clear and Fill Form
131
121
 
132
122
  ```gherkin
133
- @ui
134
123
  Scenario: Update existing form data
135
124
  Given I navigate to "/profile/edit"
136
125
  When I clear and fill the form:
@@ -144,7 +133,6 @@ Scenario: Update existing form data
144
133
  ### Form Validation
145
134
 
146
135
  ```gherkin
147
- @ui
148
136
  Scenario: Form shows validation errors
149
137
  Given I navigate to "/register"
150
138
  When I fill in "Email" with "invalid-email"
@@ -245,7 +233,6 @@ Then I verify that "first" element with "test ID" "result" becomes "visible" dur
245
233
  ### Modal Interaction
246
234
 
247
235
  ```gherkin
248
- @ui
249
236
  Scenario: Confirm deletion in modal
250
237
  Given I navigate to "/items"
251
238
  When I click the button "Delete"
@@ -259,7 +246,6 @@ Scenario: Confirm deletion in modal
259
246
  ### Cancel Modal
260
247
 
261
248
  ```gherkin
262
- @ui
263
249
  Scenario: Cancel modal
264
250
  Given I navigate to "/items"
265
251
  When I click the button "Delete"
@@ -273,7 +259,6 @@ Scenario: Cancel modal
273
259
  ### Tab Interaction
274
260
 
275
261
  ```gherkin
276
- @ui
277
262
  Scenario: Switch between tabs
278
263
  Given I navigate to "/settings"
279
264
  Then the "General" tab should be active
@@ -285,7 +270,6 @@ Scenario: Switch between tabs
285
270
  ### Sidebar Navigation
286
271
 
287
272
  ```gherkin
288
- @ui
289
273
  Scenario: Sidebar navigation
290
274
  Given I navigate to "/app"
291
275
  Then the sidebar should be visible
@@ -298,7 +282,6 @@ Scenario: Sidebar navigation
298
282
  ### Test Mobile View
299
283
 
300
284
  ```gherkin
301
- @ui
302
285
  Scenario: Mobile navigation
303
286
  Given the viewport is "mobile" size
304
287
  Given I navigate to "/home"
@@ -310,7 +293,6 @@ Scenario: Mobile navigation
310
293
  ### Test Custom Viewport
311
294
 
312
295
  ```gherkin
313
- @ui
314
296
  Scenario: Test at specific resolution
315
297
  Given the viewport is 1920x1080
316
298
  Given I navigate to "/dashboard"
@@ -362,7 +344,6 @@ Then I log all cookies
362
344
  ## Complete Example: E-commerce Checkout
363
345
 
364
346
  ```gherkin
365
- @ui
366
347
  Feature: Checkout Flow
367
348
  As a customer
368
349
  I want to complete checkout
@@ -9,22 +9,23 @@ This skill helps you get started with the @esimplicitylabs/katalyst-xspec BDD te
9
9
 
10
10
  ## Step 1: Scaffold a New Project
11
11
 
12
- Run the scaffolding command:
12
+ Run the scaffolding command (positional target folder, or `.` for the current folder):
13
13
 
14
14
  ```bash
15
- npx @esimplicitylabs/katalyst-xspec init
15
+ npx @esimplicitylabs/katalyst-xspec init my-tests
16
+ cd my-tests
17
+ npm install
18
+ npx playwright install chromium # REQUIRED once: UI tests fail without the browser
19
+ npm test # scaffolded examples pass with no .env
16
20
  ```
17
21
 
18
22
  Options:
19
- - `--dir <name>` - Create in specific directory
23
+ - `<dir>` or `--dir <name>` - Target directory (`init .` = current folder)
20
24
  - `--force` - Overwrite existing files
25
+ - `--with-skills` / `--no-skills` - Install (or skip) agent skills without prompting
26
+ - `--skills-agents opencode,claude-code,cursor,generic` - Which agents get skills
21
27
 
22
- Example:
23
- ```bash
24
- npx @esimplicitylabs/katalyst-xspec init --dir my-tests
25
- cd my-tests
26
- npm install
27
- ```
28
+ The project's `package.json` name comes from the folder name (npm-safe, e.g. `My Demo` -> `my-demo`).
28
29
 
29
30
  ## Step 2: Understand the Project Structure
30
31
 
@@ -34,22 +35,20 @@ The scaffold creates:
34
35
  my-tests/
35
36
  ├── features/
36
37
  │ ├── api/
37
- │ │ └── 00_api_examples.feature # API test examples
38
+ │ │ └── example.feature # JSONPlaceholder: GET /users/1, POST /posts
38
39
  │ ├── ui/
39
- │ │ └── 00_ui_examples.feature # UI test examples
40
- │ ├── hybrid/
41
- │ │ └── 00_hybrid_examples.feature # Combined API+UI tests
42
- │ ├── tui/
43
- │ │ └── 00_tui_examples.feature # Terminal UI tests
40
+ │ │ └── example.feature # Sauce Demo login (standard_user / secret_sauce)
44
41
  │ └── steps/
45
- │ ├── fixtures.ts # Adapter configuration
46
- │ └── steps.ts # Step registration
47
- ├── playwright.config.ts # BDD project config
48
- ├── .env.example # Environment template
49
- ├── tsconfig.json # TypeScript config
50
- └── package.json # Dependencies
42
+ │ ├── fixtures.ts # Adapter configuration
43
+ │ └── steps.ts # Step registration
44
+ ├── playwright.config.ts # Projects: api, ui (tui commented out)
45
+ ├── .env.example # Environment template
46
+ ├── tsconfig.json # TypeScript config
47
+ └── package.json # Dependencies
51
48
  ```
52
49
 
50
+ Each Playwright project reads one folder. Steps are untagged: any step works in any scenario. Do NOT add `@api`/`@ui`/`@hybrid`/`@tui` tags — they are not needed (and are ignored).
51
+
53
52
  ### Key Files
54
53
 
55
54
  **`features/steps/fixtures.ts`** - Configures adapters:
@@ -75,17 +74,21 @@ export { test };
75
74
  ```typescript
76
75
  import { defineBddProject } from 'playwright-bdd';
77
76
 
77
+ import { tagsForProject, resolveExtraTags } from '@esimplicitylabs/katalyst-xspec';
78
+
79
+ const tags = tagsForProject({ extraTags: resolveExtraTags(process.env.TEST_TAGS) });
80
+
78
81
  const apiBdd = defineBddProject({
79
82
  name: 'api',
80
- features: 'features/api/**/*.feature',
83
+ features: 'features/api/**/*.feature', // selected by folder only
81
84
  steps: 'features/steps/**/*.ts',
82
- tags: '@api',
85
+ tags, // only skips @Skip/@ignore + applies TEST_TAGS
83
86
  });
84
87
  ```
85
88
 
86
- ## Step 3: Configure Environment
89
+ ## Step 3: Point It at Your App
87
90
 
88
- Copy the environment template:
91
+ The examples use absolute URLs to public demo sites. To test your own app, copy the environment template:
89
92
 
90
93
  ```bash
91
94
  cp .env.example .env
@@ -99,9 +102,9 @@ API_BASE_URL=http://localhost:3000
99
102
 
100
103
  # Authentication (required -- no hardcoded defaults)
101
104
  DEFAULT_ADMIN_USERNAME=admin@example.com
102
- DEFAULT_ADMIN_PASSWORD=admin123
105
+ DEFAULT_ADMIN_PASSWORD=changeme
103
106
  DEFAULT_USER_USERNAME=user@example.com
104
- DEFAULT_USER_PASSWORD=user123
107
+ DEFAULT_USER_PASSWORD=changeme
105
108
  API_AUTH_LOGIN_PATH=/auth/login
106
109
 
107
110
  # UI Configuration
@@ -113,13 +116,15 @@ HEADLESS=true
113
116
  # CLEANUP_RULES='[{"varMatch":"user","path":"/api/users/{id}"}]'
114
117
  ```
115
118
 
116
- ### Required Variables by Test Type
119
+ Then use relative paths in features, e.g. `Given I navigate to "/login"`, `When I GET "/health"`.
117
120
 
118
- | Test Type | Required Variables |
121
+ ### Required Variables by Step Type
122
+
123
+ | Steps used | Required Variables |
119
124
  |-----------|-------------------|
120
- | `@api` | `API_BASE_URL` |
121
- | `@ui` | `FRONTEND_URL` or `BASE_URL` |
122
- | `@hybrid` | Both API and UI variables |
125
+ | API steps with relative paths | `API_BASE_URL` |
126
+ | UI steps with relative paths | `FRONTEND_URL` or `BASE_URL` |
127
+ | Both in one scenario | Both API and UI variables |
123
128
  | Auth steps | `DEFAULT_*_USERNAME`, `DEFAULT_*_PASSWORD` |
124
129
 
125
130
  ## Step 4: Write Your First Test
@@ -129,7 +134,6 @@ HEADLESS=true
129
134
  Create `features/api/health.feature`:
130
135
 
131
136
  ```gherkin
132
- @api
133
137
  Feature: Health Check
134
138
 
135
139
  Scenario: API is healthy
@@ -142,7 +146,6 @@ Feature: Health Check
142
146
  Create `features/ui/home.feature`:
143
147
 
144
148
  ```gherkin
145
- @ui
146
149
  Feature: Home Page
147
150
 
148
151
  Scenario: Home page loads
@@ -150,12 +153,11 @@ Feature: Home Page
150
153
  Then I should see text "Welcome"
151
154
  ```
152
155
 
153
- ### Hybrid Test
156
+ ### Mixed API + UI Test
154
157
 
155
- Create `features/hybrid/workflow.feature`:
158
+ Any scenario can mix API and UI steps — no tag or separate project needed. Put it in a folder a project reads (e.g. `features/ui/`, since it needs a browser). Create `features/ui/workflow.feature`:
156
159
 
157
160
  ```gherkin
158
- @hybrid
159
161
  Feature: User Workflow
160
162
 
161
163
  Scenario: Create via API, verify in UI
@@ -173,19 +175,18 @@ Feature: User Workflow
173
175
 
174
176
  ## Step 5: Run Tests
175
177
 
176
- **IMPORTANT:** You must generate Playwright tests before running.
178
+ `npm test` runs `bddgen && playwright test` (generates specs from features, then runs them). If you call `npx playwright test` directly, run `npm run gen` first.
177
179
 
178
180
  ```bash
179
- # 1. Generate tests from feature files (REQUIRED)
180
- npm run gen
181
-
182
- # 2. Run all tests
181
+ # Run all tests
183
182
  npm test
184
183
 
185
- # 3. Run specific project
186
- npx playwright test --project=api
187
- npx playwright test --project=ui
188
- npx playwright test --project=hybrid
184
+ # Run one project (folder)
185
+ npx playwright test --project api
186
+ npx playwright test --project ui
187
+
188
+ # Run only scenarios with your own tag
189
+ TEST_TAGS=@smoke npm test
189
190
  ```
190
191
 
191
192
  ### Common Run Commands
@@ -225,16 +226,14 @@ Open the Playwright report:
225
226
  npx playwright show-report
226
227
  ```
227
228
 
228
- ## Common Tags
229
+ ## Optional Tags
230
+
231
+ Tags are only for your own grouping and filtering (`TEST_TAGS=@smoke npm test`, or `TEST_TAGS=smoke,critical`).
229
232
 
230
233
  | Tag | Purpose |
231
234
  |-----|---------|
232
- | `@api` | API-only tests |
233
- | `@ui` | UI-only tests |
234
- | `@tui` | Terminal UI tests |
235
- | `@hybrid` | Combined API+UI tests |
236
235
  | `@smoke` | Quick smoke tests |
237
- | `@Skip` | Skip this scenario |
236
+ | `@Skip` / `@ignore` | Skip this scenario (excluded by default) |
238
237
  | `@wip` | Work in progress |
239
238
 
240
239
  ## Quick Reference: Essential Steps
@@ -266,14 +265,15 @@ Given I register cleanup DELETE "/resource/{id}"
266
265
 
267
266
  | Issue | Solution |
268
267
  |-------|----------|
269
- | "No tests found" | Run `npm run gen` first |
270
- | Steps not available | Check you have the correct tag |
268
+ | "No tests found" | Run `npm run gen` first; check the feature is in a folder a project reads |
269
+ | "Executable doesn't exist" | Run `npx playwright install chromium` |
270
+ | Step not found | Check exact step wording in `katalyst-bdd-step-reference` (no tags needed) |
271
271
  | Auth fails | Verify `.env` credentials |
272
272
  | Can't find element | Use `When I pause for debugging` |
273
273
 
274
274
  ## Next Steps
275
275
 
276
- 1. **Create more tests** - Add feature files to `features/api/`, `features/ui/`, etc.
276
+ 1. **Create more tests** - Add feature files to `features/api/` or `features/ui/`
277
277
  2. **Learn steps** - See full step reference with `katalyst-bdd-step-reference` skill
278
278
  3. **Patterns** - Learn test patterns with `katalyst-bdd-create-test` skill
279
279
  4. **Custom adapters** - Extend framework with `katalyst-bdd-architecture` skill
@@ -290,3 +290,5 @@ This updates:
290
290
  - Package dependencies
291
291
  - Configuration templates
292
292
  - Step definitions
293
+
294
+ Upgrading from 0.6 or earlier: run `npx katalyst-xspec upgrade --migrate` to remove old `@api`/`@ui`/`@hybrid`/`@tui` tag filters from `playwright.config.*`. Old tags left in feature files are harmless.
@@ -1,24 +1,19 @@
1
1
  ---
2
2
  name: katalyst-bdd-step-reference
3
- description: Complete reference of all available BDD step definitions in the Katalyst framework. Use when writing feature files, looking up step syntax, understanding what steps are available for a tag, or finding the right step for a specific action like clicking, filling forms, making API calls, or terminal interactions.
3
+ description: Complete reference of all available BDD step definitions in the Katalyst framework. Use when writing feature files, looking up step syntax, checking exact step wording, or finding the right step for a specific action like clicking, filling forms, making API calls, or terminal interactions.
4
4
  ---
5
5
 
6
6
  # Katalyst BDD Step Reference
7
7
 
8
8
  This skill provides a complete reference of all step definitions available in @esimplicitylabs/katalyst-xspec.
9
9
 
10
- ## Tag System
10
+ ## Where Steps Work
11
11
 
12
- Steps are enabled based on the feature/scenario tag:
12
+ Built-in steps are untagged. Once registered (`registerApiSteps`, `registerUiSteps`, `registerSharedSteps`, `registerTuiSteps`, ...), **any step works in any scenario**, so a single scenario can mix API, UI and shared steps.
13
13
 
14
- | Tag | Available Steps | Use Case |
15
- |-----|-----------------|----------|
16
- | `@api` | API + Shared | HTTP API testing only |
17
- | `@ui` | UI + Shared | Browser UI testing only |
18
- | `@tui` | TUI + Shared | Terminal UI testing only |
19
- | `@hybrid` | API + UI + Shared | Combined API and UI testing |
20
-
21
- **Important:** Always tag your feature or scenario. Without a tag, steps may not be available.
14
+ - Do not add `{ tags: ... }` to steps or type tags to scenarios; they are not needed.
15
+ - Playwright projects pick feature files by folder (`features/api/`, `features/ui/`).
16
+ - Tags like `@smoke` or `@wip` are optional, for the user's own filtering (`TEST_TAGS`).
22
17
 
23
18
  ## Variable Interpolation
24
19
 
@@ -31,7 +26,7 @@ When I GET "/users/{userId}" # Becomes /users/123
31
26
 
32
27
  ## Quick Reference - Most Common Steps
33
28
 
34
- ### API Steps (`@api` or `@hybrid`)
29
+ ### API Steps
35
30
 
36
31
  | Step | Example |
37
32
  |------|---------|
@@ -49,7 +44,7 @@ When I GET "/users/{userId}" # Becomes /users/123
49
44
  | `Given I am authenticated as a user via API` | User API authentication |
50
45
  | `Given I set header {string} to {string}` | `Given I set header "X-Custom" to "value"` |
51
46
 
52
- ### UI Steps (`@ui` or `@hybrid`)
47
+ ### UI Steps
53
48
 
54
49
  | Step | Example |
55
50
  |------|---------|
@@ -64,7 +59,7 @@ When I GET "/users/{userId}" # Becomes /users/123
64
59
  | `Then the element {string} should be visible` | `Then the element "#modal" should be visible` |
65
60
  | `When I pause for debugging` | Opens Playwright Inspector |
66
61
 
67
- ### TUI Steps (`@tui`)
62
+ ### TUI Steps
68
63
 
69
64
  | Step | Example |
70
65
  |------|---------|
@@ -73,9 +68,13 @@ When I GET "/users/{userId}" # Becomes /users/123
73
68
  | `When I press {string}` | `When I press "Enter"` |
74
69
  | `When I press enter` | Press Enter key |
75
70
  | `Then I should see {string}` | `Then I should see "Welcome"` |
71
+ | `Then I should see {string} in the terminal` | `Then I should see "Ready" in the terminal` |
76
72
  | `Then the screen should contain {string}` | Assert screen has text |
73
+ | `When I fill the TUI form:` | Data table of `field`/`value` |
74
+
75
+ TUI has no `I should see text {string}` (that's the UI step), and the TUI form step is `I fill the TUI form:` (UI uses `I fill the form:`).
77
76
 
78
- ### Shared Steps (All Tags)
77
+ ### Shared Steps
79
78
 
80
79
  | Step | Example |
81
80
  |------|---------|
@@ -106,7 +105,6 @@ For complete step definitions with all parameters and examples:
106
105
  ### API CRUD Test
107
106
 
108
107
  ```gherkin
109
- @api
110
108
  Scenario: Create and fetch user
111
109
  Given I am authenticated as an admin via API
112
110
  When I POST "/users" with JSON body:
@@ -122,7 +120,6 @@ Scenario: Create and fetch user
122
120
  ### UI Login Test
123
121
 
124
122
  ```gherkin
125
- @ui
126
123
  Scenario: User login
127
124
  Given I navigate to "/login"
128
125
  When I fill in "Email" with "user@example.com"
@@ -131,10 +128,9 @@ Scenario: User login
131
128
  Then I should see text "Dashboard"
132
129
  ```
133
130
 
134
- ### Hybrid Test (API + UI)
131
+ ### Mixed API + UI Test (no tag needed)
135
132
 
136
133
  ```gherkin
137
- @hybrid
138
134
  Scenario: Create via API, verify in UI
139
135
  Given I am authenticated as an admin via API
140
136
  When I POST "/users" with JSON body:
@@ -1,6 +1,6 @@
1
1
  # API Steps Reference
2
2
 
3
- Complete reference for API steps. Available in `@api` and `@hybrid` scenarios.
3
+ Complete reference for API steps. Steps are untagged and work in any scenario (including alongside UI steps).
4
4
 
5
5
  ## HTTP Method Steps
6
6
 
@@ -207,7 +207,6 @@ And I store the value at "items[0].id" as "firstItemId"
207
207
  ## Complete API Example
208
208
 
209
209
  ```gherkin
210
- @api
211
210
  Feature: User Management API
212
211
 
213
212
  Background: