spana-test 0.0.2 → 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/.agents/skills/spana-testing/SKILL.md +304 -0
- package/README.md +308 -88
- package/dist/agent/index.d.ts +110 -0
- package/dist/agent/index.js +25 -0
- package/dist/allure-PTTVORQ6.js +124 -0
- package/dist/allure-PTTVORQ6.js.map +1 -0
- package/dist/android-PAPJJWVN.js +34 -0
- package/dist/android-PAPJJWVN.js.map +1 -0
- package/dist/chunk-3FSZNKEF.js +62 -0
- package/dist/chunk-3FSZNKEF.js.map +1 -0
- package/dist/chunk-3YR4GUGE.js +249 -0
- package/dist/chunk-3YR4GUGE.js.map +1 -0
- package/dist/{discover-XIRJTZ7Z.js → chunk-AEKDFFPJ.js} +12 -5
- package/dist/{discover-XIRJTZ7Z.js.map → chunk-AEKDFFPJ.js.map} +1 -1
- package/dist/chunk-BF37W5EG.js +125 -0
- package/dist/chunk-BF37W5EG.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +11 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-EXLUY7KT.js +21 -0
- package/dist/chunk-EXLUY7KT.js.map +1 -0
- package/dist/chunk-FNDOEMOL.js +62 -0
- package/dist/chunk-FNDOEMOL.js.map +1 -0
- package/dist/{chunk-CYEDLQJ4.js → chunk-GZK22EIE.js} +76 -102
- package/dist/chunk-GZK22EIE.js.map +1 -0
- package/dist/chunk-HWFDXIXR.js +183 -0
- package/dist/chunk-HWFDXIXR.js.map +1 -0
- package/dist/chunk-IJIASIX5.js +314 -0
- package/dist/chunk-IJIASIX5.js.map +1 -0
- package/dist/chunk-KJPHH2TW.js +168 -0
- package/dist/chunk-KJPHH2TW.js.map +1 -0
- package/dist/chunk-L7MFJF46.js +137 -0
- package/dist/chunk-L7MFJF46.js.map +1 -0
- package/dist/chunk-MRH7SK52.js +134 -0
- package/dist/chunk-MRH7SK52.js.map +1 -0
- package/dist/chunk-P7JQRLP4.js +114 -0
- package/dist/chunk-P7JQRLP4.js.map +1 -0
- package/dist/chunk-S2XNAKSO.js +1087 -0
- package/dist/chunk-S2XNAKSO.js.map +1 -0
- package/dist/chunk-S4R4OR7T.js +358 -0
- package/dist/chunk-S4R4OR7T.js.map +1 -0
- package/dist/chunk-SFBRFB2N.js +277 -0
- package/dist/chunk-SFBRFB2N.js.map +1 -0
- package/dist/chunk-VNYF5BHX.js +494 -0
- package/dist/chunk-VNYF5BHX.js.map +1 -0
- package/dist/chunk-WBU34APM.js +38 -0
- package/dist/chunk-WBU34APM.js.map +1 -0
- package/dist/chunk-WQ4GXUUE.js +2402 -0
- package/dist/chunk-WQ4GXUUE.js.map +1 -0
- package/dist/chunk-YBZCOQXJ.js +311 -0
- package/dist/chunk-YBZCOQXJ.js.map +1 -0
- package/dist/cli.js +428 -34
- package/dist/cli.js.map +1 -1
- package/dist/compiler-74VGKZO6.js +312 -0
- package/dist/compiler-74VGKZO6.js.map +1 -0
- package/dist/config-loader-BJJ3IJJ7.js +9 -0
- package/dist/config-loader-BJJ3IJJ7.js.map +1 -0
- package/dist/console-XWKUTP3D.js +164 -0
- package/dist/console-XWKUTP3D.js.map +1 -0
- package/dist/coordinator-BbUjvvnX.d.ts +383 -0
- package/dist/discover-KZKXHZZA.js +14 -0
- package/dist/discover-KZKXHZZA.js.map +1 -0
- package/dist/doctor-command-T2UX5RV5.js +732 -0
- package/dist/doctor-command-T2UX5RV5.js.map +1 -0
- package/dist/element-DZ0HyJ3C.d.ts +25 -0
- package/dist/flow-BUC9Mf8W.d.ts +128 -0
- package/dist/gherkin/steps.d.ts +32 -0
- package/dist/gherkin/steps.js +39 -0
- package/dist/gherkin/steps.js.map +1 -0
- package/dist/{html-GRB34S6X.js → html-GE6Q4DCG.js} +76 -22
- package/dist/html-GE6Q4DCG.js.map +1 -0
- package/dist/index.d.ts +159 -144
- package/dist/index.js +39 -165
- package/dist/index.js.map +1 -1
- package/dist/init-command-GVMRXIMY.js +121 -0
- package/dist/init-command-GVMRXIMY.js.map +1 -0
- package/dist/init-flow-command-R76AXF4Z.js +34 -0
- package/dist/init-flow-command-R76AXF4Z.js.map +1 -0
- package/dist/installer-YZJ4DV3F.js +22 -0
- package/dist/installer-YZJ4DV3F.js.map +1 -0
- package/dist/ios-ZW6XVNLG.js +50 -0
- package/dist/ios-ZW6XVNLG.js.map +1 -0
- package/dist/json-KS67BZYU.js +39 -0
- package/dist/json-KS67BZYU.js.map +1 -0
- package/dist/{junit-NAGZJOGQ.js → junit-HLC62MK6.js} +15 -4
- package/dist/junit-HLC62MK6.js.map +1 -0
- package/dist/provider-A57C3MU6.js +12 -0
- package/dist/provider-A57C3MU6.js.map +1 -0
- package/dist/redact-U72BUBBR.js +77 -0
- package/dist/redact-U72BUBBR.js.map +1 -0
- package/dist/runner-UXNHVVGG.js +20 -0
- package/dist/runner-UXNHVVGG.js.map +1 -0
- package/dist/server-W7OA3DDN.js +530 -0
- package/dist/server-W7OA3DDN.js.map +1 -0
- package/dist/session-TMNOKYLG.js +17 -0
- package/dist/session-TMNOKYLG.js.map +1 -0
- package/dist/studio-command-6VHTHDUK.js +24 -0
- package/dist/studio-command-6VHTHDUK.js.map +1 -0
- package/dist/test-command-AHMOZLV4.js +2852 -0
- package/dist/test-command-AHMOZLV4.js.map +1 -0
- package/dist/validator-35624P7S.js +20 -0
- package/dist/validator-35624P7S.js.map +1 -0
- package/package.json +41 -4
- package/studio-dist/assets/index-DC6DIXfl.js +188 -0
- package/studio-dist/assets/index-DDKsnBwD.css +1 -0
- package/studio-dist/index.html +13 -0
- package/dist/chunk-CYEDLQJ4.js.map +0 -1
- package/dist/chunk-PVNNKPBW.js +0 -64
- package/dist/chunk-PVNNKPBW.js.map +0 -1
- package/dist/chunk-VZZH66U5.js +0 -1781
- package/dist/chunk-VZZH66U5.js.map +0 -1
- package/dist/console-GPV3M3PC.js +0 -71
- package/dist/console-GPV3M3PC.js.map +0 -1
- package/dist/html-GRB34S6X.js.map +0 -1
- package/dist/json-FK2NSRGC.js +0 -20
- package/dist/json-FK2NSRGC.js.map +0 -1
- package/dist/junit-NAGZJOGQ.js.map +0 -1
- package/dist/runner-LBQUCG3K.js +0 -12
- package/dist/session-U7VP5J2C.js +0 -122
- package/dist/session-U7VP5J2C.js.map +0 -1
- package/dist/test-command-WPYLJYIK.js +0 -636
- package/dist/test-command-WPYLJYIK.js.map +0 -1
- package/dist/validator-J4YSBB66.js +0 -33
- package/dist/validator-J4YSBB66.js.map +0 -1
- /package/dist/{runner-LBQUCG3K.js.map → agent/index.js.map} +0 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getWorldFactory,
|
|
3
|
+
globalRegistry
|
|
4
|
+
} from "./chunk-3FSZNKEF.js";
|
|
5
|
+
import "./chunk-DGUM43GV.js";
|
|
6
|
+
|
|
7
|
+
// src/gherkin/compiler.ts
|
|
8
|
+
import { Parser, AstBuilder, GherkinClassicTokenMatcher } from "@cucumber/gherkin";
|
|
9
|
+
import { IdGenerator } from "@cucumber/messages";
|
|
10
|
+
|
|
11
|
+
// src/gherkin/matcher.ts
|
|
12
|
+
import {
|
|
13
|
+
CucumberExpression,
|
|
14
|
+
RegularExpression,
|
|
15
|
+
ParameterTypeRegistry
|
|
16
|
+
} from "@cucumber/cucumber-expressions";
|
|
17
|
+
function createStepMatcher(steps) {
|
|
18
|
+
const parameterTypeRegistry = new ParameterTypeRegistry();
|
|
19
|
+
const compiled = steps.map((handler) => {
|
|
20
|
+
const expression = handler.pattern instanceof RegExp ? new RegularExpression(handler.pattern, parameterTypeRegistry) : new CucumberExpression(handler.pattern, parameterTypeRegistry);
|
|
21
|
+
return { handler, expression };
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
match(text) {
|
|
25
|
+
const matches = [];
|
|
26
|
+
for (const { handler, expression } of compiled) {
|
|
27
|
+
const result = expression.match(text);
|
|
28
|
+
if (result) {
|
|
29
|
+
matches.push({
|
|
30
|
+
handler,
|
|
31
|
+
args: result.map((arg) => arg.getValue(null))
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (matches.length === 0) return void 0;
|
|
36
|
+
if (matches.length > 1) {
|
|
37
|
+
const patterns = matches.map((m) => ` "${m.handler.pattern}"`).join("\n");
|
|
38
|
+
throw new Error(`Ambiguous step definition for "${text}". Matches:
|
|
39
|
+
${patterns}`);
|
|
40
|
+
}
|
|
41
|
+
return matches[0];
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/gherkin/compiler.ts
|
|
47
|
+
var PLATFORM_TAGS = {
|
|
48
|
+
"@web": "web",
|
|
49
|
+
"@android": "android",
|
|
50
|
+
"@ios": "ios"
|
|
51
|
+
};
|
|
52
|
+
function compileFeature(source, filePath) {
|
|
53
|
+
const parser = new Parser(new AstBuilder(IdGenerator.uuid()), new GherkinClassicTokenMatcher());
|
|
54
|
+
const document = parser.parse(source);
|
|
55
|
+
const feature = document.feature;
|
|
56
|
+
if (!feature) return [];
|
|
57
|
+
const featureTags = feature.tags.map((t) => t.name);
|
|
58
|
+
const flows = [];
|
|
59
|
+
let backgroundSteps = [];
|
|
60
|
+
for (const child of feature.children) {
|
|
61
|
+
if (child.background) {
|
|
62
|
+
backgroundSteps = child.background.steps;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
for (const child of feature.children) {
|
|
66
|
+
if (!child.scenario) continue;
|
|
67
|
+
const scenario = child.scenario;
|
|
68
|
+
if (scenario.examples.length > 0) {
|
|
69
|
+
for (const example of scenario.examples) {
|
|
70
|
+
if (!example.tableHeader || !example.tableBody) continue;
|
|
71
|
+
const headers = example.tableHeader.cells.map((c) => c.value);
|
|
72
|
+
const exampleTags = example.tags.map((t) => t.name);
|
|
73
|
+
for (const row of example.tableBody) {
|
|
74
|
+
const values = row.cells.map((c) => c.value);
|
|
75
|
+
const replacements = {};
|
|
76
|
+
for (let i = 0; i < headers.length; i++) {
|
|
77
|
+
replacements[headers[i]] = values[i] ?? "";
|
|
78
|
+
}
|
|
79
|
+
const expandedName = replaceOutlinePlaceholders(scenario.name, replacements);
|
|
80
|
+
const expandedSteps = scenario.steps.map((s) => ({
|
|
81
|
+
...s,
|
|
82
|
+
text: replaceOutlinePlaceholders(s.text, replacements)
|
|
83
|
+
}));
|
|
84
|
+
const allTags = [...featureTags, ...scenario.tags.map((t) => t.name), ...exampleTags];
|
|
85
|
+
flows.push(
|
|
86
|
+
buildFlowDefinition(
|
|
87
|
+
`${feature.name} \u2014 ${expandedName}`,
|
|
88
|
+
allTags,
|
|
89
|
+
backgroundSteps,
|
|
90
|
+
expandedSteps,
|
|
91
|
+
filePath
|
|
92
|
+
)
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
const allTags = [...featureTags, ...scenario.tags.map((t) => t.name)];
|
|
98
|
+
flows.push(
|
|
99
|
+
buildFlowDefinition(
|
|
100
|
+
`${feature.name} \u2014 ${scenario.name}`,
|
|
101
|
+
allTags,
|
|
102
|
+
backgroundSteps,
|
|
103
|
+
scenario.steps,
|
|
104
|
+
filePath
|
|
105
|
+
)
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return flows;
|
|
110
|
+
}
|
|
111
|
+
function buildFlowDefinition(name, tags, backgroundSteps, scenarioSteps, filePath) {
|
|
112
|
+
const { platforms, filteredTags } = extractPlatformTags(tags);
|
|
113
|
+
const config = {
|
|
114
|
+
tags: filteredTags.length > 0 ? filteredTags : void 0,
|
|
115
|
+
platforms: platforms.length > 0 ? platforms : void 0,
|
|
116
|
+
autoLaunch: false
|
|
117
|
+
// Gherkin flows use Background/Given steps to navigate
|
|
118
|
+
};
|
|
119
|
+
const allSteps = [...backgroundSteps, ...scenarioSteps];
|
|
120
|
+
return {
|
|
121
|
+
name,
|
|
122
|
+
config,
|
|
123
|
+
fn: async (flowCtx) => {
|
|
124
|
+
const matcher = createStepMatcher(globalRegistry.getSteps());
|
|
125
|
+
const state = /* @__PURE__ */ new Map();
|
|
126
|
+
const worldFactory = getWorldFactory();
|
|
127
|
+
const world = worldFactory?.instantiate(flowCtx, state);
|
|
128
|
+
const scenarioStepResults = [];
|
|
129
|
+
const beforeHooks = globalRegistry.getHooks("Before");
|
|
130
|
+
const afterHooks = globalRegistry.getHooks("After");
|
|
131
|
+
const stepCtx = {
|
|
132
|
+
...flowCtx,
|
|
133
|
+
state,
|
|
134
|
+
...world
|
|
135
|
+
};
|
|
136
|
+
for (const hook of beforeHooks) {
|
|
137
|
+
if (hook.tagExpression && !tagsMatch(tags, hook.tagExpression)) continue;
|
|
138
|
+
const hookStart = Date.now();
|
|
139
|
+
try {
|
|
140
|
+
await hook.fn(stepCtx);
|
|
141
|
+
scenarioStepResults.push({
|
|
142
|
+
keyword: "Before",
|
|
143
|
+
text: hook.tagExpression ?? "hook",
|
|
144
|
+
status: "passed",
|
|
145
|
+
durationMs: Date.now() - hookStart
|
|
146
|
+
});
|
|
147
|
+
} catch (error) {
|
|
148
|
+
scenarioStepResults.push({
|
|
149
|
+
keyword: "Before",
|
|
150
|
+
text: hook.tagExpression ?? "hook",
|
|
151
|
+
status: "failed",
|
|
152
|
+
durationMs: Date.now() - hookStart,
|
|
153
|
+
error: error instanceof Error ? error.message : String(error)
|
|
154
|
+
});
|
|
155
|
+
await runAfterHooks(afterHooks, stepCtx, tags, scenarioStepResults);
|
|
156
|
+
attachScenarioSteps(flowCtx, scenarioStepResults);
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
let failed = false;
|
|
161
|
+
let failError;
|
|
162
|
+
for (const step of allSteps) {
|
|
163
|
+
const keyword = normalizeKeyword(step.keyword);
|
|
164
|
+
const stepStart = Date.now();
|
|
165
|
+
if (failed) {
|
|
166
|
+
scenarioStepResults.push({
|
|
167
|
+
keyword,
|
|
168
|
+
text: step.text,
|
|
169
|
+
status: "skipped",
|
|
170
|
+
durationMs: 0
|
|
171
|
+
});
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
const match = matcher.match(step.text);
|
|
175
|
+
if (!match) {
|
|
176
|
+
const error = `Undefined step: "${step.keyword.trim()} ${step.text}"${filePath ? ` in ${filePath}` : ""}`;
|
|
177
|
+
scenarioStepResults.push({
|
|
178
|
+
keyword,
|
|
179
|
+
text: step.text,
|
|
180
|
+
status: "failed",
|
|
181
|
+
durationMs: Date.now() - stepStart,
|
|
182
|
+
error
|
|
183
|
+
});
|
|
184
|
+
failed = true;
|
|
185
|
+
failError = new Error(error);
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
try {
|
|
189
|
+
const args = buildStepArgs(match, step);
|
|
190
|
+
await match.handler.fn(stepCtx, ...args);
|
|
191
|
+
scenarioStepResults.push({
|
|
192
|
+
keyword,
|
|
193
|
+
text: step.text,
|
|
194
|
+
status: "passed",
|
|
195
|
+
durationMs: Date.now() - stepStart
|
|
196
|
+
});
|
|
197
|
+
} catch (error) {
|
|
198
|
+
scenarioStepResults.push({
|
|
199
|
+
keyword,
|
|
200
|
+
text: step.text,
|
|
201
|
+
status: "failed",
|
|
202
|
+
durationMs: Date.now() - stepStart,
|
|
203
|
+
error: error instanceof Error ? error.message : String(error)
|
|
204
|
+
});
|
|
205
|
+
failed = true;
|
|
206
|
+
failError = error;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
await runAfterHooks(afterHooks, stepCtx, tags, scenarioStepResults);
|
|
210
|
+
attachScenarioSteps(flowCtx, scenarioStepResults);
|
|
211
|
+
if (failError) throw failError;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
async function runAfterHooks(hooks, stepCtx, tags, results) {
|
|
216
|
+
for (const hook of hooks) {
|
|
217
|
+
if (hook.tagExpression && !tagsMatch(tags, hook.tagExpression)) continue;
|
|
218
|
+
const hookStart = Date.now();
|
|
219
|
+
try {
|
|
220
|
+
await hook.fn(stepCtx);
|
|
221
|
+
results.push({
|
|
222
|
+
keyword: "After",
|
|
223
|
+
text: hook.tagExpression ?? "hook",
|
|
224
|
+
status: "passed",
|
|
225
|
+
durationMs: Date.now() - hookStart
|
|
226
|
+
});
|
|
227
|
+
} catch (error) {
|
|
228
|
+
results.push({
|
|
229
|
+
keyword: "After",
|
|
230
|
+
text: hook.tagExpression ?? "hook",
|
|
231
|
+
status: "failed",
|
|
232
|
+
durationMs: Date.now() - hookStart,
|
|
233
|
+
error: error instanceof Error ? error.message : String(error)
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function attachScenarioSteps(flowCtx, scenarioSteps) {
|
|
239
|
+
flowCtx.__scenarioSteps = scenarioSteps;
|
|
240
|
+
}
|
|
241
|
+
function extractPlatformTags(tags) {
|
|
242
|
+
const platforms = [];
|
|
243
|
+
const filteredTags = [];
|
|
244
|
+
for (const tag of tags) {
|
|
245
|
+
const platform = PLATFORM_TAGS[tag.toLowerCase()];
|
|
246
|
+
if (platform) {
|
|
247
|
+
platforms.push(platform);
|
|
248
|
+
} else {
|
|
249
|
+
filteredTags.push(tag);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return { platforms, filteredTags };
|
|
253
|
+
}
|
|
254
|
+
function normalizeKeyword(keyword) {
|
|
255
|
+
const trimmed = keyword.trim();
|
|
256
|
+
switch (trimmed) {
|
|
257
|
+
case "Given":
|
|
258
|
+
return "Given";
|
|
259
|
+
case "When":
|
|
260
|
+
return "When";
|
|
261
|
+
case "Then":
|
|
262
|
+
return "Then";
|
|
263
|
+
case "And":
|
|
264
|
+
return "And";
|
|
265
|
+
case "But":
|
|
266
|
+
return "But";
|
|
267
|
+
case "*":
|
|
268
|
+
return "And";
|
|
269
|
+
default:
|
|
270
|
+
return "Given";
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function replaceOutlinePlaceholders(text, replacements) {
|
|
274
|
+
return text.replaceAll(/<([^>]+)>/g, (_, key) => replacements[key] ?? `<${key}>`);
|
|
275
|
+
}
|
|
276
|
+
function buildStepArgs(match, step) {
|
|
277
|
+
const args = [...match.args];
|
|
278
|
+
if (step.dataTable) {
|
|
279
|
+
const rows = step.dataTable.rows.map((r) => r.cells.map((c) => c.value));
|
|
280
|
+
args.push(rows);
|
|
281
|
+
}
|
|
282
|
+
if (step.docString) {
|
|
283
|
+
args.push(step.docString.content);
|
|
284
|
+
}
|
|
285
|
+
return args;
|
|
286
|
+
}
|
|
287
|
+
function tagsMatch(scenarioTags, expression) {
|
|
288
|
+
const parts = expression.split(/\s+/);
|
|
289
|
+
let result = true;
|
|
290
|
+
let negate = false;
|
|
291
|
+
for (const part of parts) {
|
|
292
|
+
if (part === "and") continue;
|
|
293
|
+
if (part === "not") {
|
|
294
|
+
negate = true;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (part === "or") {
|
|
298
|
+
if (result) return true;
|
|
299
|
+
result = true;
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
const hasTag = scenarioTags.includes(part);
|
|
303
|
+
const matches = negate ? !hasTag : hasTag;
|
|
304
|
+
result = result && matches;
|
|
305
|
+
negate = false;
|
|
306
|
+
}
|
|
307
|
+
return result;
|
|
308
|
+
}
|
|
309
|
+
export {
|
|
310
|
+
compileFeature
|
|
311
|
+
};
|
|
312
|
+
//# sourceMappingURL=compiler-74VGKZO6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/gherkin/compiler.ts","../src/gherkin/matcher.ts"],"sourcesContent":["import { Parser, AstBuilder, GherkinClassicTokenMatcher } from \"@cucumber/gherkin\";\nimport { IdGenerator } from \"@cucumber/messages\";\nimport type { FlowDefinition, FlowConfig } from \"../api/flow.js\";\nimport type { Platform } from \"../schemas/selector.js\";\nimport type { ScenarioStepResult, ScenarioStepKeyword } from \"../report/types.js\";\nimport { createStepMatcher, type MatchResult } from \"./matcher.js\";\nimport { globalRegistry, type StepContext } from \"./registry.js\";\nimport { getWorldFactory } from \"./world.js\";\n\nconst PLATFORM_TAGS: Record<string, Platform> = {\n \"@web\": \"web\",\n \"@android\": \"android\",\n \"@ios\": \"ios\",\n};\n\ninterface GherkinStep {\n keyword: string;\n text: string;\n dataTable?: { rows: readonly { cells: readonly { value: string }[] }[] };\n docString?: { content: string; mediaType?: string };\n}\n\ninterface GherkinScenario {\n name: string;\n tags: readonly { name: string }[];\n steps: readonly GherkinStep[];\n examples: readonly {\n tags: readonly { name: string }[];\n tableHeader?: { cells: readonly { value: string }[] };\n tableBody?: readonly { cells: readonly { value: string }[] }[];\n }[];\n}\n\nexport function compileFeature(source: string, filePath?: string): FlowDefinition[] {\n const parser = new Parser(new AstBuilder(IdGenerator.uuid()), new GherkinClassicTokenMatcher());\n\n const document = parser.parse(source);\n const feature = document.feature;\n if (!feature) return [];\n\n const featureTags = feature.tags.map((t: { name: string }) => t.name);\n const flows: FlowDefinition[] = [];\n\n // Find background steps if any\n let backgroundSteps: readonly GherkinStep[] = [];\n for (const child of feature.children) {\n if (child.background) {\n backgroundSteps = child.background.steps as readonly GherkinStep[];\n }\n }\n\n for (const child of feature.children) {\n if (!child.scenario) continue;\n const scenario = child.scenario as unknown as GherkinScenario;\n\n if (scenario.examples.length > 0) {\n // Scenario Outline — expand each example row\n for (const example of scenario.examples) {\n if (!example.tableHeader || !example.tableBody) continue;\n const headers = example.tableHeader.cells.map((c) => c.value);\n const exampleTags = example.tags.map((t) => t.name);\n\n for (const row of example.tableBody) {\n const values = row.cells.map((c) => c.value);\n const replacements: Record<string, string> = {};\n for (let i = 0; i < headers.length; i++) {\n replacements[headers[i]!] = values[i] ?? \"\";\n }\n\n const expandedName = replaceOutlinePlaceholders(scenario.name, replacements);\n const expandedSteps = scenario.steps.map((s) => ({\n ...s,\n text: replaceOutlinePlaceholders(s.text, replacements),\n }));\n\n const allTags = [...featureTags, ...scenario.tags.map((t) => t.name), ...exampleTags];\n flows.push(\n buildFlowDefinition(\n `${feature.name} — ${expandedName}`,\n allTags,\n backgroundSteps,\n expandedSteps,\n filePath,\n ),\n );\n }\n }\n } else {\n // Regular Scenario\n const allTags = [...featureTags, ...scenario.tags.map((t) => t.name)];\n flows.push(\n buildFlowDefinition(\n `${feature.name} — ${scenario.name}`,\n allTags,\n backgroundSteps,\n scenario.steps,\n filePath,\n ),\n );\n }\n }\n\n return flows;\n}\n\nfunction buildFlowDefinition(\n name: string,\n tags: string[],\n backgroundSteps: readonly GherkinStep[],\n scenarioSteps: readonly GherkinStep[],\n filePath?: string,\n): FlowDefinition {\n const { platforms, filteredTags } = extractPlatformTags(tags);\n\n const config: FlowConfig = {\n tags: filteredTags.length > 0 ? filteredTags : undefined,\n platforms: platforms.length > 0 ? platforms : undefined,\n autoLaunch: false, // Gherkin flows use Background/Given steps to navigate\n };\n\n const allSteps = [...backgroundSteps, ...scenarioSteps];\n\n return {\n name,\n config,\n fn: async (flowCtx) => {\n const matcher = createStepMatcher(globalRegistry.getSteps());\n const state = new Map<string, unknown>();\n const worldFactory = getWorldFactory();\n const world = worldFactory?.instantiate(flowCtx, state);\n\n const scenarioStepResults: ScenarioStepResult[] = [];\n const beforeHooks = globalRegistry.getHooks(\"Before\");\n const afterHooks = globalRegistry.getHooks(\"After\");\n\n const stepCtx: StepContext = {\n ...flowCtx,\n state,\n ...world,\n };\n\n // Run Before hooks\n for (const hook of beforeHooks) {\n if (hook.tagExpression && !tagsMatch(tags, hook.tagExpression)) continue;\n const hookStart = Date.now();\n try {\n await hook.fn(stepCtx);\n scenarioStepResults.push({\n keyword: \"Before\",\n text: hook.tagExpression ?? \"hook\",\n status: \"passed\",\n durationMs: Date.now() - hookStart,\n });\n } catch (error) {\n scenarioStepResults.push({\n keyword: \"Before\",\n text: hook.tagExpression ?? \"hook\",\n status: \"failed\",\n durationMs: Date.now() - hookStart,\n error: error instanceof Error ? error.message : String(error),\n });\n // Still run After hooks, then rethrow\n await runAfterHooks(afterHooks, stepCtx, tags, scenarioStepResults);\n attachScenarioSteps(flowCtx, scenarioStepResults);\n throw error;\n }\n }\n\n // Run steps — fail fast, skip remaining\n let failed = false;\n let failError: unknown;\n\n for (const step of allSteps) {\n const keyword = normalizeKeyword(step.keyword);\n const stepStart = Date.now();\n\n if (failed) {\n scenarioStepResults.push({\n keyword,\n text: step.text,\n status: \"skipped\",\n durationMs: 0,\n });\n continue;\n }\n\n const match = matcher.match(step.text);\n if (!match) {\n const error = `Undefined step: \"${step.keyword.trim()} ${step.text}\"${filePath ? ` in ${filePath}` : \"\"}`;\n scenarioStepResults.push({\n keyword,\n text: step.text,\n status: \"failed\",\n durationMs: Date.now() - stepStart,\n error,\n });\n failed = true;\n failError = new Error(error);\n continue;\n }\n\n try {\n const args = buildStepArgs(match, step);\n await match.handler.fn(stepCtx, ...args);\n scenarioStepResults.push({\n keyword,\n text: step.text,\n status: \"passed\",\n durationMs: Date.now() - stepStart,\n });\n } catch (error) {\n scenarioStepResults.push({\n keyword,\n text: step.text,\n status: \"failed\",\n durationMs: Date.now() - stepStart,\n error: error instanceof Error ? error.message : String(error),\n });\n failed = true;\n failError = error;\n }\n }\n\n // Always run After hooks\n await runAfterHooks(afterHooks, stepCtx, tags, scenarioStepResults);\n attachScenarioSteps(flowCtx, scenarioStepResults);\n\n if (failError) throw failError;\n },\n };\n}\n\nasync function runAfterHooks(\n hooks: readonly { tagExpression?: string; fn: (ctx: StepContext) => Promise<void> }[],\n stepCtx: StepContext,\n tags: string[],\n results: ScenarioStepResult[],\n): Promise<void> {\n for (const hook of hooks) {\n if (hook.tagExpression && !tagsMatch(tags, hook.tagExpression)) continue;\n const hookStart = Date.now();\n try {\n await hook.fn(stepCtx);\n results.push({\n keyword: \"After\",\n text: hook.tagExpression ?? \"hook\",\n status: \"passed\",\n durationMs: Date.now() - hookStart,\n });\n } catch (error) {\n results.push({\n keyword: \"After\",\n text: hook.tagExpression ?? \"hook\",\n status: \"failed\",\n durationMs: Date.now() - hookStart,\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n}\n\nfunction attachScenarioSteps(flowCtx: any, scenarioSteps: ScenarioStepResult[]): void {\n // The engine collects steps from the step recorder on flowCtx.\n // We attach scenarioSteps to a well-known property so the engine can pick them up.\n flowCtx.__scenarioSteps = scenarioSteps;\n}\n\nfunction extractPlatformTags(tags: string[]): { platforms: Platform[]; filteredTags: string[] } {\n const platforms: Platform[] = [];\n const filteredTags: string[] = [];\n\n for (const tag of tags) {\n const platform = PLATFORM_TAGS[tag.toLowerCase()];\n if (platform) {\n platforms.push(platform);\n } else {\n filteredTags.push(tag);\n }\n }\n\n return { platforms, filteredTags };\n}\n\nfunction normalizeKeyword(keyword: string): ScenarioStepKeyword {\n const trimmed = keyword.trim();\n switch (trimmed) {\n case \"Given\":\n return \"Given\";\n case \"When\":\n return \"When\";\n case \"Then\":\n return \"Then\";\n case \"And\":\n return \"And\";\n case \"But\":\n return \"But\";\n case \"*\":\n return \"And\";\n default:\n return \"Given\";\n }\n}\n\nfunction replaceOutlinePlaceholders(text: string, replacements: Record<string, string>): string {\n return text.replaceAll(/<([^>]+)>/g, (_, key) => replacements[key] ?? `<${key}>`);\n}\n\nfunction buildStepArgs(match: MatchResult, step: GherkinStep): unknown[] {\n const args = [...match.args];\n\n if (step.dataTable) {\n const rows = step.dataTable.rows.map((r) => r.cells.map((c) => c.value));\n args.push(rows);\n }\n\n if (step.docString) {\n args.push(step.docString.content);\n }\n\n return args;\n}\n\n/** Simple tag expression matching — supports single tags and \"and\"/\"not\" */\nfunction tagsMatch(scenarioTags: string[], expression: string): boolean {\n const parts = expression.split(/\\s+/);\n let result = true;\n let negate = false;\n\n for (const part of parts) {\n if (part === \"and\") continue;\n if (part === \"not\") {\n negate = true;\n continue;\n }\n if (part === \"or\") {\n // Simple OR: if we already matched, we're done\n if (result) return true;\n result = true;\n continue;\n }\n\n const hasTag = scenarioTags.includes(part);\n const matches = negate ? !hasTag : hasTag;\n result = result && matches;\n negate = false;\n }\n\n return result;\n}\n","import {\n CucumberExpression,\n RegularExpression,\n ParameterTypeRegistry,\n} from \"@cucumber/cucumber-expressions\";\nimport type { StepHandler } from \"./registry.js\";\n\nexport interface MatchResult {\n handler: StepHandler;\n args: unknown[];\n}\n\nexport function createStepMatcher(steps: readonly StepHandler[]) {\n const parameterTypeRegistry = new ParameterTypeRegistry();\n\n const compiled = steps.map((handler) => {\n const expression =\n handler.pattern instanceof RegExp\n ? new RegularExpression(handler.pattern, parameterTypeRegistry)\n : new CucumberExpression(handler.pattern, parameterTypeRegistry);\n return { handler, expression };\n });\n\n return {\n match(text: string): MatchResult | undefined {\n const matches: { handler: StepHandler; args: unknown[] }[] = [];\n\n for (const { handler, expression } of compiled) {\n const result = expression.match(text);\n if (result) {\n matches.push({\n handler,\n args: result.map((arg) => arg.getValue(null)),\n });\n }\n }\n\n if (matches.length === 0) return undefined;\n\n if (matches.length > 1) {\n const patterns = matches.map((m) => ` \"${m.handler.pattern}\"`).join(\"\\n\");\n throw new Error(`Ambiguous step definition for \"${text}\". Matches:\\n${patterns}`);\n }\n\n return matches[0];\n },\n };\n}\n"],"mappings":";;;;;;;AAAA,SAAS,QAAQ,YAAY,kCAAkC;AAC/D,SAAS,mBAAmB;;;ACD5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQA,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,wBAAwB,IAAI,sBAAsB;AAExD,QAAM,WAAW,MAAM,IAAI,CAAC,YAAY;AACtC,UAAM,aACJ,QAAQ,mBAAmB,SACvB,IAAI,kBAAkB,QAAQ,SAAS,qBAAqB,IAC5D,IAAI,mBAAmB,QAAQ,SAAS,qBAAqB;AACnE,WAAO,EAAE,SAAS,WAAW;AAAA,EAC/B,CAAC;AAED,SAAO;AAAA,IACL,MAAM,MAAuC;AAC3C,YAAM,UAAuD,CAAC;AAE9D,iBAAW,EAAE,SAAS,WAAW,KAAK,UAAU;AAC9C,cAAM,SAAS,WAAW,MAAM,IAAI;AACpC,YAAI,QAAQ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IAAI,GAAG,GAAG;AAClF;AAEA,SAAS,cAAc,OAAoB,MAA8B;AACvE,QAAM,OAAO,CAAC,GAAG,MAAM,IAAI;AAE3B,MAAI,KAAK,WAAW;AAClB,UAAM,OAAO,KAAK,UAAU,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC;AACvE,SAAK,KAAK,IAAI;AAAA,EAChB;AAEA,MAAI,KAAK,WAAW;AAClB,SAAK,KAAK,KAAK,UAAU,OAAO;AAAA,EAClC;AAEA,SAAO;AACT;AAGA,SAAS,UAAU,cAAwB,YAA6B;AACtE,QAAM,QAAQ,WAAW,MAAM,KAAK;AACpC,MAAI,SAAS;AACb,MAAI,SAAS;AAEb,aAAW,QAAQ,OAAO;AACxB,QAAI,SAAS,MAAO;AACpB,QAAI,SAAS,OAAO;AAClB,eAAS;AACT;AAAA,IACF;AACA,QAAI,SAAS,MAAM;AAEjB,UAAI,OAAQ,QAAO;AACnB,eAAS;AACT;AAAA,IACF;AAEA,UAAM,SAAS,aAAa,SAAS,IAAI;AACzC,UAAM,UAAU,SAAS,CAAC,SAAS;AACnC,aAAS,UAAU;AACnB,aAAS;AAAA,EACX;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import "./chunk-DGUM43GV.js";
|
|
2
|
+
|
|
3
|
+
// src/report/console.ts
|
|
4
|
+
function printResultAttachments(result) {
|
|
5
|
+
for (const attachment of result.attachments ?? []) {
|
|
6
|
+
console.log(` \u21B3 ${attachment.name}: ${attachment.path}`);
|
|
7
|
+
}
|
|
8
|
+
for (const [index, step] of (result.steps ?? []).entries()) {
|
|
9
|
+
for (const attachment of step.attachments ?? []) {
|
|
10
|
+
console.log(` \u21B3 step ${index + 1} ${step.command}: ${attachment.path}`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function printScenarioSteps(steps) {
|
|
15
|
+
for (const step of steps) {
|
|
16
|
+
const icon = step.status === "passed" ? "\u2713" : step.status === "failed" ? "\u2717" : "\u25CB";
|
|
17
|
+
const duration = step.durationMs > 0 ? ` (${step.durationMs}ms)` : "";
|
|
18
|
+
console.log(` ${icon} ${step.keyword} ${step.text}${duration}`);
|
|
19
|
+
if (step.error) {
|
|
20
|
+
console.log(` ${step.error}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function workerPrefix(workerName) {
|
|
25
|
+
return workerName ? `[${workerName}] ` : "";
|
|
26
|
+
}
|
|
27
|
+
var driverNames = {
|
|
28
|
+
web: "Playwright",
|
|
29
|
+
android: "UiAutomator2",
|
|
30
|
+
ios: "WebDriverAgent"
|
|
31
|
+
};
|
|
32
|
+
function createConsoleReporter(options) {
|
|
33
|
+
const quiet = options?.quiet ?? false;
|
|
34
|
+
let completed = 0;
|
|
35
|
+
let total = 0;
|
|
36
|
+
let currentPlatform;
|
|
37
|
+
const platformDone = /* @__PURE__ */ new Map();
|
|
38
|
+
let platformTotals;
|
|
39
|
+
function progressPrefix(platform) {
|
|
40
|
+
if (platformTotals && platform) {
|
|
41
|
+
const done = platformDone.get(platform) ?? 0;
|
|
42
|
+
const ptotal = platformTotals[platform] ?? 0;
|
|
43
|
+
if (ptotal > 0) {
|
|
44
|
+
const pct = Math.round(done / ptotal * 100);
|
|
45
|
+
return `${platform} [${done}/${ptotal} ${pct}%]`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return total > 0 ? `[${completed}/${total}]` : "";
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
onFlowStart(name, platform, workerName) {
|
|
52
|
+
if (quiet) return;
|
|
53
|
+
if (platform !== currentPlatform) {
|
|
54
|
+
currentPlatform = platform;
|
|
55
|
+
console.log(`
|
|
56
|
+
${platform} (${driverNames[platform]})`);
|
|
57
|
+
}
|
|
58
|
+
if (process.stderr.isTTY) {
|
|
59
|
+
process.stderr.write(
|
|
60
|
+
` \u25B8 ${workerPrefix(workerName)}${progressPrefix(platform)} ${name}...\r`
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
onFlowPass(result) {
|
|
65
|
+
completed++;
|
|
66
|
+
platformDone.set(result.platform, (platformDone.get(result.platform) ?? 0) + 1);
|
|
67
|
+
if (quiet) return;
|
|
68
|
+
if (process.stderr.isTTY) {
|
|
69
|
+
process.stderr.write("\x1B[2K");
|
|
70
|
+
}
|
|
71
|
+
const duration = `(${result.durationMs}ms)`;
|
|
72
|
+
const flakyTag = result.flaky ? ` [flaky, passed on attempt ${result.attempts}]` : "";
|
|
73
|
+
console.log(
|
|
74
|
+
` \u2713 ${workerPrefix(result.workerName)}${progressPrefix(result.platform)} ${result.name} ${duration}${flakyTag}`
|
|
75
|
+
);
|
|
76
|
+
if (result.scenarioSteps) printScenarioSteps(result.scenarioSteps);
|
|
77
|
+
printResultAttachments(result);
|
|
78
|
+
},
|
|
79
|
+
onFlowFail(result) {
|
|
80
|
+
completed++;
|
|
81
|
+
platformDone.set(result.platform, (platformDone.get(result.platform) ?? 0) + 1);
|
|
82
|
+
if (process.stderr.isTTY) {
|
|
83
|
+
process.stderr.write("\x1B[2K");
|
|
84
|
+
}
|
|
85
|
+
const duration = `(${result.durationMs}ms)`;
|
|
86
|
+
console.log(
|
|
87
|
+
` \u2717 ${workerPrefix(result.workerName)}${progressPrefix(result.platform)} [${result.platform}] ${result.name} ${duration}`
|
|
88
|
+
);
|
|
89
|
+
if (result.scenarioSteps) printScenarioSteps(result.scenarioSteps);
|
|
90
|
+
printResultAttachments(result);
|
|
91
|
+
},
|
|
92
|
+
onRunComplete(summary) {
|
|
93
|
+
console.log("");
|
|
94
|
+
const byPlatform = /* @__PURE__ */ new Map();
|
|
95
|
+
for (const r of summary.results) {
|
|
96
|
+
const list = byPlatform.get(r.platform) ?? [];
|
|
97
|
+
list.push(r);
|
|
98
|
+
byPlatform.set(r.platform, list);
|
|
99
|
+
}
|
|
100
|
+
for (const [platform, results] of byPlatform) {
|
|
101
|
+
const passed = results.filter((r) => r.status === "passed").length;
|
|
102
|
+
const totalCount = results.length;
|
|
103
|
+
const symbols = results.map((r) => r.flaky ? "~" : r.status === "passed" ? "\u2713" : "\u2717").join("");
|
|
104
|
+
const label = `${platform} (${driverNames[platform]})`;
|
|
105
|
+
const duration = Math.max(...results.map((r) => r.durationMs));
|
|
106
|
+
console.log(
|
|
107
|
+
`${label.padEnd(25)} ${symbols} ${passed}/${totalCount} passed (${(duration / 1e3).toFixed(1)}s)`
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
const failures = summary.results.filter((r) => r.status === "failed");
|
|
111
|
+
if (failures.length > 0) {
|
|
112
|
+
console.log("\n--- Failures ---");
|
|
113
|
+
for (const f of failures) {
|
|
114
|
+
const deviceLabel = f.workerName ? `${f.platform} on ${f.workerName}` : f.platform;
|
|
115
|
+
console.log(`\u2717 [${deviceLabel}] ${f.name}`);
|
|
116
|
+
if (f.error) {
|
|
117
|
+
console.log(` Category: ${f.error.category}`);
|
|
118
|
+
console.log(` ${f.error.message}`);
|
|
119
|
+
if (f.error.suggestion) {
|
|
120
|
+
for (const line of f.error.suggestion.split("\n")) {
|
|
121
|
+
console.log(` \u{1F4A1} ${line}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const flakyResults = summary.results.filter((r) => r.flaky);
|
|
128
|
+
if (flakyResults.length > 0) {
|
|
129
|
+
console.log("\n--- Flaky ---");
|
|
130
|
+
for (const f of flakyResults) {
|
|
131
|
+
console.log(`~ [${f.platform}] ${f.name} (passed on attempt ${f.attempts})`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (summary.workerStats && summary.workerStats.size > 0) {
|
|
135
|
+
console.log("\nWorker Stats:");
|
|
136
|
+
for (const [id, stats] of summary.workerStats) {
|
|
137
|
+
console.log(` [${id}] ${stats.flowCount} flows ${(stats.totalMs / 1e3).toFixed(1)}s`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (summary.bailedOut) {
|
|
141
|
+
console.log(
|
|
142
|
+
`
|
|
143
|
+
Bailed out after ${summary.failed} failure(s)${summary.bailLimit ? ` (limit: ${summary.bailLimit})` : ""}.`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
const flakyStr = summary.flaky > 0 ? `, ${summary.flaky} flaky` : "";
|
|
147
|
+
console.log(
|
|
148
|
+
`
|
|
149
|
+
${summary.passed}/${summary.total} passed, ${summary.failed} failed${flakyStr} (${(summary.durationMs / 1e3).toFixed(1)}s)`
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
// Allow callers to set total for progress tracking
|
|
153
|
+
set flowCount(n) {
|
|
154
|
+
total = n;
|
|
155
|
+
},
|
|
156
|
+
set platformFlowCounts(counts) {
|
|
157
|
+
platformTotals = counts;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
createConsoleReporter
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=console-XWKUTP3D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/report/console.ts"],"sourcesContent":["import type { Platform } from \"../schemas/selector.js\";\nimport type { FlowResult, Reporter, ScenarioStepResult } from \"./types.js\";\n\nexport interface ConsoleReporterOptions {\n /** Only show failures and the final summary. */\n quiet?: boolean;\n}\n\nfunction printResultAttachments(result: FlowResult): void {\n for (const attachment of result.attachments ?? []) {\n console.log(` ↳ ${attachment.name}: ${attachment.path}`);\n }\n\n for (const [index, step] of (result.steps ?? []).entries()) {\n for (const attachment of step.attachments ?? []) {\n console.log(` ↳ step ${index + 1} ${step.command}: ${attachment.path}`);\n }\n }\n}\n\nfunction printScenarioSteps(steps: ScenarioStepResult[]): void {\n for (const step of steps) {\n const icon = step.status === \"passed\" ? \"✓\" : step.status === \"failed\" ? \"✗\" : \"○\";\n const duration = step.durationMs > 0 ? ` (${step.durationMs}ms)` : \"\";\n console.log(` ${icon} ${step.keyword} ${step.text}${duration}`);\n if (step.error) {\n console.log(` ${step.error}`);\n }\n }\n}\n\nfunction workerPrefix(workerName?: string): string {\n return workerName ? `[${workerName}] ` : \"\";\n}\n\nconst driverNames: Record<Platform, string> = {\n web: \"Playwright\",\n android: \"UiAutomator2\",\n ios: \"WebDriverAgent\",\n};\n\nexport function createConsoleReporter(options?: ConsoleReporterOptions): Reporter {\n const quiet = options?.quiet ?? false;\n let completed = 0;\n let total = 0;\n let currentPlatform: Platform | undefined;\n const platformDone = new Map<Platform, number>();\n let platformTotals: Partial<Record<Platform, number>> | undefined;\n\n function progressPrefix(platform?: Platform): string {\n if (platformTotals && platform) {\n const done = platformDone.get(platform) ?? 0;\n const ptotal = platformTotals[platform] ?? 0;\n if (ptotal > 0) {\n const pct = Math.round((done / ptotal) * 100);\n return `${platform} [${done}/${ptotal} ${pct}%]`;\n }\n }\n return total > 0 ? `[${completed}/${total}]` : \"\";\n }\n\n return {\n onFlowStart(name, platform, workerName) {\n if (quiet) return;\n\n // Print platform header when switching to a new platform\n if (platform !== currentPlatform) {\n currentPlatform = platform;\n console.log(`\\n ${platform} (${driverNames[platform]})`);\n }\n\n if (process.stderr.isTTY) {\n process.stderr.write(\n ` ▸ ${workerPrefix(workerName)}${progressPrefix(platform)} ${name}...\\r`,\n );\n }\n },\n\n onFlowPass(result) {\n completed++;\n platformDone.set(result.platform, (platformDone.get(result.platform) ?? 0) + 1);\n if (quiet) return;\n\n // Clear progress line\n if (process.stderr.isTTY) {\n process.stderr.write(\"\\x1b[2K\");\n }\n\n const duration = `(${result.durationMs}ms)`;\n const flakyTag = result.flaky ? ` [flaky, passed on attempt ${result.attempts}]` : \"\";\n console.log(\n ` ✓ ${workerPrefix(result.workerName)}${progressPrefix(result.platform)} ${result.name} ${duration}${flakyTag}`,\n );\n if (result.scenarioSteps) printScenarioSteps(result.scenarioSteps);\n printResultAttachments(result);\n },\n\n onFlowFail(result) {\n completed++;\n platformDone.set(result.platform, (platformDone.get(result.platform) ?? 0) + 1);\n\n // Clear progress line\n if (process.stderr.isTTY) {\n process.stderr.write(\"\\x1b[2K\");\n }\n\n // Always show failures, even in quiet mode\n const duration = `(${result.durationMs}ms)`;\n console.log(\n ` ✗ ${workerPrefix(result.workerName)}${progressPrefix(result.platform)} [${result.platform}] ${result.name} ${duration}`,\n );\n if (result.scenarioSteps) printScenarioSteps(result.scenarioSteps);\n printResultAttachments(result);\n },\n\n onRunComplete(summary) {\n console.log(\"\");\n\n // Group results by platform\n const byPlatform = new Map<Platform, FlowResult[]>();\n for (const r of summary.results) {\n const list = byPlatform.get(r.platform) ?? [];\n list.push(r);\n byPlatform.set(r.platform, list);\n }\n\n for (const [platform, results] of byPlatform) {\n const passed = results.filter((r) => r.status === \"passed\").length;\n const totalCount = results.length;\n const symbols = results\n .map((r) => (r.flaky ? \"~\" : r.status === \"passed\" ? \"✓\" : \"✗\"))\n .join(\"\");\n const label = `${platform} (${driverNames[platform]})`;\n const duration = Math.max(...results.map((r) => r.durationMs));\n console.log(\n `${label.padEnd(25)} ${symbols} ${passed}/${totalCount} passed (${(duration / 1000).toFixed(1)}s)`,\n );\n }\n\n // Failures detail with suggestions\n const failures = summary.results.filter((r) => r.status === \"failed\");\n if (failures.length > 0) {\n console.log(\"\\n--- Failures ---\");\n for (const f of failures) {\n const deviceLabel = f.workerName ? `${f.platform} on ${f.workerName}` : f.platform;\n console.log(`✗ [${deviceLabel}] ${f.name}`);\n if (f.error) {\n console.log(` Category: ${f.error.category}`);\n console.log(` ${f.error.message}`);\n if (f.error.suggestion) {\n for (const line of f.error.suggestion.split(\"\\n\")) {\n console.log(` 💡 ${line}`);\n }\n }\n }\n }\n }\n\n // Flaky detail\n const flakyResults = summary.results.filter((r) => r.flaky);\n if (flakyResults.length > 0) {\n console.log(\"\\n--- Flaky ---\");\n for (const f of flakyResults) {\n console.log(`~ [${f.platform}] ${f.name} (passed on attempt ${f.attempts})`);\n }\n }\n\n // Worker stats\n if (summary.workerStats && summary.workerStats.size > 0) {\n console.log(\"\\nWorker Stats:\");\n for (const [id, stats] of summary.workerStats) {\n console.log(` [${id}] ${stats.flowCount} flows ${(stats.totalMs / 1000).toFixed(1)}s`);\n }\n }\n\n if (summary.bailedOut) {\n console.log(\n `\\nBailed out after ${summary.failed} failure(s)${\n summary.bailLimit ? ` (limit: ${summary.bailLimit})` : \"\"\n }.`,\n );\n }\n\n // Final summary\n const flakyStr = summary.flaky > 0 ? `, ${summary.flaky} flaky` : \"\";\n console.log(\n `\\n${summary.passed}/${summary.total} passed, ${summary.failed} failed${flakyStr} (${(summary.durationMs / 1000).toFixed(1)}s)`,\n );\n },\n\n // Allow callers to set total for progress tracking\n set flowCount(n: number) {\n total = n;\n },\n\n set platformFlowCounts(counts: Partial<Record<Platform, number>>) {\n platformTotals = counts;\n },\n };\n}\n"],"mappings":";;;AAQA,SAAS,uBAAuB,QAA0B;AACxD,aAAW,cAAc,OAAO,eAAe,CAAC,GAAG;AACjD,YAAQ,IAAI,cAAS,WAAW,IAAI,KAAK,WAAW,IAAI,EAAE;AAAA,EAC5D;AAEA,aAAW,CAAC,OAAO,IAAI,MAAM,OAAO,SAAS,CAAC,GAAG,QAAQ,GAAG;AAC1D,eAAW,cAAc,KAAK,eAAe,CAAC,GAAG;AAC/C,cAAQ,IAAI,mBAAc,QAAQ,CAAC,IAAI,KAAK,OAAO,KAAK,WAAW,IAAI,EAAE;AAAA,IAC3E;AAAA,EACF;AACF;AAEA,SAAS,mBAAmB,OAAmC;AAC7D,aAAW,QAAQ,OAAO;AACxB,UAAM,OAAO,KAAK,WAAW,WAAW,WAAM,KAAK,WAAW,WAAW,WAAM;AAC/E,UAAM,WAAW,KAAK,aAAa,IAAI,KAAK,KAAK,UAAU,QAAQ;AACnE,YAAQ,IAAI,SAAS,IAAI,I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