featureparity 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/lib/fp/cli.rb +2 -1
- data/lib/fp/client.rb +24 -17
- data/lib/fp/commands/base.rb +7 -7
- data/lib/fp/commands/help.rb +38 -1
- data/lib/fp/commands/list.rb +34 -18
- data/lib/fp/commands/matrix.rb +7 -8
- data/lib/fp/commands/projects.rb +11 -5
- data/lib/fp/commands/propose.rb +19 -8
- data/lib/fp/commands/report.rb +161 -12
- data/lib/fp/commands/repos.rb +169 -0
- data/lib/fp/commands/setup.rb +2 -2
- data/lib/fp/commands/show.rb +3 -2
- data/lib/fp/commands/surfaces.rb +5 -5
- data/lib/fp/commands.rb +1 -0
- data/lib/fp/config.rb +83 -2
- data/lib/fp/junit.rb +212 -0
- data/lib/fp/version.rb +1 -1
- data/lib/fp.rb +1 -0
- data/skills/fp/SKILL.md +140 -0
- data/skills/fp/references/cli.md +219 -0
- data/skills/fp/references/markers.md +149 -0
- metadata +7 -2
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# fp Marker Syntax
|
|
2
|
+
|
|
3
|
+
The `fp:<slug>` marker binds a test to a FeatureParity requirement. Place it as a comment immediately before the test definition.
|
|
4
|
+
|
|
5
|
+
## Basic syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
fp:<slug>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Where `<slug>` is the requirement's slug (lowercase, underscores, e.g., `print_container_qr`).
|
|
12
|
+
|
|
13
|
+
## Surface pinning
|
|
14
|
+
|
|
15
|
+
Pin one or more surfaces with the `@` suffix:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
fp:<slug>@<surface>
|
|
19
|
+
fp:<slug>@<surface1>,<surface2>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
- `fp:print_qr` — uses `--surface` flag when reporting
|
|
24
|
+
- `fp:print_qr@api` — reports for `api` surface only
|
|
25
|
+
- `fp:print_qr@api,web` — reports for both `api` and `web`
|
|
26
|
+
|
|
27
|
+
When using `fp report --junit`, each pinned surface produces a separate evidence upload.
|
|
28
|
+
|
|
29
|
+
## Language examples
|
|
30
|
+
|
|
31
|
+
### Ruby/RSpec
|
|
32
|
+
|
|
33
|
+
```ruby
|
|
34
|
+
# fp:print_container_qr
|
|
35
|
+
it 'prints a QR code onto the container label' do
|
|
36
|
+
expect(label.qr_code).to be_present
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# fp:print_container_qr@api,web
|
|
40
|
+
it 'prints a QR code (backend test covering multiple surfaces)' do
|
|
41
|
+
expect(label.qr_code).to be_present
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Kotlin/JUnit
|
|
46
|
+
|
|
47
|
+
```kotlin
|
|
48
|
+
// fp:print_container_qr
|
|
49
|
+
@Test
|
|
50
|
+
fun `prints a QR code onto the container label`() {
|
|
51
|
+
assertNotNull(label.qrCode)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// fp:print_container_qr@customer_android
|
|
55
|
+
@Test
|
|
56
|
+
fun `prints a QR code (Android-specific)`() {
|
|
57
|
+
assertNotNull(label.qrCode)
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Swift/XCTest
|
|
62
|
+
|
|
63
|
+
```swift
|
|
64
|
+
// fp:print_container_qr
|
|
65
|
+
func testPrintsQRCodeOntoContainerLabel() {
|
|
66
|
+
XCTAssertNotNil(label.qrCode)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// fp:print_container_qr@customer_ios
|
|
70
|
+
func testPrintsQRCodeOniOS() {
|
|
71
|
+
XCTAssertNotNil(label.qrCode)
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### TypeScript/Jest
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
// fp:print_container_qr
|
|
79
|
+
it('prints a QR code onto the container label', () => {
|
|
80
|
+
expect(label.qrCode).toBeDefined();
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// fp:print_container_qr@web
|
|
84
|
+
it('prints a QR code (web-specific)', () => {
|
|
85
|
+
expect(label.qrCode).toBeDefined();
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Python/pytest
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
# fp:print_container_qr
|
|
93
|
+
def test_prints_qr_code_onto_container_label():
|
|
94
|
+
assert label.qr_code is not None
|
|
95
|
+
|
|
96
|
+
# fp:print_container_qr@api
|
|
97
|
+
def test_prints_qr_code_api():
|
|
98
|
+
assert label.qr_code is not None
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Go
|
|
102
|
+
|
|
103
|
+
```go
|
|
104
|
+
// fp:print_container_qr
|
|
105
|
+
func TestPrintsQRCodeOntoContainerLabel(t *testing.T) {
|
|
106
|
+
if label.QRCode == nil {
|
|
107
|
+
t.Fatal("expected QR code")
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// fp:print_container_qr@api
|
|
112
|
+
func TestPrintsQRCodeAPI(t *testing.T) {
|
|
113
|
+
if label.QRCode == nil {
|
|
114
|
+
t.Fatal("expected QR code")
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Rules
|
|
120
|
+
|
|
121
|
+
1. **One marker per test.** A marker binds to the test directly below it.
|
|
122
|
+
|
|
123
|
+
2. **Human-readable test names.** The marker handles binding; don't name tests after slugs.
|
|
124
|
+
- ❌ `it 'print_container_qr' do`
|
|
125
|
+
- ✅ `it 'prints a QR code onto the container label' do`
|
|
126
|
+
|
|
127
|
+
3. **Marker must be immediately before the test.** No blank lines or other code between the marker comment and the test definition.
|
|
128
|
+
|
|
129
|
+
4. **Comment style follows language conventions.** Use `#` for Ruby/Python, `//` for Kotlin/Swift/TypeScript/Go.
|
|
130
|
+
|
|
131
|
+
## Verification
|
|
132
|
+
|
|
133
|
+
After adding a marker, verify it's findable:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
grep -r "fp:print_container_qr" spec/
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## JUnit binding
|
|
140
|
+
|
|
141
|
+
When using `fp report --junit`, the CLI:
|
|
142
|
+
|
|
143
|
+
1. Parses the JUnit XML report
|
|
144
|
+
2. For each `<testcase>`, reads the `file` attribute to find the source file
|
|
145
|
+
3. Scans the source file for `fp:<slug>` markers
|
|
146
|
+
4. Binds each marker to the test directly below it
|
|
147
|
+
5. Reports evidence for each binding
|
|
148
|
+
|
|
149
|
+
Testcases without a marker are skipped with a warning. Markers with unknown slugs are also skipped.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: featureparity
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stowzilla
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|
|
@@ -103,13 +103,18 @@ files:
|
|
|
103
103
|
- lib/fp/commands/projects.rb
|
|
104
104
|
- lib/fp/commands/propose.rb
|
|
105
105
|
- lib/fp/commands/report.rb
|
|
106
|
+
- lib/fp/commands/repos.rb
|
|
106
107
|
- lib/fp/commands/setup.rb
|
|
107
108
|
- lib/fp/commands/show.rb
|
|
108
109
|
- lib/fp/commands/surfaces.rb
|
|
109
110
|
- lib/fp/commands/version.rb
|
|
110
111
|
- lib/fp/config.rb
|
|
112
|
+
- lib/fp/junit.rb
|
|
111
113
|
- lib/fp/output.rb
|
|
112
114
|
- lib/fp/version.rb
|
|
115
|
+
- skills/fp/SKILL.md
|
|
116
|
+
- skills/fp/references/cli.md
|
|
117
|
+
- skills/fp/references/markers.md
|
|
113
118
|
homepage: https://featureparity.dev
|
|
114
119
|
licenses:
|
|
115
120
|
- MIT
|