@bddr/reporters 0.0.0-stage โ 0.1.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/LICENSE +21 -0
- package/README.md +8 -2
- package/dist/console.d.ts +15 -0
- package/dist/console.d.ts.map +1 -0
- package/dist/console.js +194 -0
- package/dist/console.js.map +1 -0
- package/dist/cucumber-json.d.ts +11 -0
- package/dist/cucumber-json.d.ts.map +1 -0
- package/dist/cucumber-json.js +131 -0
- package/dist/cucumber-json.js.map +1 -0
- package/dist/html-data.d.ts +40 -0
- package/dist/html-data.d.ts.map +1 -0
- package/dist/html-data.js +124 -0
- package/dist/html-data.js.map +1 -0
- package/dist/html-responsive.d.ts +7 -0
- package/dist/html-responsive.d.ts.map +1 -0
- package/dist/html-responsive.js +74 -0
- package/dist/html-responsive.js.map +1 -0
- package/dist/html-stats.d.ts +100 -0
- package/dist/html-stats.d.ts.map +1 -0
- package/dist/html-stats.js +302 -0
- package/dist/html-stats.js.map +1 -0
- package/dist/html-views.d.ts +38 -0
- package/dist/html-views.d.ts.map +1 -0
- package/dist/html-views.js +247 -0
- package/dist/html-views.js.map +1 -0
- package/dist/html.d.ts +51 -0
- package/dist/html.d.ts.map +1 -0
- package/dist/html.js +582 -0
- package/dist/html.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/junit.d.ts +12 -0
- package/dist/junit.d.ts.map +1 -0
- package/dist/junit.js +155 -0
- package/dist/junit.js.map +1 -0
- package/dist/living-docs.d.ts +46 -0
- package/dist/living-docs.d.ts.map +1 -0
- package/dist/living-docs.js +265 -0
- package/dist/living-docs.js.map +1 -0
- package/dist/logs.d.ts +28 -0
- package/dist/logs.d.ts.map +1 -0
- package/dist/logs.js +67 -0
- package/dist/logs.js.map +1 -0
- package/dist/messages.d.ts +40 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +324 -0
- package/dist/messages.js.map +1 -0
- package/dist/ndjson.d.ts +4 -0
- package/dist/ndjson.d.ts.map +1 -0
- package/dist/ndjson.js +25 -0
- package/dist/ndjson.js.map +1 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +48 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 afsarali273
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bddr/reporters
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Console, HTML, JUnit XML, Cucumber JSON, Cucumber Messages, NDJSON and living documentation reporters. Depends on core only.
|
|
4
|
+
|
|
5
|
+
Part of [bddr](https://github.com/afsarali273/bddr), a test runner for BDD scenarios with groups, dependencies, locks, retries and living documentation.
|
|
6
|
+
|
|
7
|
+
Documentation: https://afsarali273.github.io/bddr/
|
|
8
|
+
|
|
9
|
+
License: MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type LogLevel } from '@bddr/core';
|
|
2
|
+
import type { Reporter, ReporterOptions } from './types.js';
|
|
3
|
+
export interface ConsoleReporterOptions {
|
|
4
|
+
/** 'pretty' (one line per scenario, steps of failures) or 'progress' (one char per scenario). */
|
|
5
|
+
style?: 'pretty' | 'progress';
|
|
6
|
+
/** Print every step, not only for failing scenarios. */
|
|
7
|
+
verbose?: boolean;
|
|
8
|
+
colors?: boolean;
|
|
9
|
+
write?: (text: string) => void;
|
|
10
|
+
/** Show logs at or above this level: 'debug' | 'info' (default) | 'warn' | 'error' | 'silent'. */
|
|
11
|
+
logLevel?: LogLevel | 'silent';
|
|
12
|
+
}
|
|
13
|
+
/** Human-readable console output + final summary + failure details + snippets. */
|
|
14
|
+
export declare function consoleReporter(raw?: ReporterOptions): Reporter;
|
|
15
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../src/console.ts"],"names":[],"mappings":"AACA,OAAO,EAA6C,KAAK,QAAQ,EAAwD,MAAM,YAAY,CAAC;AAC5I,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAa5D,MAAM,WAAW,sBAAsB;IACrC,iGAAiG;IACjG,KAAK,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,kGAAkG;IAClG,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAChC;AAID,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,GAAG,GAAE,eAAoB,GAAG,QAAQ,CA6JnE"}
|
package/dist/console.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { attemptsNote } from './logs.js';
|
|
2
|
+
import { logLevelEnabled } from '@bddr/core';
|
|
3
|
+
const ICON = {
|
|
4
|
+
passed: 'โ',
|
|
5
|
+
failed: 'โ',
|
|
6
|
+
skipped: 'โท',
|
|
7
|
+
pending: 'โฆ',
|
|
8
|
+
undefined: '?',
|
|
9
|
+
ambiguous: 'โผ',
|
|
10
|
+
};
|
|
11
|
+
const COLOR = { passed: 32, failed: 31, skipped: 36, pending: 33, undefined: 33, ambiguous: 35 };
|
|
12
|
+
const LEVEL_COLOR = { debug: 90, info: 36, warn: 33, error: 31 };
|
|
13
|
+
/** Human-readable console output + final summary + failure details + snippets. */
|
|
14
|
+
export function consoleReporter(raw = {}) {
|
|
15
|
+
const opts = raw;
|
|
16
|
+
const write = opts.write ?? ((t) => void process.stdout.write(t));
|
|
17
|
+
const useColor = opts.colors ?? (process.stdout.isTTY && !process.env['NO_COLOR']);
|
|
18
|
+
const c = (status, text) => (useColor ? `\x1b[${COLOR[status]}m${text}\x1b[0m` : text);
|
|
19
|
+
const dim = (text) => (useColor ? `\x1b[2m${text}\x1b[0m` : text);
|
|
20
|
+
const style = opts.style ?? 'pretty';
|
|
21
|
+
const threshold = opts.logLevel ?? 'info';
|
|
22
|
+
const scenarioLogs = new Map();
|
|
23
|
+
const fmtLog = (l, indent) => {
|
|
24
|
+
const level = l.level ?? 'info';
|
|
25
|
+
const tag = `[${l.source === 'bddr' ? `bddr:${level}` : level}]`;
|
|
26
|
+
const head = useColor ? `\x1b[${LEVEL_COLOR[level]}m${tag}\x1b[0m` : tag;
|
|
27
|
+
let data = '';
|
|
28
|
+
if (l.data !== undefined) {
|
|
29
|
+
const json = JSON.stringify(l.data);
|
|
30
|
+
data = ` ${dim(json && json.length > 300 ? `${json.slice(0, 300)}โฆ` : String(json))}`;
|
|
31
|
+
}
|
|
32
|
+
const att = l.attachment ? dim(` [${l.attachment.mediaType.startsWith('image/') ? '๐ผ image' : '๐ file'}: ${l.attachment.name ?? l.attachment.mediaType}]`) : '';
|
|
33
|
+
const nth = l.attempt ? dim(` #${l.attempt}`) : '';
|
|
34
|
+
return `${indent}${head}${nth} ${l.message.split('\n').join(`\n${indent} `)}${data}${att}\n`;
|
|
35
|
+
};
|
|
36
|
+
const plan = new Map();
|
|
37
|
+
const steps = new Map();
|
|
38
|
+
const failures = [];
|
|
39
|
+
const quarantinedFailures = [];
|
|
40
|
+
const snippets = new Set();
|
|
41
|
+
const hookErrors = [];
|
|
42
|
+
const parseErrors = [];
|
|
43
|
+
let currentFeature = '';
|
|
44
|
+
return {
|
|
45
|
+
name: 'console',
|
|
46
|
+
onEvent(e) {
|
|
47
|
+
switch (e.type) {
|
|
48
|
+
case 'specParsed':
|
|
49
|
+
for (const err of e.errors)
|
|
50
|
+
parseErrors.push(`${err.uri}${err.line ? `:${err.line}` : ''} ${err.message}`);
|
|
51
|
+
break;
|
|
52
|
+
case 'planReady':
|
|
53
|
+
for (const s of e.scenarios)
|
|
54
|
+
plan.set(s.id, s);
|
|
55
|
+
break;
|
|
56
|
+
case 'stepFinished': {
|
|
57
|
+
const list = steps.get(e.scenarioId) ?? [];
|
|
58
|
+
list.push(e);
|
|
59
|
+
steps.set(e.scenarioId, list);
|
|
60
|
+
if (e.snippet)
|
|
61
|
+
snippets.add(e.snippet);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case 'log': {
|
|
65
|
+
if (!logLevelEnabled(e.level ?? 'info', threshold))
|
|
66
|
+
break;
|
|
67
|
+
if (e.scenarioId && style === 'pretty') {
|
|
68
|
+
scenarioLogs.set(e.scenarioId, [...(scenarioLogs.get(e.scenarioId) ?? []), e]);
|
|
69
|
+
}
|
|
70
|
+
else if (!e.scenarioId || style === 'progress') {
|
|
71
|
+
if (style === 'progress' && (e.level ?? 'info') !== 'warn' && e.level !== 'error')
|
|
72
|
+
break;
|
|
73
|
+
write(fmtLog(e, style === 'progress' ? '\n' : ''));
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case 'hookFinished':
|
|
78
|
+
if (e.status === 'failed' && !e.scenarioId) {
|
|
79
|
+
hookErrors.push(`${e.kind} ${e.level} hook "${e.hookName}"${e.uri ? ` (${e.uri})` : ''}: ${e.error?.message ?? ''}`);
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case 'groupRetrying':
|
|
83
|
+
// Members failed in the previous group attempt; they run again, so they are not (yet) failures.
|
|
84
|
+
for (let i = failures.length - 1; i >= 0; i--)
|
|
85
|
+
if (e.scenarioIds.includes(failures[i].scenario.id))
|
|
86
|
+
failures.splice(i, 1);
|
|
87
|
+
if (style === 'pretty')
|
|
88
|
+
write(c('pending', `\nโป group ${e.group}: attempt ${e.attempt}, re-running ${e.scenarioIds.length} scenario(s)\n`));
|
|
89
|
+
break;
|
|
90
|
+
case 'scenarioFinished': {
|
|
91
|
+
const s = plan.get(e.scenarioId);
|
|
92
|
+
if (!s)
|
|
93
|
+
break;
|
|
94
|
+
if (e.willRetry) {
|
|
95
|
+
if (style === 'progress')
|
|
96
|
+
write(c('pending', 'r'));
|
|
97
|
+
else {
|
|
98
|
+
write(` ${c('pending', 'โป')} ${s.name} ${dim(`attempt ${e.attempt} failed${e.error ? `: ${e.error.message.split('\n')[0]}` : ''} โ retrying`)}\n`);
|
|
99
|
+
scenarioLogs.delete(e.scenarioId);
|
|
100
|
+
steps.delete(e.scenarioId);
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
if (e.error && (e.status === 'failed' || e.status === 'ambiguous')) {
|
|
105
|
+
if (e.quarantined)
|
|
106
|
+
quarantinedFailures.push({ scenario: s, message: e.error.message });
|
|
107
|
+
else
|
|
108
|
+
failures.push({ scenario: s, message: e.error.message, ...(e.error.stack ? { stack: e.error.stack } : {}) });
|
|
109
|
+
}
|
|
110
|
+
if (style === 'progress') {
|
|
111
|
+
write(c(e.status, e.status === 'passed' ? (e.flaky ? 'f' : '.') : ICON[e.status]));
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
if (s.featureName !== currentFeature) {
|
|
115
|
+
currentFeature = s.featureName;
|
|
116
|
+
write(`\n${s.featureName} ${dim(s.uri)}\n`);
|
|
117
|
+
}
|
|
118
|
+
const retried = (steps.get(e.scenarioId) ?? []).filter((x) => x.mode === 'retry' && (x.attempts ?? 1) > 1).length;
|
|
119
|
+
const extra = (e.reason ? dim(` โ ${e.reason}`) : '') +
|
|
120
|
+
(retried ? dim(` (${retried} step${retried > 1 ? 's' : ''} retried)`) : '') +
|
|
121
|
+
(e.flaky ? c('pending', ` flaky (passed on attempt ${e.attempt})`) : '') +
|
|
122
|
+
(e.quarantined ? c('skipped', ' [quarantined]') : '');
|
|
123
|
+
const ex = s.example;
|
|
124
|
+
const row = !ex
|
|
125
|
+
? ''
|
|
126
|
+
: dim(ex.source ? ` (${ex.source} row ${ex.sourceRow})` : ` (${ex.name ? `${ex.name} ` : ''}#${ex.index})`);
|
|
127
|
+
write(` ${c(e.status, ICON[e.status])} ${s.name}${row}${s.ruleName ? dim(` [${s.ruleName}]`) : ''} ${dim(`:${s.line} ${e.durationMs}ms`)}${extra}\n`);
|
|
128
|
+
for (const l of scenarioLogs.get(e.scenarioId) ?? [])
|
|
129
|
+
write(fmtLog(l, ' '));
|
|
130
|
+
scenarioLogs.delete(e.scenarioId);
|
|
131
|
+
if (opts.verbose || (e.status !== 'passed' && e.status !== 'skipped')) {
|
|
132
|
+
const finished = new Map((steps.get(e.scenarioId) ?? []).map((x) => [x.stepId, x]));
|
|
133
|
+
for (const st of s.steps) {
|
|
134
|
+
const f = finished.get(st.id);
|
|
135
|
+
const status = f?.status ?? 'skipped';
|
|
136
|
+
const note = f ? attemptsNote(f) : '';
|
|
137
|
+
write(` ${c(status, ICON[status])} ${st.keyword}${st.text}${note ? dim(` (${note})`) : ''}\n`);
|
|
138
|
+
if (f?.error && status === 'failed')
|
|
139
|
+
write(` ${c('failed', f.error.message.split('\n').join('\n '))}\n`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
case 'runFinished': {
|
|
145
|
+
const { scenarios, steps: st, durationMs } = e.summary;
|
|
146
|
+
if (style === 'progress')
|
|
147
|
+
write('\n');
|
|
148
|
+
if (parseErrors.length)
|
|
149
|
+
write(`\n${c('failed', 'Parse errors:')}\n${parseErrors.map((p) => ` ${p}`).join('\n')}\n`);
|
|
150
|
+
if (hookErrors.length)
|
|
151
|
+
write(`\n${c('failed', 'Hook failures:')}\n${hookErrors.map((h) => ` ${h}`).join('\n')}\n`);
|
|
152
|
+
if (failures.length) {
|
|
153
|
+
write(`\n${c('failed', 'Failures:')}\n`);
|
|
154
|
+
failures.forEach((f, i) => {
|
|
155
|
+
write(`\n ${i + 1}) ${f.scenario.name} ${dim(`${f.scenario.uri}:${f.scenario.line}`)}\n`);
|
|
156
|
+
write(` ${f.message.split('\n').join('\n ')}\n`);
|
|
157
|
+
const frame = f.stack?.split('\n').find((l) => l.includes(' at ') && !l.includes('node_modules') && !l.includes('node:'));
|
|
158
|
+
if (frame)
|
|
159
|
+
write(` ${dim(frame.trim())}\n`);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
if (quarantinedFailures.length) {
|
|
163
|
+
write(`\n${c('skipped', 'Quarantined failures (do not fail the run):')}\n`);
|
|
164
|
+
for (const q of quarantinedFailures)
|
|
165
|
+
write(` - ${q.scenario.name} ${dim(`${q.scenario.uri}:${q.scenario.line}`)}: ${q.message.split('\n')[0]}\n`);
|
|
166
|
+
}
|
|
167
|
+
if (snippets.size) {
|
|
168
|
+
write(`\n${c('undefined', 'Undefined steps. Implement them with:')}\n\n`);
|
|
169
|
+
for (const s of snippets)
|
|
170
|
+
write(`${s}\n\n`);
|
|
171
|
+
}
|
|
172
|
+
const extras = [
|
|
173
|
+
e.summary.flaky ? c('pending', `${e.summary.flaky} flaky`) : '',
|
|
174
|
+
e.summary.retried ? `${e.summary.retried} retried` : '',
|
|
175
|
+
e.summary.quarantined ? c('skipped', `${e.summary.quarantined} quarantined`) : '',
|
|
176
|
+
].filter(Boolean);
|
|
177
|
+
write(`\n${formatCounts('scenario', scenarios, c)}${extras.length ? ` ยท ${extras.join(', ')}` : ''}\n${formatCounts('step', st, c)}\n${dim(`${(durationMs / 1000).toFixed(2)}s`)}\n`);
|
|
178
|
+
if (e.error)
|
|
179
|
+
write(`${c('failed', `Run error: ${e.error.message}`)}\n`);
|
|
180
|
+
write(e.success ? c('passed', '\nPASSED\n') : c('failed', '\nFAILED\n'));
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
default:
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function formatCounts(noun, counts, c) {
|
|
190
|
+
const order = ['passed', 'failed', 'pending', 'undefined', 'ambiguous', 'skipped'];
|
|
191
|
+
const parts = order.filter((s) => counts[s] > 0).map((s) => c(s, `${counts[s]} ${s}`));
|
|
192
|
+
return `${counts.total} ${noun}${counts.total === 1 ? '' : 's'}${parts.length ? ` (${parts.join(', ')})` : ''}`;
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=console.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../src/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,eAAe,EAAiG,MAAM,YAAY,CAAC;AAG5I,MAAM,IAAI,GAA2B;IACnC,MA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11 @@
|
|
|
1
|
+
import type { Attachment, PlannedScenario, ScenarioFinished, StepFinished } from '@bddr/core';
|
|
2
|
+
import type { Reporter, ReporterOptions } from './types.js';
|
|
3
|
+
import { LogIndex } from './logs.js';
|
|
4
|
+
/**
|
|
5
|
+
* Cucumber JSON (the legacy `--format json` shape), for dashboards and plugins that
|
|
6
|
+
* only understand it (Jenkins cucumber-reports, multiple-cucumber-html-reporter, Xray...).
|
|
7
|
+
* Durations are in nanoseconds, as Cucumber-JVM/JS emit them.
|
|
8
|
+
*/
|
|
9
|
+
export declare function cucumberJsonReporter(raw?: ReporterOptions): Reporter;
|
|
10
|
+
export declare function render(plan: PlannedScenario[], steps: Map<string, StepFinished>, attachments: Map<string, Attachment[]>, scenarios: Map<string, ScenarioFinished>, logs?: LogIndex): unknown[];
|
|
11
|
+
//# sourceMappingURL=cucumber-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cucumber-json.d.ts","sourceRoot":"","sources":["../src/cucumber-json.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAa,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzG,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAiB,QAAQ,EAAuB,MAAM,WAAW,CAAC;AAEzE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,eAAoB,GAAG,QAAQ,CA4CxE;AAID,wBAAgB,MAAM,CACpB,IAAI,EAAE,eAAe,EAAE,EACvB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAChC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EACtC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACxC,IAAI,GAAE,QAAiC,GACtC,OAAO,EAAE,CAyEX"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname } from 'node:path';
|
|
3
|
+
import { formatLogLine, LogIndex } from './logs.js';
|
|
4
|
+
/**
|
|
5
|
+
* Cucumber JSON (the legacy `--format json` shape), for dashboards and plugins that
|
|
6
|
+
* only understand it (Jenkins cucumber-reports, multiple-cucumber-html-reporter, Xray...).
|
|
7
|
+
* Durations are in nanoseconds, as Cucumber-JVM/JS emit them.
|
|
8
|
+
*/
|
|
9
|
+
export function cucumberJsonReporter(raw = {}) {
|
|
10
|
+
const outputFile = String(raw['outputFile'] ?? 'reports/cucumber.json');
|
|
11
|
+
const plan = [];
|
|
12
|
+
const steps = new Map();
|
|
13
|
+
const attachments = new Map();
|
|
14
|
+
const scenarios = new Map();
|
|
15
|
+
const logs = new LogIndex(raw['logLevel'] ?? 'info');
|
|
16
|
+
let json = '';
|
|
17
|
+
return {
|
|
18
|
+
name: 'cucumber-json',
|
|
19
|
+
onEvent(e) {
|
|
20
|
+
switch (e.type) {
|
|
21
|
+
case 'planReady':
|
|
22
|
+
plan.push(...e.scenarios);
|
|
23
|
+
break;
|
|
24
|
+
case 'stepFinished':
|
|
25
|
+
steps.set(`${e.scenarioId}|${e.stepId}`, e);
|
|
26
|
+
break;
|
|
27
|
+
case 'attachment':
|
|
28
|
+
if (e.scenarioId && e.stepId) {
|
|
29
|
+
const k = `${e.scenarioId}|${e.stepId}`;
|
|
30
|
+
attachments.set(k, [...(attachments.get(k) ?? []), e]);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
case 'scenarioFinished':
|
|
34
|
+
scenarios.set(e.scenarioId, e);
|
|
35
|
+
break;
|
|
36
|
+
case 'log':
|
|
37
|
+
logs.add(e);
|
|
38
|
+
break;
|
|
39
|
+
case 'runFinished':
|
|
40
|
+
json = JSON.stringify(render(plan, steps, attachments, scenarios, logs), null, 2);
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
async close() {
|
|
47
|
+
if (!json)
|
|
48
|
+
return;
|
|
49
|
+
mkdirSync(dirname(outputFile), { recursive: true });
|
|
50
|
+
writeFileSync(outputFile, json, 'utf8');
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const slug = (s) => s.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
|
|
55
|
+
export function render(plan, steps, attachments, scenarios, logs = new LogIndex('silent')) {
|
|
56
|
+
const features = new Map();
|
|
57
|
+
for (const s of plan) {
|
|
58
|
+
let f = features.get(s.uri);
|
|
59
|
+
if (!f) {
|
|
60
|
+
const fi = s.feature ?? { name: s.featureName, description: '', line: 1, tags: [], language: 'en' };
|
|
61
|
+
f = {
|
|
62
|
+
feature: {
|
|
63
|
+
uri: s.uri,
|
|
64
|
+
id: slug(fi.name),
|
|
65
|
+
keyword: 'Feature',
|
|
66
|
+
name: fi.name,
|
|
67
|
+
description: fi.description,
|
|
68
|
+
line: fi.line,
|
|
69
|
+
tags: fi.tags.map((name) => ({ name, line: fi.line - 1 })),
|
|
70
|
+
},
|
|
71
|
+
elements: [],
|
|
72
|
+
};
|
|
73
|
+
features.set(s.uri, f);
|
|
74
|
+
}
|
|
75
|
+
const featureTags = new Set(s.feature?.tags ?? []);
|
|
76
|
+
const result = scenarios.get(s.id);
|
|
77
|
+
f.elements.push({
|
|
78
|
+
id: `${f.feature['id']};${slug(s.name)}${s.example ? `;;${s.example.index}` : ''}`,
|
|
79
|
+
keyword: s.keyword ?? 'Scenario',
|
|
80
|
+
name: s.name,
|
|
81
|
+
description: s.description ?? '',
|
|
82
|
+
line: s.line,
|
|
83
|
+
type: 'scenario',
|
|
84
|
+
tags: s.tags.filter((t) => !featureTags.has(t)).map((name) => ({ name, line: s.line - 1 })),
|
|
85
|
+
...(logs.scenarioOnly(s.id).length
|
|
86
|
+
? {
|
|
87
|
+
before: [
|
|
88
|
+
{
|
|
89
|
+
match: { location: 'bddr: scenario logs (hooks)' },
|
|
90
|
+
result: { status: 'passed', duration: 0 },
|
|
91
|
+
output: logs.scenarioOnly(s.id).map((l) => formatLogLine(l)),
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
}
|
|
95
|
+
: {}),
|
|
96
|
+
steps: s.steps.map((st) => {
|
|
97
|
+
const r = steps.get(`${s.id}|${st.id}`);
|
|
98
|
+
const status = r?.status ?? 'skipped';
|
|
99
|
+
const res = { status, duration: Math.round((r?.durationMs ?? 0) * 1e6) };
|
|
100
|
+
if (r?.error)
|
|
101
|
+
res['error_message'] = r.error.stack ?? r.error.message;
|
|
102
|
+
else if (status === 'skipped' && result?.reason)
|
|
103
|
+
res['error_message'] = result.reason;
|
|
104
|
+
const step = {
|
|
105
|
+
keyword: st.keyword,
|
|
106
|
+
name: st.text,
|
|
107
|
+
line: st.line,
|
|
108
|
+
match: { location: r?.definition?.location ?? r?.definition?.pattern ?? 'undefined' },
|
|
109
|
+
result: res,
|
|
110
|
+
};
|
|
111
|
+
const att = attachments.get(`${s.id}|${st.id}`) ?? [];
|
|
112
|
+
const stepLogs = logs.forStep(s.id, st.id);
|
|
113
|
+
const embeddings = [
|
|
114
|
+
...att.map((a) => ({
|
|
115
|
+
mime_type: a.mediaType,
|
|
116
|
+
data: a.encoding === 'base64' ? a.body : Buffer.from(a.body, 'utf8').toString('base64'),
|
|
117
|
+
...(a.name ? { name: a.name } : {}),
|
|
118
|
+
})),
|
|
119
|
+
...stepLogs.flatMap((l) => l.attachment ? [{ mime_type: l.attachment.mediaType, data: l.attachment.body, name: l.attachment.name ?? l.message }] : []),
|
|
120
|
+
];
|
|
121
|
+
if (embeddings.length)
|
|
122
|
+
step['embeddings'] = embeddings;
|
|
123
|
+
if (stepLogs.length)
|
|
124
|
+
step['output'] = stepLogs.map((l) => formatLogLine(l));
|
|
125
|
+
return step;
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return [...features.values()].map((f) => ({ ...f.feature, elements: f.elements }));
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=cucumber-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cucumber-json.js","sourceRoot":"","sources":["../src/cucumber-json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAuB,MAAM,WAAW,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAuB,EAAE;IAC5D,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,uBAAuB,CAAC,CAAC;IACxE,MAAM,IAAI,GAAsB,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC9C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAwB,CAAC;IACpD,MAAM,SAAS,GAAG,IAAI,GAAG,EAA4B,CAAC;IACtD,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAE,GAAG,CAAC,UAAU,CAAgC,IAAI,MAAM,CAAC,CAAC;IACrF,IAAI,IAAI,GAAG,EAAE,CAAC;IAEd,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,OAAO,CAAC,CAAY;YAClB,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;gBACf,KAAK,WAAW;oBACd,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;oBAC1B,MAAM;gBACR,KAAK,cAAc;oBACjB,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;oBAC5C,MAAM;gBACR,KAAK,YAAY;oBACf,IAAI,CAAC,CAAC,UAAU,I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ples tables, CSV / Excel / JSON rows from @data) as colour-coded table
|
|
3
|
+
* rows, and step arguments (data tables, doc strings) as styled tables. Pure functions used by html.ts.
|
|
4
|
+
*
|
|
5
|
+
* Design: every example row stays an ordinary scenario card (so filters, permalinks, timeline links and the n/p
|
|
6
|
+
* shortcuts keep working), but its summary line is laid out as a table row whose columns are the data parameters.
|
|
7
|
+
* Rows of one outline / data source are wrapped in a "dataset" with a header that shows the source, the pass/fail
|
|
8
|
+
* counts and a status bar.
|
|
9
|
+
*/
|
|
10
|
+
import type { PlannedScenario, Status, StepArgument } from '@bddr/core';
|
|
11
|
+
/** Datasets with more parameters than this scroll horizontally on every screen size. */
|
|
12
|
+
export declare const WIDE_COLUMNS = 5;
|
|
13
|
+
export interface Dataset {
|
|
14
|
+
key: string;
|
|
15
|
+
rows: PlannedScenario[];
|
|
16
|
+
/** Parameter names, in order of first appearance across the rows. */
|
|
17
|
+
columns: string[];
|
|
18
|
+
title: string;
|
|
19
|
+
/** The outline's steps with the row values turned back into <placeholders>. */
|
|
20
|
+
templateSteps: string[];
|
|
21
|
+
/** Data file (with sheet/selector) or "Examples: <block name>". */
|
|
22
|
+
source: string;
|
|
23
|
+
fromFile: boolean;
|
|
24
|
+
/** Many columns: keep the table layout and scroll sideways (also on phones) instead of stacking each row. */
|
|
25
|
+
wide: boolean;
|
|
26
|
+
/** CSS grid-template-columns shared by the header and every row. */
|
|
27
|
+
template: string;
|
|
28
|
+
minWidth: number;
|
|
29
|
+
}
|
|
30
|
+
/** Scenario id without its trailing `[row]` suffix (outline rows are `<base>[<row>]`). */
|
|
31
|
+
export declare const baseId: (id: string) => string;
|
|
32
|
+
/** Datasets by scenario id. Every outline row / data row belongs to exactly one dataset. */
|
|
33
|
+
export declare function buildDatasets(plan: readonly PlannedScenario[]): Map<string, Dataset>;
|
|
34
|
+
/** Header strip + column titles. `statusOf` / `durationOf` give each row's final status and duration. */
|
|
35
|
+
export declare function renderDatasetOpen(ds: Dataset, statusOf: (id: string) => Status, durationOf: (id: string) => number): string;
|
|
36
|
+
export declare const renderDatasetClose: () => string;
|
|
37
|
+
/** A step's data table or doc string. The status colours the table so a failing step's data stands out. */
|
|
38
|
+
export declare function renderArg(arg: StepArgument | undefined, status: Status): string;
|
|
39
|
+
export declare const DATA_CSS: string;
|
|
40
|
+
//# sourceMappingURL=html-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-data.d.ts","sourceRoot":"","sources":["../src/html-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAIxE,wFAAwF;AACxF,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,qEAAqE;IACrE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,6GAA6G;IAC7G,IAAI,EAAE,OAAO,CAAC;IACd,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,0FAA0F;AAC1F,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,KAAG,MAAuC,CAAC;AAe5E,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,eAAe,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CA6BpF;AAOD,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAc3H;AAED,eAAO,MAAM,kBAAkB,QAAO,MAA4B,CAAC;AAEnE,2GAA2G;AAC3G,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAU/E;AAED,eAAO,MAAM,QAAQ,QAiCpB,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { esc, fmtMs } from './html-views.js';
|
|
2
|
+
import { stackBar, STATUSES, zeroCounts } from './html-stats.js';
|
|
3
|
+
/** Datasets with more parameters than this scroll horizontally on every screen size. */
|
|
4
|
+
export const WIDE_COLUMNS = 5;
|
|
5
|
+
/** Scenario id without its trailing `[row]` suffix (outline rows are `<base>[<row>]`). */
|
|
6
|
+
export const baseId = (id) => id.replace(/\[[^\]]*\]$/, '');
|
|
7
|
+
/** "Totals for 2 apples" + {qty:'2', item:'apples'} -> "Totals for <qty> <item>". Best effort, whole-word only. */
|
|
8
|
+
function deriveTitle(name, values) {
|
|
9
|
+
let out = name;
|
|
10
|
+
const entries = Object.entries(values)
|
|
11
|
+
.filter(([, v]) => v.trim().length > 0)
|
|
12
|
+
.sort((a, b) => b[1].length - a[1].length);
|
|
13
|
+
for (const [k, v] of entries) {
|
|
14
|
+
const escaped = v.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
15
|
+
out = out.replace(new RegExp('(^|[^\\w])' + escaped + '(?![\\w])', 'g'), '$1<' + k + '>');
|
|
16
|
+
}
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
19
|
+
/** Datasets by scenario id. Every outline row / data row belongs to exactly one dataset. */
|
|
20
|
+
export function buildDatasets(plan) {
|
|
21
|
+
const groups = new Map();
|
|
22
|
+
for (const sc of plan) {
|
|
23
|
+
if (!sc.example)
|
|
24
|
+
continue;
|
|
25
|
+
const key = `${sc.uri}|${baseId(sc.id)}|${sc.example.name}`; // one table per Examples block
|
|
26
|
+
groups.set(key, [...(groups.get(key) ?? []), sc]);
|
|
27
|
+
}
|
|
28
|
+
const byScenario = new Map();
|
|
29
|
+
for (const [key, rows] of groups) {
|
|
30
|
+
const columns = [];
|
|
31
|
+
for (const r of rows)
|
|
32
|
+
for (const c of Object.keys(r.example.values))
|
|
33
|
+
if (!columns.includes(c))
|
|
34
|
+
columns.push(c);
|
|
35
|
+
const first = rows[0].example;
|
|
36
|
+
const fromFile = !!first.source;
|
|
37
|
+
const title = deriveTitle(rows[0].name, first.values);
|
|
38
|
+
const ds = {
|
|
39
|
+
key,
|
|
40
|
+
rows,
|
|
41
|
+
columns,
|
|
42
|
+
title,
|
|
43
|
+
templateSteps: rows[0].steps.map((st) => `${st.keyword}${deriveTitle(st.text, first.values)}`),
|
|
44
|
+
source: fromFile ? first.source : `Examples${first.name ? `: ${first.name}` : ''}`,
|
|
45
|
+
fromFile,
|
|
46
|
+
wide: columns.length > WIDE_COLUMNS,
|
|
47
|
+
template: ['78px', ...columns.map(() => 'minmax(90px,1fr)'), '100px', '130px', '26px'].join(' '),
|
|
48
|
+
minWidth: 140 + columns.length * 100 + 270,
|
|
49
|
+
};
|
|
50
|
+
for (const r of rows)
|
|
51
|
+
byScenario.set(r.id, ds);
|
|
52
|
+
}
|
|
53
|
+
return byScenario;
|
|
54
|
+
}
|
|
55
|
+
/** Escapes text and highlights <placeholder> tokens. */
|
|
56
|
+
function withPlaceholders(text) {
|
|
57
|
+
return esc(text).replace(/<([^&\s]+?)>/g, '<code class="ph"><$1></code>');
|
|
58
|
+
}
|
|
59
|
+
/** Header strip + column titles. `statusOf` / `durationOf` give each row's final status and duration. */
|
|
60
|
+
export function renderDatasetOpen(ds, statusOf, durationOf) {
|
|
61
|
+
const counts = zeroCounts();
|
|
62
|
+
let total = 0;
|
|
63
|
+
for (const r of ds.rows) {
|
|
64
|
+
counts[statusOf(r.id)]++;
|
|
65
|
+
total += durationOf(r.id);
|
|
66
|
+
}
|
|
67
|
+
const pills = STATUSES.filter((s) => counts[s] > 0)
|
|
68
|
+
.map((s) => `<span class="pill st-${s}">${counts[s]} ${s}</span>`)
|
|
69
|
+
.join('');
|
|
70
|
+
const heads = ds.columns.map((c) => `<span class="dc" title="${esc(c)}">${esc(c)}</span>`).join('');
|
|
71
|
+
return `<section class="dataset"><div class="dset-head"><span class="dset-ico" aria-hidden="true">โฆ</span><b class="dset-title">${withPlaceholders(ds.title)}</b><span class="chip src" title="${ds.fromFile ? 'data source' : 'examples block'}">${ds.fromFile ? '๐ ' : ''}${esc(ds.source)}</span><span class="dset-n">${ds.rows.length} row${ds.rows.length === 1 ? '' : 's'}${ds.wide ? ` ยท ${ds.columns.length} columns` : ''}</span>${ds.wide ? '<span class="dset-scroll" title="scroll sideways to see all columns">โ scroll sideways</span>' : ''}<span class="dset-pills">${pills}</span><span class="dset-bar">${stackBar(counts, ds.rows.length)}</span><span class="dset-time">${esc(fmtMs(total))}</span></div>
|
|
72
|
+
<details class="dtemplate"><summary>Scenario template</summary><ol>${ds.templateSteps.map((t) => `<li>${withPlaceholders(t)}</li>`).join('')}</ol></details>
|
|
73
|
+
<div class="dgrid${ds.wide ? ' wide' : ''}" style="--tpl:${ds.template};--minw:${ds.minWidth}px"><div class="dhead"><span class="pin"><span></span><span class="dc dc-row" title="${ds.fromFile ? 'row in the data file' : 'row in the examples'}">#</span></span>${heads}<span></span><span class="dc">time</span><span></span></div>`;
|
|
74
|
+
}
|
|
75
|
+
export const renderDatasetClose = () => '</div></section>';
|
|
76
|
+
/** A step's data table or doc string. The status colours the table so a failing step's data stands out. */
|
|
77
|
+
export function renderArg(arg, status) {
|
|
78
|
+
if (!arg)
|
|
79
|
+
return '';
|
|
80
|
+
if (arg.kind === 'docString') {
|
|
81
|
+
return `<div class="docstring" style="--st:var(--${status})">${arg.mediaType ? `<span class="dmt">${esc(arg.mediaType)}</span>` : ''}<pre>${esc(arg.content.slice(0, 20_000))}</pre></div>`;
|
|
82
|
+
}
|
|
83
|
+
const [head, ...body] = arg.rows;
|
|
84
|
+
if (!head)
|
|
85
|
+
return '';
|
|
86
|
+
const hasHeader = body.length > 0;
|
|
87
|
+
const cells = (row, tag) => `<tr>${row.map((c) => `<${tag}>${esc(c)}</${tag}>`).join('')}</tr>`;
|
|
88
|
+
return `<div class="argwrap"><table class="argtable" style="--st:var(--${status})">${hasHeader ? `<thead>${cells(head, 'th')}</thead><tbody>${body.map((r) => cells(r, 'td')).join('')}</tbody>` : `<tbody>${cells(head, 'td')}</tbody>`}</table></div>`;
|
|
89
|
+
}
|
|
90
|
+
export const DATA_CSS = `
|
|
91
|
+
.dataset{margin:10px 0 14px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--shadow);overflow:hidden}
|
|
92
|
+
.dset-head{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;padding:9px 12px;border-bottom:1px solid var(--line)}
|
|
93
|
+
.dset-ico{color:var(--accent)}.dset-title{font-size:14px}.dset-n,.dset-time{color:var(--muted);font-size:12px}.dset-pills .pill{margin:0 0 0 4px;cursor:default}
|
|
94
|
+
.dset-bar{width:140px}.dset-bar .sbar{min-width:0}.dset-time{margin-left:auto}.chip.src{border-color:var(--accent);color:var(--accent)}
|
|
95
|
+
.dtemplate{padding:4px 12px;border-bottom:1px solid var(--line);font-size:13px}.dtemplate summary{cursor:pointer;color:var(--muted);font-size:12px}.dtemplate ol{margin:4px 0 4px 18px;padding:0;list-style:none}.dtemplate li{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;padding:1px 0}
|
|
96
|
+
.ph{background:color-mix(in srgb,var(--accent) 14%,var(--card));color:var(--accent);border-radius:4px;padding:0 4px;font-size:.95em}
|
|
97
|
+
.dgrid{overflow-x:auto;padding:8px 8px 8px}
|
|
98
|
+
.dset-scroll{font-size:11px;color:var(--muted);border:1px dashed var(--line);border-radius:10px;padding:0 8px}
|
|
99
|
+
/* wide data sets: always scroll sideways, keep the status icon and row number pinned, visible scrollbar */
|
|
100
|
+
.dgrid.wide{scrollbar-width:thin}.dgrid.wide::-webkit-scrollbar{height:10px}.dgrid.wide::-webkit-scrollbar-thumb{background:var(--line);border-radius:5px}.dgrid.wide::-webkit-scrollbar-thumb:hover{background:var(--muted)}
|
|
101
|
+
.pin{display:flex;gap:10px;align-items:baseline;min-width:0}.pin .dc-row{width:46px;flex:none}.pin>:first-child{width:22px;flex:none}
|
|
102
|
+
.dgrid.wide{padding-left:0;padding-right:0}
|
|
103
|
+
.dgrid.wide .pin{position:sticky;left:0;z-index:2;background:inherit;padding:2px 10px 2px 14px;margin:-2px -10px -2px -14px;width:auto}
|
|
104
|
+
.dgrid.wide .dhead{background:var(--card);z-index:3}.dgrid.wide .dhead .pin{background:var(--card)}
|
|
105
|
+
.dgrid.wide .dc-err{grid-column:1/-1;position:sticky;left:14px;max-width:calc(100vw - 64px);width:max-content}
|
|
106
|
+
.dgrid.wide>details>.body{position:sticky;left:14px;max-width:min(calc(100vw - 56px),1300px)}
|
|
107
|
+
.dhead,.dgrid>details.scenario>summary{display:grid;grid-template-columns:var(--tpl);column-gap:10px;align-items:center}
|
|
108
|
+
.dhead{min-width:var(--minw);padding:6px 10px 6px 14px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em;position:sticky;top:0}
|
|
109
|
+
.dgrid>details.scenario{min-width:var(--minw);margin:3px 0}
|
|
110
|
+
.dgrid>details.scenario>summary{padding:6px 10px}
|
|
111
|
+
.dc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
112
|
+
.dgrid summary .dc-row{color:var(--muted);font-size:12px}.dgrid summary .dc-flags{overflow:hidden}.dgrid summary .dc-flags .pill{margin:0 4px 0 0}
|
|
113
|
+
.dgrid summary .meta{margin-left:0;text-align:right}.dgrid summary .perma{justify-self:end}
|
|
114
|
+
.dc-err{grid-column:2/-1;color:var(--failed);font-size:12px;white-space:normal;overflow-wrap:anywhere;margin-top:-2px}
|
|
115
|
+
.dgrid details.scenario>summary{background:color-mix(in srgb,var(--passed) 5%,var(--card))}
|
|
116
|
+
${['failed', 'skipped', 'pending', 'undefined', 'ambiguous'].map((st) => `.dgrid details.scenario.st-${st}>summary{background:color-mix(in srgb,var(--${st}) 10%,var(--card))}`).join('\n')}
|
|
117
|
+
.dgrid details.scenario[open]>summary{border-bottom:1px solid var(--line)}
|
|
118
|
+
.argwrap{margin:4px 0 4px 22px;overflow-x:auto;max-width:100%;scrollbar-width:thin}.argwrap::-webkit-scrollbar{height:10px}.argwrap::-webkit-scrollbar-thumb{background:var(--line);border-radius:5px}
|
|
119
|
+
.argtable{border-collapse:collapse;font-size:12.5px;border-left:3px solid var(--st)}
|
|
120
|
+
.argtable th,.argtable td{border:1px solid var(--line);padding:3px 12px;text-align:left;white-space:nowrap}
|
|
121
|
+
.argtable th{background:color-mix(in srgb,var(--st) 14%,var(--card));font-weight:600}.argtable td{background:color-mix(in srgb,var(--st) 6%,var(--card))}
|
|
122
|
+
.docstring{margin:4px 0 4px 22px;border-left:3px solid var(--st)}.docstring pre{margin:0;border-left:0;border-radius:0 6px 6px 0}.dmt{display:inline-block;font-size:11px;color:var(--muted);padding:0 8px}
|
|
123
|
+
`;
|
|
124
|
+
//# sourceMappingURL=html-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-data.js","sourceRoot":"","sources":["../src/html-data.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEjE,wFAAwF;AACxF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAoB9B,0FAA0F;AAC1F,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAU,EAAU,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAE5E,mHAAmH;AACnH,SAAS,WAA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