@futdevpro/dynamo-e2e 1.18.18 → 1.18.22
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/CHANGELOG.md +63 -0
- package/bin/dye2e.js +85 -1
- package/build/_modules/coverage/_collections/coverage-catalog.util.d.ts +22 -0
- package/build/_modules/coverage/_collections/coverage-catalog.util.d.ts.map +1 -0
- package/build/_modules/coverage/_collections/coverage-catalog.util.js +217 -0
- package/build/_modules/coverage/_collections/coverage-catalog.util.js.map +1 -0
- package/build/_modules/coverage/_models/coverage-catalog.interface.d.ts +75 -0
- package/build/_modules/coverage/_models/coverage-catalog.interface.d.ts.map +1 -0
- package/build/_modules/coverage/_models/coverage-catalog.interface.js +8 -0
- package/build/_modules/coverage/_models/coverage-catalog.interface.js.map +1 -0
- package/build/_modules/coverage/index.d.ts +3 -0
- package/build/_modules/coverage/index.d.ts.map +1 -0
- package/build/_modules/coverage/index.js +20 -0
- package/build/_modules/coverage/index.js.map +1 -0
- package/build/_modules/generators/_collections/cli-runner.util.d.ts.map +1 -1
- package/build/_modules/generators/_collections/cli-runner.util.js +20 -1
- package/build/_modules/generators/_collections/cli-runner.util.js.map +1 -1
- package/build/_modules/runtime/_collections/journey-context.util.d.ts +72 -0
- package/build/_modules/runtime/_collections/journey-context.util.d.ts.map +1 -0
- package/build/_modules/runtime/_collections/journey-context.util.js +137 -0
- package/build/_modules/runtime/_collections/journey-context.util.js.map +1 -0
- package/build/_modules/runtime/_models/journey-context.interface.d.ts +31 -0
- package/build/_modules/runtime/_models/journey-context.interface.d.ts.map +1 -0
- package/build/_modules/runtime/_models/journey-context.interface.js +3 -0
- package/build/_modules/runtime/_models/journey-context.interface.js.map +1 -0
- package/build/_modules/runtime/index.d.ts +2 -0
- package/build/_modules/runtime/index.d.ts.map +1 -1
- package/build/_modules/runtime/index.js +2 -0
- package/build/_modules/runtime/index.js.map +1 -1
- package/build/_modules/vqa/_collections/constants/vqa-standard-viewports.const.d.ts +1 -1
- package/build/_modules/vqa/_collections/constants/vqa-standard-viewports.const.js +1 -1
- package/build/_modules/vqa/_collections/index.d.ts +1 -0
- package/build/_modules/vqa/_collections/index.d.ts.map +1 -1
- package/build/_modules/vqa/_collections/index.js +1 -0
- package/build/_modules/vqa/_collections/index.js.map +1 -1
- package/build/_modules/vqa/_collections/utils/review-gate.util.d.ts +36 -0
- package/build/_modules/vqa/_collections/utils/review-gate.util.d.ts.map +1 -0
- package/build/_modules/vqa/_collections/utils/review-gate.util.js +232 -0
- package/build/_modules/vqa/_collections/utils/review-gate.util.js.map +1 -0
- package/build/_modules/vqa/_models/interfaces/index.d.ts +1 -0
- package/build/_modules/vqa/_models/interfaces/index.d.ts.map +1 -1
- package/build/_modules/vqa/_models/interfaces/index.js +1 -0
- package/build/_modules/vqa/_models/interfaces/index.js.map +1 -1
- package/build/_modules/vqa/_models/interfaces/review-gate.interface.d.ts +55 -0
- package/build/_modules/vqa/_models/interfaces/review-gate.interface.d.ts.map +1 -0
- package/build/_modules/vqa/_models/interfaces/review-gate.interface.js +3 -0
- package/build/_modules/vqa/_models/interfaces/review-gate.interface.js.map +1 -0
- package/build/_modules/vqa/generators/ai-agent-readme.template.js +8 -8
- package/build/_modules/vqa/generators/capture-spec.generator.js +1 -1
- package/build/_modules/vqa/generators/review-bundle.generator.d.ts +16 -4
- package/build/_modules/vqa/generators/review-bundle.generator.d.ts.map +1 -1
- package/build/_modules/vqa/generators/review-bundle.generator.js +31 -5
- package/build/_modules/vqa/generators/review-bundle.generator.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-runner.util.js","sourceRoot":"","sources":["../../../../src/_modules/generators/_collections/cli-runner.util.ts"],"names":[],"mappings":";;;AAAA,kEAAoE;AACpE,0EAA4E;AAC5E,uEAAyE;AAKzE;;;;;GAKG;AACH,MAAa,oBAAoB;IAE/B,MAAM,CAAC,SAAS,CAAC,IAAc;QAC7B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QACxC,CAAC;QACD,MAAM,OAAO,GAAW,IAAI,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,KAAK,GAA2B,EAAE,CAAC;QACzC,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7C,MAAM,GAAG,GAAW,IAAI,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,MAAM,GAAG,GAAW,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACjC,MAAM,IAAI,GAAuB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC7C,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;oBACnC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;oBAClB,CAAC,EAAE,CAAC;gBACN,CAAC;qBAAM,CAAC;oBACN,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,QAAQ;QACb,OAAO
|
|
1
|
+
{"version":3,"file":"cli-runner.util.js","sourceRoot":"","sources":["../../../../src/_modules/generators/_collections/cli-runner.util.ts"],"names":[],"mappings":";;;AAAA,kEAAoE;AACpE,0EAA4E;AAC5E,uEAAyE;AAKzE;;;;;GAKG;AACH,MAAa,oBAAoB;IAE/B,MAAM,CAAC,SAAS,CAAC,IAAc;QAC7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* BFR-FSMED-007 — typed user-journey context: carries the REAL ids / state a step created to the next step
|
|
4
|
+
* (state handoff), and owns a cleanup registry that removes everything the journey created, even when a step failed.
|
|
5
|
+
*
|
|
6
|
+
* - `step(name, fn)`: runs a step with the current state; the returned patch is merged into the state (handoff).
|
|
7
|
+
* A failed step is recorded (`failedStep`) and rethrown — the journey stops, the cleanups still run.
|
|
8
|
+
* - `require(key)`: a handoff guard — a step that needs an earlier step's id fails with the step + key named,
|
|
9
|
+
* instead of calling the API with `undefined`.
|
|
10
|
+
* - `registerCleanup(label, fn)`: register right AFTER the thing exists (create → register), so a later failure
|
|
11
|
+
* cannot leak it. Cleanups run LIFO (dependants before their parents).
|
|
12
|
+
* - `runCleanup()`: runs EVERY cleanup, each isolated (one failure does not skip the rest), once (idempotent), then
|
|
13
|
+
* throws if any failed — a leaked entity is a red journey, never a silent one.
|
|
14
|
+
*
|
|
15
|
+
* With Playwright: `DyE2E_useJourney(test, { name, initialState })` (serial mode + `afterAll` cleanup).
|
|
16
|
+
*/
|
|
17
|
+
export declare class DyE2E_JourneyContext<TState extends object> {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
private currentState;
|
|
20
|
+
private readonly cleanups;
|
|
21
|
+
private readonly steps;
|
|
22
|
+
private failed;
|
|
23
|
+
private cleanupReport;
|
|
24
|
+
/** Creates the context with the journey name and its initial state. */
|
|
25
|
+
constructor(set: {
|
|
26
|
+
name: string;
|
|
27
|
+
initialState: TState;
|
|
28
|
+
});
|
|
29
|
+
/** The current state (a copy — change it through a step's returned patch or `handoff`). */
|
|
30
|
+
get state(): Readonly<TState>;
|
|
31
|
+
/** The names of the steps that completed, in order. */
|
|
32
|
+
get completedSteps(): string[];
|
|
33
|
+
/** The name of the step that threw, if any. */
|
|
34
|
+
get failedStep(): string | undefined;
|
|
35
|
+
/** Runs one journey step; its returned patch is merged into the state (the handoff to the next step). */
|
|
36
|
+
step(name: string, fn: (state: Readonly<TState>) => Promise<Partial<TState> | void> | Partial<TState> | void): Promise<Readonly<TState>>;
|
|
37
|
+
/** Merges a patch into the state outside a step (e.g. from a Playwright `test` body). */
|
|
38
|
+
handoff(patch: Partial<TState>): void;
|
|
39
|
+
/** Returns a state value an earlier step must have handed off; throws with the key named when it is missing. */
|
|
40
|
+
require<TKey extends keyof TState>(key: TKey): NonNullable<TState[TKey]>;
|
|
41
|
+
/** Registers a cleanup for something the journey created — call it right after the creation. */
|
|
42
|
+
registerCleanup(label: string, fn: () => Promise<unknown> | unknown): void;
|
|
43
|
+
/**
|
|
44
|
+
* Runs every registered cleanup LIFO, each isolated; idempotent (a second call returns the first report).
|
|
45
|
+
* Throws after ALL of them ran when any failed, naming the failed labels.
|
|
46
|
+
*/
|
|
47
|
+
runCleanup(): Promise<DyE2E_JourneyCleanupReport_Interface>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* BFR-FSMED-007 — Playwright binding: puts the calling `describe` into serial mode (the steps share state) and
|
|
51
|
+
* registers `afterAll → runCleanup()`, so the cleanups run even when a step failed. Call it inside `test.describe`.
|
|
52
|
+
*
|
|
53
|
+
* ```ts
|
|
54
|
+
* test.describe('J-002 post lifecycle', () => {
|
|
55
|
+
* const journey = DyE2E_useJourney(test, { name: 'J-002', initialState: { postId: undefined as string | undefined } });
|
|
56
|
+
* test('create', async ({ request }) => {
|
|
57
|
+
* const id = await createPost(request);
|
|
58
|
+
* journey.registerCleanup(`delete post ${id}`, () => deletePostWithOwnClient(id));
|
|
59
|
+
* journey.handoff({ postId: id });
|
|
60
|
+
* });
|
|
61
|
+
* test('read', async ({ request }) => { await readPost(request, journey.require('postId')); });
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* ⚠️ A cleanup runs in `afterAll`, AFTER the test-scoped fixtures (`page`, `request`) were disposed — it must not
|
|
66
|
+
* capture them: use its own client (`fetch`, or `playwright.request.newContext()` created inside the cleanup).
|
|
67
|
+
*/
|
|
68
|
+
export declare function DyE2E_useJourney<TState extends object>(test: DyE2E_JourneyTestApi_Interface, set: {
|
|
69
|
+
name: string;
|
|
70
|
+
initialState: TState;
|
|
71
|
+
}): DyE2E_JourneyContext<TState>;
|
|
72
|
+
//# sourceMappingURL=journey-context.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-context.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/runtime/_collections/journey-context.util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EAEpC,8BAA8B,EAC/B,MAAM,sCAAsC,CAAC;AAQ9C;;;;;;;;;;;;;;GAcG;AACH,qBAAa,oBAAoB,CAAC,MAAM,SAAS,MAAM;IACrD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6C;IACtE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,aAAa,CAAmD;IAExE,uEAAuE;gBAC3D,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE;IAKvD,2FAA2F;IAC3F,IAAW,KAAK,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEnC;IAED,uDAAuD;IACvD,IAAW,cAAc,IAAI,MAAM,EAAE,CAEpC;IAED,+CAA+C;IAC/C,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAE1C;IAED,yGAAyG;IAC5F,IAAI,CACf,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GACxF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAsB5B,yFAAyF;IAClF,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI;IAI5C,gHAAgH;IACzG,OAAO,CAAC,IAAI,SAAS,MAAM,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAa/E,gGAAgG;IACzF,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI;IAOjF;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,oCAAoC,CAAC;CA8BzE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,SAAS,MAAM,EACpD,IAAI,EAAE,8BAA8B,EACpC,GAAG,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC1C,oBAAoB,CAAC,MAAM,CAAC,CAS9B"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyE2E_JourneyContext = void 0;
|
|
4
|
+
exports.DyE2E_useJourney = DyE2E_useJourney;
|
|
5
|
+
/**
|
|
6
|
+
* BFR-FSMED-007 — typed user-journey context: carries the REAL ids / state a step created to the next step
|
|
7
|
+
* (state handoff), and owns a cleanup registry that removes everything the journey created, even when a step failed.
|
|
8
|
+
*
|
|
9
|
+
* - `step(name, fn)`: runs a step with the current state; the returned patch is merged into the state (handoff).
|
|
10
|
+
* A failed step is recorded (`failedStep`) and rethrown — the journey stops, the cleanups still run.
|
|
11
|
+
* - `require(key)`: a handoff guard — a step that needs an earlier step's id fails with the step + key named,
|
|
12
|
+
* instead of calling the API with `undefined`.
|
|
13
|
+
* - `registerCleanup(label, fn)`: register right AFTER the thing exists (create → register), so a later failure
|
|
14
|
+
* cannot leak it. Cleanups run LIFO (dependants before their parents).
|
|
15
|
+
* - `runCleanup()`: runs EVERY cleanup, each isolated (one failure does not skip the rest), once (idempotent), then
|
|
16
|
+
* throws if any failed — a leaked entity is a red journey, never a silent one.
|
|
17
|
+
*
|
|
18
|
+
* With Playwright: `DyE2E_useJourney(test, { name, initialState })` (serial mode + `afterAll` cleanup).
|
|
19
|
+
*/
|
|
20
|
+
class DyE2E_JourneyContext {
|
|
21
|
+
name;
|
|
22
|
+
currentState;
|
|
23
|
+
cleanups = [];
|
|
24
|
+
steps = [];
|
|
25
|
+
failed;
|
|
26
|
+
cleanupReport;
|
|
27
|
+
/** Creates the context with the journey name and its initial state. */
|
|
28
|
+
constructor(set) {
|
|
29
|
+
this.name = set.name;
|
|
30
|
+
this.currentState = { ...set.initialState };
|
|
31
|
+
}
|
|
32
|
+
/** The current state (a copy — change it through a step's returned patch or `handoff`). */
|
|
33
|
+
get state() {
|
|
34
|
+
return { ...this.currentState };
|
|
35
|
+
}
|
|
36
|
+
/** The names of the steps that completed, in order. */
|
|
37
|
+
get completedSteps() {
|
|
38
|
+
return [...this.steps];
|
|
39
|
+
}
|
|
40
|
+
/** The name of the step that threw, if any. */
|
|
41
|
+
get failedStep() {
|
|
42
|
+
return this.failed;
|
|
43
|
+
}
|
|
44
|
+
/** Runs one journey step; its returned patch is merged into the state (the handoff to the next step). */
|
|
45
|
+
async step(name, fn) {
|
|
46
|
+
if (this.failed) {
|
|
47
|
+
throw new Error(`[DyE2E journey "${this.name}"] step "${name}" not run: step "${this.failed}" already failed.`);
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const patch = await fn(this.state);
|
|
51
|
+
if (patch) {
|
|
52
|
+
this.currentState = { ...this.currentState, ...patch };
|
|
53
|
+
}
|
|
54
|
+
this.steps.push(name);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
this.failed = name;
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
return this.state;
|
|
61
|
+
}
|
|
62
|
+
/** Merges a patch into the state outside a step (e.g. from a Playwright `test` body). */
|
|
63
|
+
handoff(patch) {
|
|
64
|
+
this.currentState = { ...this.currentState, ...patch };
|
|
65
|
+
}
|
|
66
|
+
/** Returns a state value an earlier step must have handed off; throws with the key named when it is missing. */
|
|
67
|
+
require(key) {
|
|
68
|
+
const value = this.currentState[key];
|
|
69
|
+
if (value === undefined || value === null) {
|
|
70
|
+
throw new Error(`[DyE2E journey "${this.name}"] state "${String(key)}" is missing — an earlier step did not hand it off ` +
|
|
71
|
+
`(completed: ${this.steps.join(' → ') || 'none'}).`);
|
|
72
|
+
}
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
/** Registers a cleanup for something the journey created — call it right after the creation. */
|
|
76
|
+
registerCleanup(label, fn) {
|
|
77
|
+
if (this.cleanupReport) {
|
|
78
|
+
throw new Error(`[DyE2E journey "${this.name}"] cleanup "${label}" registered after runCleanup().`);
|
|
79
|
+
}
|
|
80
|
+
this.cleanups.push({ label: label, fn: fn });
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Runs every registered cleanup LIFO, each isolated; idempotent (a second call returns the first report).
|
|
84
|
+
* Throws after ALL of them ran when any failed, naming the failed labels.
|
|
85
|
+
*/
|
|
86
|
+
async runCleanup() {
|
|
87
|
+
if (this.cleanupReport) {
|
|
88
|
+
return this.cleanupReport;
|
|
89
|
+
}
|
|
90
|
+
const results = [];
|
|
91
|
+
for (const entry of [...this.cleanups].reverse()) {
|
|
92
|
+
try {
|
|
93
|
+
await entry.fn();
|
|
94
|
+
results.push({ label: entry.label, ok: true });
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
results.push({ label: entry.label, ok: false, error: err instanceof Error ? err.message : String(err) });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const failures = results.filter((result) => !result.ok);
|
|
101
|
+
this.cleanupReport = { journey: this.name, results: results, failed: failures.length };
|
|
102
|
+
if (failures.length) {
|
|
103
|
+
throw new Error(`[DyE2E journey "${this.name}"] ${failures.length}/${results.length} cleanup(s) failed — leaked: ` +
|
|
104
|
+
failures.map((f) => `${f.label} (${f.error})`).join('; '));
|
|
105
|
+
}
|
|
106
|
+
return this.cleanupReport;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.DyE2E_JourneyContext = DyE2E_JourneyContext;
|
|
110
|
+
/**
|
|
111
|
+
* BFR-FSMED-007 — Playwright binding: puts the calling `describe` into serial mode (the steps share state) and
|
|
112
|
+
* registers `afterAll → runCleanup()`, so the cleanups run even when a step failed. Call it inside `test.describe`.
|
|
113
|
+
*
|
|
114
|
+
* ```ts
|
|
115
|
+
* test.describe('J-002 post lifecycle', () => {
|
|
116
|
+
* const journey = DyE2E_useJourney(test, { name: 'J-002', initialState: { postId: undefined as string | undefined } });
|
|
117
|
+
* test('create', async ({ request }) => {
|
|
118
|
+
* const id = await createPost(request);
|
|
119
|
+
* journey.registerCleanup(`delete post ${id}`, () => deletePostWithOwnClient(id));
|
|
120
|
+
* journey.handoff({ postId: id });
|
|
121
|
+
* });
|
|
122
|
+
* test('read', async ({ request }) => { await readPost(request, journey.require('postId')); });
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* ⚠️ A cleanup runs in `afterAll`, AFTER the test-scoped fixtures (`page`, `request`) were disposed — it must not
|
|
127
|
+
* capture them: use its own client (`fetch`, or `playwright.request.newContext()` created inside the cleanup).
|
|
128
|
+
*/
|
|
129
|
+
function DyE2E_useJourney(test, set) {
|
|
130
|
+
const journey = new DyE2E_JourneyContext(set);
|
|
131
|
+
test.describe.configure({ mode: 'serial' });
|
|
132
|
+
test.afterAll(async () => {
|
|
133
|
+
await journey.runCleanup();
|
|
134
|
+
});
|
|
135
|
+
return journey;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=journey-context.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-context.util.js","sourceRoot":"","sources":["../../../../src/_modules/runtime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MAAM,OAAO,GAAiC,IAAI,oBAAoB,CAAS,GAAG,CAAC,CAAC;IAEpF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5C,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAmB,EAAE;QACtC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** BFR-FSMED-007 — the outcome of one registered cleanup in `DyE2E_JourneyContext.runCleanup()`. */
|
|
2
|
+
export interface DyE2E_JourneyCleanupResult_Interface {
|
|
3
|
+
/** The label given at registration (what was cleaned up — e.g. `hard-delete account 64f…`). */
|
|
4
|
+
label: string;
|
|
5
|
+
/** `true` when the cleanup resolved. */
|
|
6
|
+
ok: boolean;
|
|
7
|
+
/** The failure message when `ok` is `false`. */
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
/** BFR-FSMED-007 — what `DyE2E_JourneyContext.runCleanup()` did: every cleanup, in the order it ran (LIFO). */
|
|
11
|
+
export interface DyE2E_JourneyCleanupReport_Interface {
|
|
12
|
+
/** The journey name. */
|
|
13
|
+
journey: string;
|
|
14
|
+
/** One row per registered cleanup, in run order (last registered first). */
|
|
15
|
+
results: DyE2E_JourneyCleanupResult_Interface[];
|
|
16
|
+
/** The number of failed cleanups (`0` = everything the journey created is gone). */
|
|
17
|
+
failed: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* BFR-FSMED-007 — the minimal Playwright `test` surface `DyE2E_useJourney` needs (structural, so a unit test can pass a
|
|
21
|
+
* double and the runtime needs no specific Playwright version).
|
|
22
|
+
*/
|
|
23
|
+
export interface DyE2E_JourneyTestApi_Interface {
|
|
24
|
+
describe: {
|
|
25
|
+
configure: (options: {
|
|
26
|
+
mode: 'serial';
|
|
27
|
+
}) => void;
|
|
28
|
+
};
|
|
29
|
+
afterAll: (fn: () => Promise<void>) => void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=journey-context.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-context.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/runtime/_models/journey-context.interface.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,WAAW,oCAAoC;IACnD,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,EAAE,EAAE,OAAO,CAAC;IACZ,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+GAA+G;AAC/G,MAAM,WAAW,oCAAoC;IACnD,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,OAAO,EAAE,oCAAoC,EAAE,CAAC;IAChD,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE;QAAE,SAAS,EAAE,CAAC,OAAO,EAAE;YAAE,IAAI,EAAE,QAAQ,CAAA;SAAE,KAAK,IAAI,CAAA;KAAE,CAAC;IAC/D,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey-context.interface.js","sourceRoot":"","sources":["../../../../src/_modules/runtime/_models/journey-context.interface.ts"],"names":[],"mappings":""}
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
export * from './_collections/assertion-helpers.util';
|
|
16
|
+
export * from './_collections/journey-context.util';
|
|
16
17
|
export * from './_collections/notification-detector-page-script.const';
|
|
17
18
|
export * from './_collections/notification-detector.util';
|
|
18
19
|
export * from './_collections/notification-sweep.util';
|
|
19
20
|
export * from './_collections/unique-generator.util';
|
|
20
21
|
export * from './_collections/wait-helpers.util';
|
|
21
22
|
export * from './_models/index';
|
|
23
|
+
export * from './_models/journey-context.interface';
|
|
22
24
|
export * from './_models/notification-report.interface';
|
|
23
25
|
export * from './_models/notification-sweep.interface';
|
|
24
26
|
export * from './_models/test-user.interface';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,wDAAwD,CAAC;AACvE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,YAAY,CAAC;AAE3B,eAAO,MAAM,qBAAqB,EAAE,MAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wDAAwD,CAAC;AACvE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,YAAY,CAAC;AAE3B,eAAO,MAAM,qBAAqB,EAAE,MAAwB,CAAC"}
|
|
@@ -30,12 +30,14 @@ exports.DYE2E_RUNTIME_VERSION = void 0;
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
__exportStar(require("./_collections/assertion-helpers.util"), exports);
|
|
33
|
+
__exportStar(require("./_collections/journey-context.util"), exports);
|
|
33
34
|
__exportStar(require("./_collections/notification-detector-page-script.const"), exports);
|
|
34
35
|
__exportStar(require("./_collections/notification-detector.util"), exports);
|
|
35
36
|
__exportStar(require("./_collections/notification-sweep.util"), exports);
|
|
36
37
|
__exportStar(require("./_collections/unique-generator.util"), exports);
|
|
37
38
|
__exportStar(require("./_collections/wait-helpers.util"), exports);
|
|
38
39
|
__exportStar(require("./_models/index"), exports);
|
|
40
|
+
__exportStar(require("./_models/journey-context.interface"), exports);
|
|
39
41
|
__exportStar(require("./_models/notification-report.interface"), exports);
|
|
40
42
|
__exportStar(require("./_models/notification-sweep.interface"), exports);
|
|
41
43
|
__exportStar(require("./_models/test-user.interface"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/runtime/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;GAaG;AACH,wEAAsD;AACtD,yFAAuE;AACvE,4EAA0D;AAC1D,yEAAuD;AACvD,uEAAqD;AACrD,mEAAiD;AACjD,kDAAgC;AAChC,0EAAwD;AACxD,yEAAuD;AACvD,gEAA8C;AAC9C,iEAA+C;AAC/C,gEAA8C;AAC9C,+DAA6C;AAC7C,iEAA+C;AAC/C,6DAA2C;AAC3C,qEAAmD;AACnD,8DAA4C;AAC5C,gEAA8C;AAC9C,mEAAiD;AACjD,6CAA2B;AAEd,QAAA,qBAAqB,GAAW,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/runtime/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;GAaG;AACH,wEAAsD;AACtD,sEAAoD;AACpD,yFAAuE;AACvE,4EAA0D;AAC1D,yEAAuD;AACvD,uEAAqD;AACrD,mEAAiD;AACjD,kDAAgC;AAChC,sEAAoD;AACpD,0EAAwD;AACxD,yEAAuD;AACvD,gEAA8C;AAC9C,iEAA+C;AAC/C,gEAA8C;AAC9C,+DAA6C;AAC7C,iEAA+C;AAC/C,6DAA2C;AAC3C,qEAAmD;AACnD,8DAA4C;AAC5C,gEAA8C;AAC9C,mEAAiD;AACjD,6CAA2B;AAEd,QAAA,qBAAqB,GAAW,eAAe,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { DyE2E_Viewport_Interface } from '../../../contracts/_models/interfaces/
|
|
|
4
4
|
* ezekből választhat subset-et, vagy override-olhatja sajáttal.
|
|
5
5
|
*
|
|
6
6
|
* **Konvenció**: `key` filename-friendly + a `dye2e generate-review-bundle` ezzel
|
|
7
|
-
* mappel artifact-ot (`
|
|
7
|
+
* mappel artifact-ot (`states/<state>/<key>-<orientation>/full.png`).
|
|
8
8
|
*/
|
|
9
9
|
export declare const DyE2E_VQA_StandardViewports_Const: {
|
|
10
10
|
[key: string]: DyE2E_Viewport_Interface;
|
|
@@ -6,7 +6,7 @@ exports.DyE2E_VQA_DefaultViewportSubset_Const = exports.DyE2E_VQA_StandardViewpo
|
|
|
6
6
|
* ezekből választhat subset-et, vagy override-olhatja sajáttal.
|
|
7
7
|
*
|
|
8
8
|
* **Konvenció**: `key` filename-friendly + a `dye2e generate-review-bundle` ezzel
|
|
9
|
-
* mappel artifact-ot (`
|
|
9
|
+
* mappel artifact-ot (`states/<state>/<key>-<orientation>/full.png`).
|
|
10
10
|
*/
|
|
11
11
|
exports.DyE2E_VQA_StandardViewports_Const = {
|
|
12
12
|
mobileSmall: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_modules/vqa/_collections/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_modules/vqa/_collections/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC"}
|
|
@@ -23,4 +23,5 @@ __exportStar(require("./utils/finding-validator.util"), exports);
|
|
|
23
23
|
__exportStar(require("./utils/finding-id.util"), exports);
|
|
24
24
|
__exportStar(require("./utils/risk-score.util"), exports);
|
|
25
25
|
__exportStar(require("./utils/deterministic-finding.util"), exports);
|
|
26
|
+
__exportStar(require("./utils/review-gate.util"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/_modules/vqa/_collections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAyD;AACzD,2EAAyD;AACzD,mEAAiD;AACjD,oEAAkD;AAClD,kEAAgD;AAChD,iEAA+C;AAC/C,0DAAwC;AACxC,0DAAwC;AACxC,qEAAmD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/_modules/vqa/_collections/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAyD;AACzD,2EAAyD;AACzD,mEAAiD;AACjD,oEAAkD;AAClD,kEAAgD;AAChD,iEAA+C;AAC/C,0DAAwC;AACxC,0DAAwC;AACxC,qEAAmD;AACnD,2DAAyC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DyE2E_VQA_FindingStatus_Type } from '../../_enums/finding-status.enum';
|
|
2
|
+
import { DyE2E_VQA_ReviewGate_Options, DyE2E_VQA_ReviewGateCategory_Type, DyE2E_VQA_ReviewGateReport_Interface } from '../../_models/interfaces/review-gate.interface';
|
|
3
|
+
/** BFR-FSMED-015 — every gate category, in report order (the default `failOn`). */
|
|
4
|
+
export declare const DYE2E_VQA_REVIEW_GATE_CATEGORIES: DyE2E_VQA_ReviewGateCategory_Type[];
|
|
5
|
+
/**
|
|
6
|
+
* BFR-FSMED-015 — finding statuses that CLOSE a finding for the release verdict. Everything else (open, in-progress,
|
|
7
|
+
* fixed-but-not-re-audited, ready-for-re-audit, reopened) is still open.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DYE2E_VQA_CLOSED_FINDING_STATUSES: DyE2E_VQA_FindingStatus_Type[];
|
|
10
|
+
/**
|
|
11
|
+
* BFR-FSMED-015 (part 3) — the aggregate release gate for a VQA review bundle: manifest + captured evidence +
|
|
12
|
+
* finding-set + human-review marker ⇒ ONE verdict with stable codes and a machine-readable report.
|
|
13
|
+
*
|
|
14
|
+
* Checks: missing evidence (`VQA-GATE-EVIDENCE-MISSING`), missing findings file (`VQA-GATE-FINDINGS-MISSING`),
|
|
15
|
+
* orphan evidence (`VQA-GATE-EVIDENCE-ORPHAN`), invalid findings (`VQA-GATE-FINDING-INVALID`,
|
|
16
|
+
* `VQA-GATE-FINDING-FOREIGN`, `VQA-GATE-FINDING-REF-MISSING`), open blocker / high (`VQA-GATE-FINDING-OPEN-BLOCKER` /
|
|
17
|
+
* `-HIGH`), human review (`VQA-GATE-HUMAN-REVIEW-MISSING` / `-INVALID` / `-REJECTED`). A missing / unreadable bundle
|
|
18
|
+
* manifest (`VQA-GATE-MANIFEST-MISSING` / `-INVALID`) always fails — without it nothing can be checked.
|
|
19
|
+
*/
|
|
20
|
+
export declare class DyE2E_VQA_ReviewGate_Util {
|
|
21
|
+
/** Runs every check and returns the report; `verdict` is `fail` when any blocking issue exists. */
|
|
22
|
+
static verify(options: DyE2E_VQA_ReviewGate_Options): DyE2E_VQA_ReviewGateReport_Interface;
|
|
23
|
+
/** Parses a `--fail-on a,b` list; an unknown category throws (a typo must not silently weaken the gate). */
|
|
24
|
+
static parseFailOn(raw: string | undefined): DyE2E_VQA_ReviewGateCategory_Type[];
|
|
25
|
+
/** Reads `<bundle>/manifest.json`; a missing / unreadable one is an always-blocking issue. */
|
|
26
|
+
private static readManifest;
|
|
27
|
+
/** Missing capture artifacts + evidence folders the manifest does not declare. */
|
|
28
|
+
private static checkEvidence;
|
|
29
|
+
/** Finding schema + consistency with the bundle + open blocker / high. Returns the number of findings read. */
|
|
30
|
+
private static checkFindings;
|
|
31
|
+
/** The human-review marker: present, well-formed, approving. */
|
|
32
|
+
private static checkHumanReview;
|
|
33
|
+
/** The subdirectory names of a directory. */
|
|
34
|
+
private static subdirs;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=review-gate.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-gate.util.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/vqa/_collections/utils/review-gate.util.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAMhF,OAAO,EAEL,4BAA4B,EAC5B,iCAAiC,EAEjC,oCAAoC,EACrC,MAAM,gDAAgD,CAAC;AAIxD,mFAAmF;AACnF,eAAO,MAAM,gCAAgC,EAAE,iCAAiC,EACT,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,4BAA4B,EAI3E,CAAC;AAcF;;;;;;;;;GASG;AACH,qBAAa,yBAAyB;IAEpC,mGAAmG;IACnG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,4BAA4B,GAAG,oCAAoC;IAqC1F,4GAA4G;IAC5G,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,iCAAiC,EAAE;IAmBhF,8FAA8F;IAC9F,OAAO,CAAC,MAAM,CAAC,YAAY;IAiC3B,kFAAkF;IAClF,OAAO,CAAC,MAAM,CAAC,aAAa;IAqC5B,+GAA+G;IAC/G,OAAO,CAAC,MAAM,CAAC,aAAa;IAyE5B,gEAAgE;IAChE,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAuC/B,6CAA6C;IAC7C,OAAO,CAAC,MAAM,CAAC,OAAO;CAKvB"}
|