@sun-asterisk/sungen 3.2.12-beta.4 → 3.2.12-beta.6

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.
@@ -100,8 +100,11 @@ field-map for per-screen tweaks; use `.overwrite` only for rules that apply proj
100
100
  For CSV/Excel import or bulk-upload testing, `sungen data fixture --screen <name> [--rows N] [--invalid]`
101
101
  turns the field-map into a fixture FILE under `qa/fixtures/`: `<name>.csv` (N valid rows; nested groups
102
102
  → dotted headers; `unique` fields row-indexed) that should import cleanly, and — with `--invalid` —
103
- `<name>.invalid.csv` (one seeded-bad row per field + a `_violation` column) for row-level rejection
104
- tests. Reference it from an `@api` upload (`files:`) or a UI file input.
103
+ `<name>.invalid.csv` (one seeded-bad row per field, **same columns as the valid file so a strict
104
+ importer fails on the data, not an extra column**) plus a **sidecar** `<name>.invalid.expected.yaml`
105
+ that says which 0-based row must be rejected and why (`field`, `chk`, `reason`, `expected_error`).
106
+ Reference the CSV from an `@api` upload (`files:`) or a UI file input, and assert row rejection against
107
+ the sidecar.
105
108
 
106
109
  ## Verify before done — the phuong-phap §6 checklist
107
110
 
@@ -120,6 +123,14 @@ constraints and every synthesized `invalid` value actually violates them. A boun
120
123
  a constraint — fix the field-map/constraints and re-run. This is what stops the "structurally right but
121
124
  semantically wrong" data (e.g. a "below minimum length" case that is actually long enough to pass).
122
125
 
126
+ **Applicability & profiles.** The generator only emits cases that apply, and reports the rest (never
127
+ silent). Set **`required: true|false`** correctly — an optional field drops the "empty (required)" case;
128
+ a numeric field with `min ≥ 0` drops the negative example. Security/injection payloads land in their own
129
+ **`adversarial:`** bucket, separate from `invalid:`. Dropped cases show up as `_not_applicable` in the
130
+ output + a `NOT_APPLICABLE` lint info. A `--profile` (`regression` default · `functional` · `smoke` ·
131
+ `security-min`) and `--locale`/`--channel`/`--sink` on `data gen|validate|lint` select a reduced set;
132
+ selection is deterministic. Prefer setting `required` in the field-map over disabling the empty case.
133
+
123
134
  ## Weaving into scenarios
124
135
 
125
136
  When a `.feature` exists, express invalid/boundary sets as data-driven `Scenario Outline` + `Examples`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sun-asterisk/sungen",
3
- "version": "3.2.12-beta.4",
3
+ "version": "3.2.12-beta.6",
4
4
  "description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -39,8 +39,8 @@
39
39
  "@babel/types": "^7.28.5",
40
40
  "@cucumber/gherkin": "^37.0.0",
41
41
  "@cucumber/messages": "^31.0.0",
42
- "@sungen/driver-data-factory": "3.2.12-beta.4",
43
- "@sungen/driver-ui": "3.2.12-beta.4",
42
+ "@sungen/driver-data-factory": "3.2.12-beta.6",
43
+ "@sungen/driver-ui": "3.2.12-beta.6",
44
44
  "chalk": "^5.6.2",
45
45
  "commander": "^14.0.2",
46
46
  "dotenv": "^17.2.3",
@@ -100,8 +100,11 @@ field-map for per-screen tweaks; use `.overwrite` only for rules that apply proj
100
100
  For CSV/Excel import or bulk-upload testing, `sungen data fixture --screen <name> [--rows N] [--invalid]`
101
101
  turns the field-map into a fixture FILE under `qa/fixtures/`: `<name>.csv` (N valid rows; nested groups
102
102
  → dotted headers; `unique` fields row-indexed) that should import cleanly, and — with `--invalid` —
103
- `<name>.invalid.csv` (one seeded-bad row per field + a `_violation` column) for row-level rejection
104
- tests. Reference it from an `@api` upload (`files:`) or a UI file input.
103
+ `<name>.invalid.csv` (one seeded-bad row per field, **same columns as the valid file so a strict
104
+ importer fails on the data, not an extra column**) plus a **sidecar** `<name>.invalid.expected.yaml`
105
+ that says which 0-based row must be rejected and why (`field`, `chk`, `reason`, `expected_error`).
106
+ Reference the CSV from an `@api` upload (`files:`) or a UI file input, and assert row rejection against
107
+ the sidecar.
105
108
 
106
109
  ## Verify before done — the phuong-phap §6 checklist
107
110
 
@@ -120,6 +123,14 @@ constraints and every synthesized `invalid` value actually violates them. A boun
120
123
  a constraint — fix the field-map/constraints and re-run. This is what stops the "structurally right but
121
124
  semantically wrong" data (e.g. a "below minimum length" case that is actually long enough to pass).
122
125
 
126
+ **Applicability & profiles.** The generator only emits cases that apply, and reports the rest (never
127
+ silent). Set **`required: true|false`** correctly — an optional field drops the "empty (required)" case;
128
+ a numeric field with `min ≥ 0` drops the negative example. Security/injection payloads land in their own
129
+ **`adversarial:`** bucket, separate from `invalid:`. Dropped cases show up as `_not_applicable` in the
130
+ output + a `NOT_APPLICABLE` lint info. A `--profile` (`regression` default · `functional` · `smoke` ·
131
+ `security-min`) and `--locale`/`--channel`/`--sink` on `data gen|validate|lint` select a reduced set;
132
+ selection is deterministic. Prefer setting `required` in the field-map over disabling the empty case.
133
+
123
134
  ## Weaving into scenarios
124
135
 
125
136
  When a `.feature` exists, express invalid/boundary sets as data-driven `Scenario Outline` + `Examples`