@facet-coverage/core 0.1.0 → 0.2.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.
- package/README.md +239 -43
- package/dist/cli/commands/generate.d.ts +1 -0
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +81 -0
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/index.js +3 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/core/TestScanner.d.ts +2 -1
- package/dist/core/TestScanner.d.ts.map +1 -1
- package/dist/core/TestScanner.js +83 -6
- package/dist/core/TestScanner.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,26 +1,65 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# Facet Coverage
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
**Test every facet of your features**
|
|
6
|
+
|
|
7
|
+
*Natural specifications. Multiple perspectives. Rigorous coverage.*
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@facet-coverage/core)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://dl.circleci.com/pipelines/gh/iraycd/facet-coverage)
|
|
12
|
+
[](https://nodejs.org)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Table of Contents
|
|
19
|
+
|
|
20
|
+
- [What is Facet?](#what-is-facet)
|
|
21
|
+
- [Installation](#installation)
|
|
22
|
+
- [Quick Start](#quick-start)
|
|
23
|
+
- [Linking Tests to Facets](#linking-tests-to-facets)
|
|
24
|
+
- [Project Structure](#project-structure)
|
|
25
|
+
- [CLI Commands](#cli-commands)
|
|
26
|
+
- [Playwright Integration](#playwright-integration)
|
|
27
|
+
- [Configuration](#configuration)
|
|
28
|
+
- [ID Patterns](#id-patterns)
|
|
29
|
+
- [Programmatic API](#programmatic-api)
|
|
30
|
+
- [Benefits](#benefits)
|
|
31
|
+
- [How Facet Differs](#how-facet-differs)
|
|
32
|
+
- [Key Principles](#key-principles)
|
|
33
|
+
- [Contributing](#contributing)
|
|
34
|
+
- [License](#license)
|
|
35
|
+
|
|
36
|
+
---
|
|
5
37
|
|
|
6
38
|
## What is Facet?
|
|
7
39
|
|
|
8
40
|
Facet is a modern testing framework that lets you document features from multiple stakeholder perspectives while maintaining exact traceability to your tests.
|
|
9
41
|
|
|
10
42
|
**One feature. Many facets.**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
43
|
+
|
|
44
|
+
| Perspective | Description |
|
|
45
|
+
|-------------|-------------|
|
|
46
|
+
| **Business requirements** | Product owner specifications |
|
|
47
|
+
| **Compliance mandates** | Regulatory requirements (PCI-DSS, GDPR, etc.) |
|
|
48
|
+
| **UX standards** | Design system and accessibility rules |
|
|
49
|
+
| **Technical specs** | Architecture and API contracts |
|
|
15
50
|
|
|
16
51
|
All connected to the same tests. All tracked for coverage.
|
|
17
52
|
|
|
53
|
+
---
|
|
54
|
+
|
|
18
55
|
## Installation
|
|
19
56
|
|
|
20
57
|
```bash
|
|
21
58
|
bun add -d @facet-coverage/core
|
|
22
59
|
```
|
|
23
60
|
|
|
61
|
+
---
|
|
62
|
+
|
|
24
63
|
## Quick Start
|
|
25
64
|
|
|
26
65
|
### 1. Create Your First Facets
|
|
@@ -56,13 +95,17 @@ We handle credit card data, so PCI-DSS compliance is mandatory:
|
|
|
56
95
|
3. **Card masking** - Display only last 4 digits
|
|
57
96
|
```
|
|
58
97
|
|
|
59
|
-
### 2. Generate Structure
|
|
98
|
+
### 2. Generate Structure & Types
|
|
60
99
|
|
|
61
100
|
```bash
|
|
62
101
|
bunx facet generate features/checkout/facets/
|
|
63
102
|
```
|
|
64
103
|
|
|
65
|
-
This creates `features/checkout/.facet
|
|
104
|
+
This creates two files in `features/checkout/.facet/`:
|
|
105
|
+
- `structure.json` - facet definitions
|
|
106
|
+
- `facets.ts` - TypeScript types for type-safe linking
|
|
107
|
+
|
|
108
|
+
**structure.json:**
|
|
66
109
|
|
|
67
110
|
```json
|
|
68
111
|
{
|
|
@@ -90,26 +133,27 @@ This creates `features/checkout/.facet/structure.json`:
|
|
|
90
133
|
|
|
91
134
|
### 3. Link Tests
|
|
92
135
|
|
|
136
|
+
Import the generated types and use `facet()` in your tests:
|
|
137
|
+
|
|
93
138
|
```typescript
|
|
94
139
|
// features/checkout/tests/checkout.spec.ts
|
|
95
|
-
import { test, expect } from '
|
|
96
|
-
import { facet } from '
|
|
97
|
-
|
|
98
|
-
test('guest user completes purchase', {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// Verify compliance: card masking
|
|
108
|
-
const maskedCard = page.locator('.card-last-four');
|
|
109
|
-
await expect(maskedCard).toHaveText('•••• 4242');
|
|
140
|
+
import { test, expect } from 'bun:test'; // or jest, vitest, mocha...
|
|
141
|
+
import { Facets, facet } from '../.facet/facets';
|
|
142
|
+
|
|
143
|
+
test('guest user completes purchase', () => {
|
|
144
|
+
// Declare which facets this test covers
|
|
145
|
+
facet(Facets.BUSINESS_GUEST_PURCHASE_FLOW);
|
|
146
|
+
facet(Facets.COMPLIANCE_PCI_DSS_PAYMENT_REQUIREMENTS);
|
|
147
|
+
|
|
148
|
+
// Your test code
|
|
149
|
+
const order = checkout(cart, 'user@example.com', '4242...');
|
|
150
|
+
expect(order.confirmed).toBe(true);
|
|
151
|
+
expect(order.maskedCard).toBe('•••• 4242'); // PCI-DSS compliance
|
|
110
152
|
});
|
|
111
153
|
```
|
|
112
154
|
|
|
155
|
+
The `facet()` function is type-safe - TypeScript will error if you use an invalid facet ID!
|
|
156
|
+
|
|
113
157
|
### 4. Run Coverage
|
|
114
158
|
|
|
115
159
|
```bash
|
|
@@ -118,20 +162,22 @@ bunx facet analyze
|
|
|
118
162
|
|
|
119
163
|
**Output:**
|
|
120
164
|
```
|
|
121
|
-
|
|
165
|
+
Facet Coverage Report
|
|
122
166
|
|
|
123
167
|
Overall: 100%
|
|
124
168
|
|
|
125
169
|
By Type:
|
|
126
|
-
|
|
127
|
-
|
|
170
|
+
business: 100% (1/1)
|
|
171
|
+
compliance: 100% (1/1)
|
|
128
172
|
|
|
129
173
|
Reports generated:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
174
|
+
.facet-coverage/coverage.json
|
|
175
|
+
.facet-coverage/coverage.html
|
|
176
|
+
.facet-coverage/coverage.md
|
|
133
177
|
```
|
|
134
178
|
|
|
179
|
+
---
|
|
180
|
+
|
|
135
181
|
## Project Structure
|
|
136
182
|
|
|
137
183
|
```
|
|
@@ -141,9 +187,10 @@ project/
|
|
|
141
187
|
│ │ ├── facets/
|
|
142
188
|
│ │ │ ├── business.md # Product owner writes
|
|
143
189
|
│ │ │ ├── compliance.md # Compliance team writes
|
|
144
|
-
│ │ │ └── ux.md
|
|
190
|
+
│ │ │ └── ux.md # UX designer writes
|
|
145
191
|
│ │ ├── .facet/
|
|
146
|
-
│ │ │
|
|
192
|
+
│ │ │ ├── structure.json # Generated facet definitions
|
|
193
|
+
│ │ │ └── facets.ts # Generated TypeScript types
|
|
147
194
|
│ │ └── tests/
|
|
148
195
|
│ │ └── checkout.spec.ts
|
|
149
196
|
│ │
|
|
@@ -160,17 +207,80 @@ project/
|
|
|
160
207
|
└── facet.config.js # Configuration
|
|
161
208
|
```
|
|
162
209
|
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Linking Tests to Facets
|
|
213
|
+
|
|
214
|
+
Use the `facet()` function inside your tests - just like `expect()` but for coverage tracking!
|
|
215
|
+
|
|
216
|
+
### Recommended: Type-Safe with `facet()` Function
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
import { test, expect } from 'bun:test'; // or jest, vitest, mocha...
|
|
220
|
+
import { Facets, facet } from '../.facet/facets';
|
|
221
|
+
|
|
222
|
+
test('guest user can complete a purchase', () => {
|
|
223
|
+
// Declare which facets this test covers - type-safe with autocomplete!
|
|
224
|
+
facet(Facets.BUSINESS_GUEST_PURCHASE_FLOW);
|
|
225
|
+
facet(Facets.COMPLIANCE_PCI_DSS_PAYMENT_REQUIREMENTS);
|
|
226
|
+
|
|
227
|
+
// Your test code
|
|
228
|
+
const order = checkout(cart, email, card);
|
|
229
|
+
expect(order.confirmed).toBe(true);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test('payment meets compliance', () => {
|
|
233
|
+
// Multiple facets in one call
|
|
234
|
+
facet(Facets.COMPLIANCE_PCI_DSS, Facets.COMPLIANCE_GDPR);
|
|
235
|
+
|
|
236
|
+
expect(payment.encrypted).toBe(true);
|
|
237
|
+
});
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Benefits:**
|
|
241
|
+
- Full TypeScript autocomplete
|
|
242
|
+
- Compile-time validation (invalid facet IDs cause errors)
|
|
243
|
+
- Clean, readable syntax
|
|
244
|
+
- Works with any testing framework
|
|
245
|
+
|
|
246
|
+
**Generated `facets.ts` includes:**
|
|
247
|
+
- `FacetId` - Union type of all valid facet IDs
|
|
248
|
+
- `Facets` - Object with constants for each facet
|
|
249
|
+
- `facet()` - Type-safe function to declare coverage
|
|
250
|
+
|
|
251
|
+
### Alternative: Comment Annotations
|
|
252
|
+
|
|
253
|
+
For quick setup without imports, use comment annotations:
|
|
254
|
+
|
|
255
|
+
```typescript
|
|
256
|
+
// @facet business:guest-purchase-flow, compliance:pci-dss
|
|
257
|
+
test('guest user completes purchase', () => {
|
|
258
|
+
// Your test code
|
|
259
|
+
});
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### All Linking Methods
|
|
263
|
+
|
|
264
|
+
| Method | Type-Safe | Syntax |
|
|
265
|
+
|--------|-----------|--------|
|
|
266
|
+
| `facet()` function | Yes | `facet(Facets.ID)` inside test body |
|
|
267
|
+
| Comment annotation | No | `// @facet id` above test |
|
|
268
|
+
| Playwright annotation | Yes | `{ annotation: facet(...) }` in test options |
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
163
272
|
## CLI Commands
|
|
164
273
|
|
|
165
|
-
### Generate Structure
|
|
274
|
+
### Generate Structure & Types
|
|
166
275
|
|
|
167
276
|
```bash
|
|
168
|
-
# Generate structure from facet documents
|
|
277
|
+
# Generate structure.json and facets.ts from facet documents
|
|
169
278
|
bunx facet generate <facets-dir>
|
|
170
279
|
|
|
171
280
|
# Options
|
|
172
|
-
bunx facet generate features/checkout/facets/ -o ./custom-output
|
|
173
|
-
bunx facet generate features/checkout/facets/ -t business
|
|
281
|
+
bunx facet generate features/checkout/facets/ -o ./custom-output # Custom output dir
|
|
282
|
+
bunx facet generate features/checkout/facets/ -t business # Override type
|
|
283
|
+
bunx facet generate features/checkout/facets/ --no-types # Skip TypeScript generation
|
|
174
284
|
```
|
|
175
285
|
|
|
176
286
|
### Analyze Coverage
|
|
@@ -208,8 +318,18 @@ bunx facet watch
|
|
|
208
318
|
bunx facet watch -v # Validate before analysis
|
|
209
319
|
```
|
|
210
320
|
|
|
321
|
+
---
|
|
322
|
+
|
|
211
323
|
## Playwright Integration
|
|
212
324
|
|
|
325
|
+
> **Note:** Playwright works with [comment annotations](#method-1-comment-annotations-any-framework) and [generated types](#method-2-type-safe-with-generated-types-recommended) out of the box. This section covers the **optional** enhanced integration with a custom reporter and annotation helper.
|
|
326
|
+
|
|
327
|
+
### Why Use the Playwright Integration?
|
|
328
|
+
|
|
329
|
+
- **Automatic coverage on test run** - Coverage reports generated after `playwright test`
|
|
330
|
+
- **Runtime annotation capture** - Works with dynamic test generation
|
|
331
|
+
- **Native annotation syntax** - Uses Playwright's built-in annotation system
|
|
332
|
+
|
|
213
333
|
### Reporter Setup
|
|
214
334
|
|
|
215
335
|
```typescript
|
|
@@ -260,6 +380,8 @@ test('comprehensive test', {
|
|
|
260
380
|
});
|
|
261
381
|
```
|
|
262
382
|
|
|
383
|
+
---
|
|
384
|
+
|
|
263
385
|
## Configuration
|
|
264
386
|
|
|
265
387
|
**facet.config.js:**
|
|
@@ -300,6 +422,8 @@ export default {
|
|
|
300
422
|
};
|
|
301
423
|
```
|
|
302
424
|
|
|
425
|
+
---
|
|
426
|
+
|
|
303
427
|
## ID Patterns
|
|
304
428
|
|
|
305
429
|
### Auto-Generated (Recommended)
|
|
@@ -335,6 +459,8 @@ facet('business:guest-purchase-flow') // Auto-generated
|
|
|
335
459
|
facet('facets/business.md#guest-purchase-flow') // Direct path
|
|
336
460
|
```
|
|
337
461
|
|
|
462
|
+
---
|
|
463
|
+
|
|
338
464
|
## Programmatic API
|
|
339
465
|
|
|
340
466
|
```typescript
|
|
@@ -375,8 +501,14 @@ const mdReporter = new MarkdownReporter();
|
|
|
375
501
|
mdReporter.write(report);
|
|
376
502
|
```
|
|
377
503
|
|
|
504
|
+
---
|
|
505
|
+
|
|
378
506
|
## Benefits
|
|
379
507
|
|
|
508
|
+
<table>
|
|
509
|
+
<tr>
|
|
510
|
+
<td width="50%">
|
|
511
|
+
|
|
380
512
|
### For Product Owners
|
|
381
513
|
- Write in natural language
|
|
382
514
|
- Focus on business value
|
|
@@ -395,6 +527,9 @@ mdReporter.write(report);
|
|
|
395
527
|
- Track accessibility coverage
|
|
396
528
|
- Mobile/desktop requirements clear
|
|
397
529
|
|
|
530
|
+
</td>
|
|
531
|
+
<td width="50%">
|
|
532
|
+
|
|
398
533
|
### For Developers
|
|
399
534
|
- One test covers multiple facets
|
|
400
535
|
- Clear requirements from all stakeholders
|
|
@@ -407,16 +542,77 @@ mdReporter.write(report);
|
|
|
407
542
|
- Multi-perspective coverage
|
|
408
543
|
- Progress tracking
|
|
409
544
|
|
|
545
|
+
</td>
|
|
546
|
+
</tr>
|
|
547
|
+
</table>
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
## How Facet Differs
|
|
552
|
+
|
|
553
|
+
| Approach | Focus | Facet's Difference |
|
|
554
|
+
|----------|-------|-------------------|
|
|
555
|
+
| **TDD** | Code correctness via unit tests | Facet tracks *what* is covered, not *how* to write code |
|
|
556
|
+
| **BDD** | Behavior via Given-When-Then | Facet uses free-form natural language, not structured syntax |
|
|
557
|
+
| **ATDD** | Acceptance criteria drive development | Facet maps multiple perspectives to tests, not just acceptance |
|
|
558
|
+
| **Traditional Coverage** | Lines/branches executed | Facet measures *requirement* coverage, not code coverage |
|
|
559
|
+
|
|
560
|
+
**Key insight:** TDD/BDD/ATDD are *development methodologies*. Facet is a *coverage framework*. Use them together.
|
|
561
|
+
|
|
562
|
+
### Why Facet Works for AI-Driven Testing
|
|
563
|
+
|
|
564
|
+
AI coding assistants excel at generating tests but struggle with *what to test*. Facet solves this:
|
|
565
|
+
|
|
566
|
+
- **Natural language specs** → AI understands requirements without parsing Gherkin
|
|
567
|
+
- **Multi-perspective facets** → AI generates tests covering business, compliance, UX in one pass
|
|
568
|
+
- **Type-safe linking** → AI can programmatically verify coverage completeness
|
|
569
|
+
- **Gap detection** → AI identifies untested facets and generates missing tests
|
|
570
|
+
|
|
571
|
+
```
|
|
572
|
+
Human: "Generate tests for checkout"
|
|
573
|
+
AI: Reads facets → Understands business rules, PCI compliance, UX requirements → Generates comprehensive tests → Links to facets automatically
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
Facet bridges human intent and AI execution with traceable, verifiable coverage.
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
410
580
|
## Key Principles
|
|
411
581
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
582
|
+
| Principle | Description |
|
|
583
|
+
|-----------|-------------|
|
|
584
|
+
| **Multi-Perspective** | Every feature has multiple facets |
|
|
585
|
+
| **Natural Language** | Write like humans, not machines |
|
|
586
|
+
| **Evolutionary** | Documentation grows with understanding |
|
|
587
|
+
| **Traceable** | Exact test-to-facet mapping |
|
|
588
|
+
| **Feature-Modular** | Self-contained, team-owned |
|
|
589
|
+
| **Lightweight** | Markdown + JSON, nothing heavy |
|
|
590
|
+
| **Flexible** | Adopt incrementally, customize freely |
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## Contributing
|
|
595
|
+
|
|
596
|
+
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
|
|
597
|
+
|
|
598
|
+
1. Fork the repository
|
|
599
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
600
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
601
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
602
|
+
5. Open a Pull Request
|
|
603
|
+
|
|
604
|
+
---
|
|
419
605
|
|
|
420
606
|
## License
|
|
421
607
|
|
|
422
|
-
MIT
|
|
608
|
+
MIT License - see the [LICENSE](LICENSE) file for details.
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
612
|
+
<div align="center">
|
|
613
|
+
|
|
614
|
+
**[Report Bug](https://github.com/iraycd/facet-coverage/issues) | [Request Feature](https://github.com/iraycd/facet-coverage/issues)**
|
|
615
|
+
|
|
616
|
+
If you find this project useful, please consider giving it a star!
|
|
617
|
+
|
|
618
|
+
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAiFD;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiF/F"}
|
|
@@ -4,6 +4,80 @@ exports.generateCommand = generateCommand;
|
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const FacetParser_js_1 = require("../../core/FacetParser.js");
|
|
7
|
+
/**
|
|
8
|
+
* Convert a facet ID to a valid TypeScript identifier
|
|
9
|
+
* e.g., "business:guest-purchase-flow" -> "BUSINESS_GUEST_PURCHASE_FLOW"
|
|
10
|
+
*/
|
|
11
|
+
function toConstantName(facetId) {
|
|
12
|
+
return facetId
|
|
13
|
+
.toUpperCase()
|
|
14
|
+
.replace(/[:-]/g, '_')
|
|
15
|
+
.replace(/[^A-Z0-9_]/g, '');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Generate TypeScript types file from facets
|
|
19
|
+
*/
|
|
20
|
+
function generateTypesFile(facets, featureName) {
|
|
21
|
+
const facetIds = facets.map(f => f.id);
|
|
22
|
+
// Generate the union type
|
|
23
|
+
const unionType = facetIds.length > 0
|
|
24
|
+
? facetIds.map(id => ` | '${id}'`).join('\n')
|
|
25
|
+
: " | never";
|
|
26
|
+
// Generate constants for each facet ID (for autocomplete)
|
|
27
|
+
const constants = facets.map(f => {
|
|
28
|
+
const constName = toConstantName(f.id);
|
|
29
|
+
const comment = f.title ? ` /** ${f.title} */` : '';
|
|
30
|
+
return `${comment}\n ${constName}: '${f.id}' as const,`;
|
|
31
|
+
}).join('\n');
|
|
32
|
+
// Generate the types file content
|
|
33
|
+
return `/**
|
|
34
|
+
* Auto-generated Facet types for feature: ${featureName}
|
|
35
|
+
* Generated by: bunx facet generate
|
|
36
|
+
*
|
|
37
|
+
* DO NOT EDIT THIS FILE MANUALLY
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* All valid facet IDs for the "${featureName}" feature
|
|
42
|
+
*/
|
|
43
|
+
export type FacetId =
|
|
44
|
+
${unionType};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Facet ID constants for autocomplete and type-safe references
|
|
48
|
+
*/
|
|
49
|
+
export const Facets = {
|
|
50
|
+
${constants}
|
|
51
|
+
} as const;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Type-safe facet annotation helper
|
|
55
|
+
* Works with any testing framework
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // Use with constants (recommended - full autocomplete)
|
|
59
|
+
* // @facet \${Facets.BUSINESS_GUEST_PURCHASE_FLOW}
|
|
60
|
+
* test('my test', () => { ... });
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* // Use with facet() for runtime metadata
|
|
64
|
+
* const metadata = facet(Facets.BUSINESS_GUEST_PURCHASE_FLOW, Facets.COMPLIANCE_PCI_DSS);
|
|
65
|
+
*/
|
|
66
|
+
export function facet<T extends FacetId>(...facetIds: T[]): { facets: T[]; toString: () => string } {
|
|
67
|
+
return {
|
|
68
|
+
facets: facetIds,
|
|
69
|
+
toString: () => facetIds.join(', '),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Get all facet IDs as an array
|
|
75
|
+
*/
|
|
76
|
+
export const allFacetIds: FacetId[] = [
|
|
77
|
+
${facetIds.map(id => ` '${id}',`).join('\n')}
|
|
78
|
+
];
|
|
79
|
+
`;
|
|
80
|
+
}
|
|
7
81
|
/**
|
|
8
82
|
* Generate structure.json from facet markdown files
|
|
9
83
|
*/
|
|
@@ -63,5 +137,12 @@ async function generateCommand(dir, options = {}) {
|
|
|
63
137
|
console.log(`\n✅ Generated: ${outputPath}`);
|
|
64
138
|
console.log(` Feature: ${featureName}`);
|
|
65
139
|
console.log(` Facets: ${facets.length}`);
|
|
140
|
+
// Generate TypeScript types file (unless disabled)
|
|
141
|
+
if (!options.noTypes) {
|
|
142
|
+
const typesContent = generateTypesFile(facets, featureName);
|
|
143
|
+
const typesPath = (0, path_1.join)(outputDir, 'facets.ts');
|
|
144
|
+
(0, fs_1.writeFileSync)(typesPath, typesContent);
|
|
145
|
+
console.log(` Types: ${typesPath}`);
|
|
146
|
+
}
|
|
66
147
|
}
|
|
67
148
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":";;AA6FA,0CAiFC;AA9KD,2BAAuE;AACvE,+BAAwD;AACxD,8DAAwD;AASxD;;;GAGG;AACH,SAAS,cAAc,CAAC,OAAe;IACrC,OAAO,OAAO;SACX,WAAW,EAAE;SACb,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,MAAe,EAAE,WAAmB;IAC7D,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAEvC,0BAA0B;IAC1B,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC;QACnC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9C,CAAC,CAAC,WAAW,CAAC;IAEhB,0DAA0D;IAC1D,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QAC/B,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK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,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC/D,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAErD,iCAAiC;IACjC,IAAA,cAAS,EAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE1C,uBAAuB;IACvB,IAAA,kBAAa,EAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAE9D,OAAO,CAAC,GAAG,CAAC,kBAAkB,UAAU,EAAE,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,eAAe,WAAW,EAAE,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,cAAc,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAE3C,mDAAmD;IACnD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC/C,IAAA,kBAAa,EAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,aAAa,SAAS,EAAE,CAAC,CAAC;IACxC,CAAC;AACH,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -13,9 +13,10 @@ program
|
|
|
13
13
|
// Generate command
|
|
14
14
|
program
|
|
15
15
|
.command('generate <dir>')
|
|
16
|
-
.description('Generate structure.json from facet markdown files')
|
|
17
|
-
.option('-o, --output <path>', 'Output directory for structure.json')
|
|
16
|
+
.description('Generate structure.json and TypeScript types from facet markdown files')
|
|
17
|
+
.option('-o, --output <path>', 'Output directory for structure.json and facets.ts')
|
|
18
18
|
.option('-t, --type <type>', 'Override facet type (default: derived from filename)')
|
|
19
|
+
.option('--no-types', 'Skip TypeScript types generation')
|
|
19
20
|
.action(generate_js_1.generateCommand);
|
|
20
21
|
// Analyze command
|
|
21
22
|
program
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;AAAA,yCAAoC;AACpC,wDAAyD;AACzD,sDAAuD;AACvD,wDAAyD;AACzD,kDAAmD;AAEnD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,+FAA+F,CAAC;KAC5G,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,mBAAmB;AACnB,OAAO;KACJ,OAAO,CAAC,gBAAgB,CAAC;KACzB,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;AAAA,yCAAoC;AACpC,wDAAyD;AACzD,sDAAuD;AACvD,wDAAyD;AACzD,kDAAmD;AAEnD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,+FAA+F,CAAC;KAC5G,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,mBAAmB;AACnB,OAAO;KACJ,OAAO,CAAC,gBAAgB,CAAC;KACzB,WAAW,CAAC,wEAAwE,CAAC;KACrF,MAAM,CAAC,qBAAqB,EAAE,mDAAmD,CAAC;KAClF,MAAM,CAAC,mBAAmB,EAAE,sDAAsD,CAAC;KACnF,MAAM,CAAC,YAAY,EAAE,kCAAkC,CAAC;KACxD,MAAM,CAAC,6BAAe,CAAC,CAAC;AAE3B,kBAAkB;AAClB,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;KACpD,MAAM,CAAC,uBAAuB,EAAE,sCAAsC,CAAC;KACvE,MAAM,CAAC,0BAA0B,EAAE,+BAA+B,CAAC;KACnE,MAAM,CAAC,QAAQ,EAAE,wBAAwB,CAAC;KAC1C,MAAM,CAAC,UAAU,EAAE,yBAAyB,CAAC;KAC7C,MAAM,CAAC,2BAAc,CAAC,CAAC;AAE1B,mBAAmB;AACnB,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,yCAAyC,CAAC;KACtD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;KACpD,MAAM,CAAC,UAAU,EAAE,qDAAqD,CAAC;KACzE,MAAM,CAAC,QAAQ,EAAE,wBAAwB,CAAC;KAC1C,MAAM,CAAC,6BAAe,CAAC,CAAC;AAE3B,gBAAgB;AAChB,OAAO;KACJ,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,uCAAuC,CAAC;KACpD,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;KACpD,MAAM,CAAC,gBAAgB,EAAE,gCAAgC,CAAC;KAC1D,MAAM,CAAC,uBAAY,CAAC,CAAC;AAExB,kBAAkB;AAClB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -15,7 +15,8 @@ export declare class TestScanner {
|
|
|
15
15
|
scanFile(filePath: string, cwd?: string): TestLink[];
|
|
16
16
|
/**
|
|
17
17
|
* Scan test content for facet annotations
|
|
18
|
-
* Supports
|
|
18
|
+
* Supports multiple annotation styles:
|
|
19
|
+
* - Function call: facet('id1', 'id2') or facet(Facets.ID) inside test body
|
|
19
20
|
* - Playwright: test('name', { annotation: facet('id1', 'id2') }, ...)
|
|
20
21
|
* - Comment: // @facet id1, id2 \n test('name', ...)
|
|
21
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestScanner.d.ts","sourceRoot":"","sources":["../../src/core/TestScanner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAA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anner.js
CHANGED
|
@@ -47,7 +47,8 @@ class TestScanner {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Scan test content for facet annotations
|
|
50
|
-
* Supports
|
|
50
|
+
* Supports multiple annotation styles:
|
|
51
|
+
* - Function call: facet('id1', 'id2') or facet(Facets.ID) inside test body
|
|
51
52
|
* - Playwright: test('name', { annotation: facet('id1', 'id2') }, ...)
|
|
52
53
|
* - Comment: // @facet id1, id2 \n test('name', ...)
|
|
53
54
|
*/
|
|
@@ -61,16 +62,25 @@ class TestScanner {
|
|
|
61
62
|
const testSimplePattern = /(?:test|it)\s*\(\s*(['"`])(.+?)\1\s*,/g;
|
|
62
63
|
const describePattern = /describe\s*\(\s*(['"`])(.+?)\1/g;
|
|
63
64
|
// Pattern for Playwright-style facet annotations
|
|
64
|
-
const
|
|
65
|
+
const facetAnnotationPattern = /annotation\s*:\s*facet\s*\(\s*([^)]+)\s*\)/g;
|
|
66
|
+
// Pattern for facet() function calls inside test body
|
|
67
|
+
// Matches: facet('id'), facet("id"), facet(Facets.ID), facet(Facets.ID, Facets.ID2)
|
|
68
|
+
const facetCallPattern = /^\s*facet\s*\(\s*([^)]+)\s*\)\s*;?\s*$/;
|
|
69
|
+
// Pattern to extract string literals
|
|
65
70
|
const facetIdsPattern = /(['"`])([^'"`]+)\1/g;
|
|
71
|
+
// Pattern to extract Facets.CONSTANT references
|
|
72
|
+
const facetsConstPattern = /Facets\.([A-Z_][A-Z0-9_]*)/g;
|
|
66
73
|
// Pattern for comment-based facet annotations: // @facet id1, id2
|
|
67
74
|
const commentFacetPattern = /^\s*\/\/\s*@facet\s+(.+)$/;
|
|
68
|
-
// Track brace depth for describe blocks
|
|
75
|
+
// Track brace depth for describe blocks and tests
|
|
69
76
|
let braceDepth = 0;
|
|
70
77
|
const describeDepths = [];
|
|
71
78
|
// Track pending comment-based facet IDs
|
|
72
79
|
let pendingFacetIds = [];
|
|
73
80
|
let pendingFacetLine = -1;
|
|
81
|
+
// Track current test context for function-call style facets
|
|
82
|
+
let currentTest = null;
|
|
83
|
+
let currentTestFacetIds = [];
|
|
74
84
|
for (let i = 0; i < lines.length; i++) {
|
|
75
85
|
const line = lines[i];
|
|
76
86
|
const lineNumber = i + 1;
|
|
@@ -93,12 +103,51 @@ class TestScanner {
|
|
|
93
103
|
// Count braces for scope tracking
|
|
94
104
|
const openBraces = (line.match(/\{/g) || []).length;
|
|
95
105
|
const closeBraces = (line.match(/\}/g) || []).length;
|
|
106
|
+
// Check for facet() function call inside current test
|
|
107
|
+
if (currentTest && braceDepth > currentTest.startBrace) {
|
|
108
|
+
const facetCallMatch = facetCallPattern.exec(line);
|
|
109
|
+
if (facetCallMatch) {
|
|
110
|
+
const facetArgs = facetCallMatch[1];
|
|
111
|
+
// Extract string literal facet IDs
|
|
112
|
+
let idMatch;
|
|
113
|
+
while ((idMatch = facetIdsPattern.exec(facetArgs)) !== null) {
|
|
114
|
+
currentTestFacetIds.push(idMatch[2]);
|
|
115
|
+
}
|
|
116
|
+
facetIdsPattern.lastIndex = 0;
|
|
117
|
+
// Extract Facets.CONSTANT references - convert to facet ID format
|
|
118
|
+
// The actual ID resolution happens at scan time by looking at the constant value
|
|
119
|
+
while ((idMatch = facetsConstPattern.exec(facetArgs)) !== null) {
|
|
120
|
+
// Store the constant name - we'll need to resolve it from the file's imports
|
|
121
|
+
// For now, we'll extract the value if it's defined inline
|
|
122
|
+
const constName = idMatch[1];
|
|
123
|
+
// Convert BUSINESS_GUEST_PURCHASE_FLOW to business:guest-purchase-flow
|
|
124
|
+
const facetId = constName.toLowerCase().replace(/_/g, '-').replace(/^([^-]+)-/, '$1:');
|
|
125
|
+
currentTestFacetIds.push(facetId);
|
|
126
|
+
}
|
|
127
|
+
facetsConstPattern.lastIndex = 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
96
130
|
braceDepth += openBraces - closeBraces;
|
|
97
131
|
// Pop describe blocks when we exit their scope
|
|
98
132
|
while (describeDepths.length > 0 && braceDepth <= describeDepths[describeDepths.length - 1]) {
|
|
99
133
|
describeStack.pop();
|
|
100
134
|
describeDepths.pop();
|
|
101
135
|
}
|
|
136
|
+
// Check if we're exiting the current test
|
|
137
|
+
if (currentTest && braceDepth <= currentTest.startBrace) {
|
|
138
|
+
// Save the test with collected facet IDs
|
|
139
|
+
if (currentTestFacetIds.length > 0) {
|
|
140
|
+
testLinks.push({
|
|
141
|
+
file: (0, path_1.relative)(cwd, filePath),
|
|
142
|
+
title: currentTest.title,
|
|
143
|
+
fullTitle: currentTest.fullTitle,
|
|
144
|
+
facetIds: [...new Set(currentTestFacetIds)], // Deduplicate
|
|
145
|
+
line: currentTest.line,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
currentTest = null;
|
|
149
|
+
currentTestFacetIds = [];
|
|
150
|
+
}
|
|
102
151
|
// Look for test definitions
|
|
103
152
|
// First try with annotation block pattern
|
|
104
153
|
let testMatch = testPattern.exec(line);
|
|
@@ -120,8 +169,8 @@ class TestScanner {
|
|
|
120
169
|
else {
|
|
121
170
|
// Look for Playwright-style facet annotation in the next few lines
|
|
122
171
|
const annotationBlock = lines.slice(i, Math.min(i + 10, lines.length)).join('\n');
|
|
123
|
-
const facetMatch =
|
|
124
|
-
|
|
172
|
+
const facetMatch = facetAnnotationPattern.exec(annotationBlock);
|
|
173
|
+
facetAnnotationPattern.lastIndex = 0;
|
|
125
174
|
if (facetMatch) {
|
|
126
175
|
const facetArgs = facetMatch[1];
|
|
127
176
|
let idMatch;
|
|
@@ -129,10 +178,18 @@ class TestScanner {
|
|
|
129
178
|
facetIds.push(idMatch[2]);
|
|
130
179
|
}
|
|
131
180
|
facetIdsPattern.lastIndex = 0;
|
|
181
|
+
// Also check for Facets.CONSTANT in annotation
|
|
182
|
+
while ((idMatch = facetsConstPattern.exec(facetArgs)) !== null) {
|
|
183
|
+
const constName = idMatch[1];
|
|
184
|
+
const facetId = constName.toLowerCase().replace(/_/g, '-').replace(/^([^-]+)-/, '$1:');
|
|
185
|
+
facetIds.push(facetId);
|
|
186
|
+
}
|
|
187
|
+
facetsConstPattern.lastIndex = 0;
|
|
132
188
|
}
|
|
133
189
|
}
|
|
190
|
+
const fullTitle = [...describeStack, testTitle].join(' > ');
|
|
134
191
|
if (facetIds.length > 0) {
|
|
135
|
-
|
|
192
|
+
// Has immediate facet IDs (comment or Playwright annotation)
|
|
136
193
|
testLinks.push({
|
|
137
194
|
file: (0, path_1.relative)(cwd, filePath),
|
|
138
195
|
title: testTitle,
|
|
@@ -141,6 +198,16 @@ class TestScanner {
|
|
|
141
198
|
line: lineNumber,
|
|
142
199
|
});
|
|
143
200
|
}
|
|
201
|
+
else {
|
|
202
|
+
// Start tracking for function-call style facets inside the test body
|
|
203
|
+
currentTest = {
|
|
204
|
+
title: testTitle,
|
|
205
|
+
fullTitle,
|
|
206
|
+
line: lineNumber,
|
|
207
|
+
startBrace: braceDepth - openBraces, // The brace level before this line's braces
|
|
208
|
+
};
|
|
209
|
+
currentTestFacetIds = [];
|
|
210
|
+
}
|
|
144
211
|
}
|
|
145
212
|
// Clear pending facet IDs if we've moved too far past them
|
|
146
213
|
if (pendingFacetIds.length > 0 && lineNumber - pendingFacetLine > 3) {
|
|
@@ -148,6 +215,16 @@ class TestScanner {
|
|
|
148
215
|
pendingFacetLine = -1;
|
|
149
216
|
}
|
|
150
217
|
}
|
|
218
|
+
// Handle case where file ends while still in a test
|
|
219
|
+
if (currentTest && currentTestFacetIds.length > 0) {
|
|
220
|
+
testLinks.push({
|
|
221
|
+
file: (0, path_1.relative)(cwd, filePath),
|
|
222
|
+
title: currentTest.title,
|
|
223
|
+
fullTitle: currentTest.fullTitle,
|
|
224
|
+
facetIds: [...new Set(currentTestFacetIds)],
|
|
225
|
+
line: currentTest.line,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
151
228
|
return testLinks;
|
|
152
229
|
}
|
|
153
230
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestScanner.js","sourceRoot":"","s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