plum-e2e 1.0.10 → 1.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/.claude/settings.local.json +16 -1
- package/.vscode/settings.json +10 -0
- package/README.md +151 -37
- package/backend/_scaffold/features/LoginPage.feature +45 -3
- package/backend/_scaffold/pages/HomepagePage.ts +7 -0
- package/backend/_scaffold/pages/LoginPage.ts +37 -13
- package/backend/_scaffold/step_definitions/HomepageSteps.ts +6 -0
- package/backend/_scaffold/step_definitions/LoginSteps.ts +30 -4
- package/backend/_scaffold/utils/browser.ts +33 -0
- package/backend/_scaffold/utils/hooks.ts +8 -29
- package/backend/_scaffold/utils/utils.ts +3 -9
- package/backend/config/scripts/create-settings.js +7 -14
- package/backend/config/scripts/create-step.mjs +268 -0
- package/backend/config/scripts/generate-report.js +31 -75
- package/backend/config/scripts/run-tests.js +19 -4
- package/backend/package-lock.json +56 -641
- package/backend/package.json +4 -1
- package/backend/routes/reports.routes.js +6 -10
- package/backend/services/envService.js +4 -10
- package/backend/services/reportService.js +70 -20
- package/backend/services/testService.js +99 -24
- package/backend/tsconfig.json +2 -2
- package/backend/websockets/socketHandler.js +12 -6
- package/bin/plum.js +49 -3
- package/frontend/package-lock.json +436 -135
- package/frontend/package.json +1 -1
- package/frontend/src/app.css +241 -6
- package/frontend/src/app.html +14 -1
- package/frontend/src/lib/api/reports.js +68 -0
- package/frontend/src/lib/api/schedules.js +64 -0
- package/frontend/src/lib/api/tests.js +41 -0
- package/frontend/src/lib/components/layout/Nav.svelte +304 -0
- package/frontend/src/lib/components/layout/PageShell.svelte +28 -0
- package/frontend/src/lib/components/layout/RunnerPanel.svelte +378 -0
- package/frontend/src/lib/components/ui/Badge.svelte +63 -0
- package/frontend/src/lib/components/ui/Button.svelte +117 -0
- package/frontend/src/lib/components/ui/Modal.svelte +140 -0
- package/frontend/src/lib/components/ui/Pagination.svelte +100 -0
- package/frontend/src/lib/components/ui/Terminal.svelte +100 -0
- package/frontend/src/lib/stores/runner.js +55 -0
- package/frontend/src/lib/stores/theme.js +47 -0
- package/frontend/src/routes/+layout.svelte +7 -12
- package/frontend/src/routes/+page.svelte +690 -142
- package/frontend/src/routes/reports/+page.svelte +395 -125
- package/frontend/src/routes/reports/[slug]/+page.svelte +749 -0
- package/frontend/src/routes/scheduled-tests/+page.svelte +267 -303
- package/frontend/svelte.config.js +1 -4
- package/frontend/tailwind.config.js +2 -23
- package/package.json +2 -2
- package/backend/_scaffold/utils/world.ts +0 -25
- package/frontend/src/routes/components/Navigation.svelte +0 -53
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* This file is part of Plum.
|
|
3
|
+
*
|
|
4
|
+
* Plum is free software: you can redistribute it and/or modify
|
|
5
|
+
* it under the terms of the GNU General Public License as published by
|
|
6
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
7
|
+
* (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* Plum is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU General Public License
|
|
15
|
+
* along with Plum. If not, see https://www.gnu.org/licenses/.
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import { page } from '$app/stores';
|
|
20
|
+
import { onMount } from 'svelte';
|
|
21
|
+
import { slide } from 'svelte/transition';
|
|
22
|
+
import { fetchReportDetail, parseReport } from '$lib/api/reports';
|
|
23
|
+
import Badge from '$lib/components/ui/Badge.svelte';
|
|
24
|
+
|
|
25
|
+
const fileName = decodeURIComponent($page.params.slug);
|
|
26
|
+
const meta = parseReport(fileName);
|
|
27
|
+
|
|
28
|
+
let detail = null;
|
|
29
|
+
let error = null;
|
|
30
|
+
let expandedScenarios = new Set();
|
|
31
|
+
|
|
32
|
+
onMount(async () => {
|
|
33
|
+
try {
|
|
34
|
+
detail = await fetchReportDetail(fileName);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
error = 'Could not load report.';
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
function toggleScenario(id) {
|
|
41
|
+
if (expandedScenarios.has(id)) {
|
|
42
|
+
expandedScenarios.delete(id);
|
|
43
|
+
} else {
|
|
44
|
+
expandedScenarios.add(id);
|
|
45
|
+
}
|
|
46
|
+
expandedScenarios = expandedScenarios;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function fmtDuration(ms) {
|
|
50
|
+
if (ms >= 1000) return (ms / 1000).toFixed(2) + 's';
|
|
51
|
+
return ms + 'ms';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function keywordClass(kw) {
|
|
55
|
+
const k = kw.toLowerCase();
|
|
56
|
+
if (k === 'given') return 'kw-given';
|
|
57
|
+
if (k === 'when') return 'kw-when';
|
|
58
|
+
if (k === 'then') return 'kw-then';
|
|
59
|
+
return 'kw-and';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function scenarioTestTag(scenario) {
|
|
63
|
+
return scenario.tags.find((tag) => /^@test[\w-]*/i.test(tag));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function visibleTags(scenario) {
|
|
67
|
+
const testTag = scenarioTestTag(scenario);
|
|
68
|
+
if (testTag) return [testTag];
|
|
69
|
+
return scenario.tags.filter((tag) => tag !== meta?.tags && !tag.includes('suite'));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function worstStatus(scenarios) {
|
|
73
|
+
const rank = { failed: 3, pending: 2, skipped: 1, passed: 0 };
|
|
74
|
+
return scenarios.reduce(
|
|
75
|
+
(status, scenario) =>
|
|
76
|
+
(rank[scenario.status] ?? 0) > (rank[status] ?? 0) ? scenario.status : status,
|
|
77
|
+
'passed'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function groupedScenarios(scenarios) {
|
|
82
|
+
const groups = new Map();
|
|
83
|
+
|
|
84
|
+
for (const scenario of scenarios) {
|
|
85
|
+
const testTag = scenarioTestTag(scenario);
|
|
86
|
+
const key = testTag || `${scenario.keyword}:${scenario.name}`;
|
|
87
|
+
|
|
88
|
+
if (!groups.has(key)) {
|
|
89
|
+
groups.set(key, {
|
|
90
|
+
key,
|
|
91
|
+
name: scenario.name,
|
|
92
|
+
tags: visibleTags(scenario),
|
|
93
|
+
scenarios: [],
|
|
94
|
+
duration: 0,
|
|
95
|
+
status: scenario.status
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const group = groups.get(key);
|
|
100
|
+
group.scenarios.push(scenario);
|
|
101
|
+
group.duration += scenario.duration;
|
|
102
|
+
group.status = worstStatus(group.scenarios);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return Array.from(groups.values());
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
$: passed =
|
|
109
|
+
detail?.features.flatMap((f) => f.scenarios).filter((s) => s.status === 'passed').length ?? 0;
|
|
110
|
+
$: failed =
|
|
111
|
+
detail?.features.flatMap((f) => f.scenarios).filter((s) => s.status === 'failed').length ?? 0;
|
|
112
|
+
$: skipped =
|
|
113
|
+
detail?.features
|
|
114
|
+
.flatMap((f) => f.scenarios)
|
|
115
|
+
.filter((s) => s.status === 'skipped' || s.status === 'pending').length ?? 0;
|
|
116
|
+
$: totalDuration =
|
|
117
|
+
detail?.features.flatMap((f) => f.scenarios).reduce((s, sc) => s + sc.duration, 0) ?? 0;
|
|
118
|
+
$: overallPass = meta?.status === 'PASS';
|
|
119
|
+
$: groupedFeatures =
|
|
120
|
+
detail?.features.map((feature) => ({
|
|
121
|
+
...feature,
|
|
122
|
+
scenarioGroups: groupedScenarios(feature.scenarios)
|
|
123
|
+
})) ?? [];
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<div class="back-row">
|
|
127
|
+
<a href="/reports" class="back-link">
|
|
128
|
+
<svg
|
|
129
|
+
width="14"
|
|
130
|
+
height="14"
|
|
131
|
+
viewBox="0 0 24 24"
|
|
132
|
+
fill="none"
|
|
133
|
+
stroke="currentColor"
|
|
134
|
+
stroke-width="2"
|
|
135
|
+
stroke-linecap="round"
|
|
136
|
+
>
|
|
137
|
+
<line x1="19" y1="12" x2="5" y2="12" />
|
|
138
|
+
<polyline points="12 19 5 12 12 5" />
|
|
139
|
+
</svg>
|
|
140
|
+
Reports
|
|
141
|
+
</a>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
{#if error}
|
|
145
|
+
<div class="error-state">{error}</div>
|
|
146
|
+
{:else if !detail}
|
|
147
|
+
<div class="loading-state">
|
|
148
|
+
<div class="loading-dots">
|
|
149
|
+
<span></span><span></span><span></span>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
{:else}
|
|
153
|
+
<!-- Header -->
|
|
154
|
+
<div class="report-header" class:pass={overallPass} class:fail={!overallPass}>
|
|
155
|
+
<div class="header-main">
|
|
156
|
+
<div class="header-status">
|
|
157
|
+
<span class="status-icon">{overallPass ? '✓' : '✗'}</span>
|
|
158
|
+
<div>
|
|
159
|
+
<h1>{overallPass ? 'Passed' : 'Failed'}</h1>
|
|
160
|
+
{#if meta}
|
|
161
|
+
<p class="header-meta">
|
|
162
|
+
<span class="mono">{meta.tags}</span>
|
|
163
|
+
·
|
|
164
|
+
{#if meta.triggerType === 'manual-trigger'}Manual{:else if meta.triggerType === 'undefined'}CLI{:else}Scheduled{/if}
|
|
165
|
+
·
|
|
166
|
+
{meta.date}
|
|
167
|
+
</p>
|
|
168
|
+
{/if}
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div class="header-stats">
|
|
173
|
+
<div class="stat">
|
|
174
|
+
<span class="stat-num pass-color">{passed}</span>
|
|
175
|
+
<span class="stat-label">passed</span>
|
|
176
|
+
</div>
|
|
177
|
+
{#if failed > 0}
|
|
178
|
+
<div class="stat">
|
|
179
|
+
<span class="stat-num fail-color">{failed}</span>
|
|
180
|
+
<span class="stat-label">failed</span>
|
|
181
|
+
</div>
|
|
182
|
+
{/if}
|
|
183
|
+
{#if skipped > 0}
|
|
184
|
+
<div class="stat">
|
|
185
|
+
<span class="stat-num muted-color">{skipped}</span>
|
|
186
|
+
<span class="stat-label">skipped</span>
|
|
187
|
+
</div>
|
|
188
|
+
{/if}
|
|
189
|
+
<div class="stat">
|
|
190
|
+
<span class="stat-num">{fmtDuration(totalDuration)}</span>
|
|
191
|
+
<span class="stat-label">total</span>
|
|
192
|
+
</div>
|
|
193
|
+
{#if meta}
|
|
194
|
+
<div class="stat">
|
|
195
|
+
<span class="stat-num">{meta.runners}</span>
|
|
196
|
+
<span class="stat-label">runner{meta.runners !== 1 ? 's' : ''}</span>
|
|
197
|
+
</div>
|
|
198
|
+
{/if}
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<!-- Features -->
|
|
204
|
+
{#each groupedFeatures as feature, fi}
|
|
205
|
+
<div class="feature" style="animation-delay: {fi * 60}ms">
|
|
206
|
+
<div class="feature-header">
|
|
207
|
+
<Badge variant={feature.status === 'passed' ? 'pass' : 'fail'}>
|
|
208
|
+
{feature.status}
|
|
209
|
+
</Badge>
|
|
210
|
+
<h2 class="feature-name">{feature.name}</h2>
|
|
211
|
+
<span class="feature-file">{feature.uri}</span>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div class="scenarios">
|
|
215
|
+
{#each feature.scenarioGroups as group, si}
|
|
216
|
+
{@const scenId = `${fi}-${group.key}`}
|
|
217
|
+
{@const open = expandedScenarios.has(scenId)}
|
|
218
|
+
<div class="scenario" style="animation-delay: {(fi * 5 + si) * 40}ms">
|
|
219
|
+
<button class="scenario-header" on:click={() => toggleScenario(scenId)}>
|
|
220
|
+
<span
|
|
221
|
+
class="scenario-status-dot"
|
|
222
|
+
class:pass={group.status === 'passed'}
|
|
223
|
+
class:fail={group.status === 'failed'}
|
|
224
|
+
class:skip={group.status === 'skipped' || group.status === 'pending'}
|
|
225
|
+
></span>
|
|
226
|
+
|
|
227
|
+
<span class="scenario-name">
|
|
228
|
+
{group.name}
|
|
229
|
+
{#if group.scenarios.length > 1}
|
|
230
|
+
<span class="scenario-count">{group.scenarios.length} cases</span>
|
|
231
|
+
{/if}
|
|
232
|
+
</span>
|
|
233
|
+
|
|
234
|
+
<div class="scenario-tags">
|
|
235
|
+
{#each group.tags as tag}
|
|
236
|
+
<span class="tag-chip">{tag}</span>
|
|
237
|
+
{/each}
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<span class="scenario-duration">{fmtDuration(group.duration)}</span>
|
|
241
|
+
|
|
242
|
+
<svg
|
|
243
|
+
width="13"
|
|
244
|
+
height="13"
|
|
245
|
+
viewBox="0 0 24 24"
|
|
246
|
+
fill="none"
|
|
247
|
+
stroke="currentColor"
|
|
248
|
+
stroke-width="2"
|
|
249
|
+
stroke-linecap="round"
|
|
250
|
+
class="chevron"
|
|
251
|
+
class:rotated={open}
|
|
252
|
+
>
|
|
253
|
+
<polyline points="9 18 15 12 9 6" />
|
|
254
|
+
</svg>
|
|
255
|
+
</button>
|
|
256
|
+
|
|
257
|
+
{#if open}
|
|
258
|
+
<div class="steps" transition:slide={{ duration: 200 }}>
|
|
259
|
+
{#each group.scenarios as scenario, exampleIndex}
|
|
260
|
+
{#if group.scenarios.length > 1}
|
|
261
|
+
<div class="example-header">
|
|
262
|
+
<span
|
|
263
|
+
class="scenario-status-dot"
|
|
264
|
+
class:pass={scenario.status === 'passed'}
|
|
265
|
+
class:fail={scenario.status === 'failed'}
|
|
266
|
+
class:skip={scenario.status === 'skipped' || scenario.status === 'pending'}
|
|
267
|
+
></span>
|
|
268
|
+
<span>Case {exampleIndex + 1}</span>
|
|
269
|
+
<span class="scenario-duration">{fmtDuration(scenario.duration)}</span>
|
|
270
|
+
</div>
|
|
271
|
+
{/if}
|
|
272
|
+
|
|
273
|
+
{#each scenario.steps as step}
|
|
274
|
+
<div
|
|
275
|
+
class="step"
|
|
276
|
+
class:step-fail={step.status === 'failed'}
|
|
277
|
+
class:step-skip={step.status === 'skipped' || step.status === 'pending'}
|
|
278
|
+
>
|
|
279
|
+
<div class="step-row">
|
|
280
|
+
<span class="step-status-icon">
|
|
281
|
+
{#if step.status === 'passed'}✓{:else if step.status === 'failed'}✗{:else}−{/if}
|
|
282
|
+
</span>
|
|
283
|
+
<span class="kw {keywordClass(step.keyword)}">{step.keyword}</span>
|
|
284
|
+
<span class="step-name">{step.name}</span>
|
|
285
|
+
<span class="step-duration">{fmtDuration(step.duration)}</span>
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
{#if step.error}
|
|
289
|
+
<pre class="step-error">{step.error}</pre>
|
|
290
|
+
{/if}
|
|
291
|
+
|
|
292
|
+
{#if step.screenshot}
|
|
293
|
+
<details class="screenshot-wrap" open>
|
|
294
|
+
<summary class="screenshot-toggle">Screenshot</summary>
|
|
295
|
+
<img
|
|
296
|
+
class="screenshot"
|
|
297
|
+
src="data:image/png;base64,{step.screenshot}"
|
|
298
|
+
alt="Failure screenshot"
|
|
299
|
+
/>
|
|
300
|
+
</details>
|
|
301
|
+
{/if}
|
|
302
|
+
</div>
|
|
303
|
+
{/each}
|
|
304
|
+
{/each}
|
|
305
|
+
</div>
|
|
306
|
+
{/if}
|
|
307
|
+
</div>
|
|
308
|
+
{/each}
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
{/each}
|
|
312
|
+
{/if}
|
|
313
|
+
|
|
314
|
+
<style>
|
|
315
|
+
.back-row {
|
|
316
|
+
margin-bottom: 1.5rem;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.back-link {
|
|
320
|
+
display: inline-flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
gap: 0.35rem;
|
|
323
|
+
font-size: 0.8125rem;
|
|
324
|
+
color: var(--text-muted);
|
|
325
|
+
text-decoration: none;
|
|
326
|
+
transition: color var(--duration-fast);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.back-link:hover {
|
|
330
|
+
color: var(--text);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* ── Header ── */
|
|
334
|
+
.report-header {
|
|
335
|
+
border-radius: var(--radius-lg);
|
|
336
|
+
border: 1px solid var(--border);
|
|
337
|
+
border-left-width: 4px;
|
|
338
|
+
padding: 1.5rem;
|
|
339
|
+
margin-bottom: 2rem;
|
|
340
|
+
background: var(--bg-elevated);
|
|
341
|
+
animation: fadeUp 0.35s var(--ease-out) both;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.report-header.pass {
|
|
345
|
+
border-left-color: var(--pass);
|
|
346
|
+
}
|
|
347
|
+
.report-header.fail {
|
|
348
|
+
border-left-color: var(--fail);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.header-main {
|
|
352
|
+
display: flex;
|
|
353
|
+
align-items: flex-start;
|
|
354
|
+
justify-content: space-between;
|
|
355
|
+
gap: 1.5rem;
|
|
356
|
+
flex-wrap: wrap;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.header-status {
|
|
360
|
+
display: flex;
|
|
361
|
+
align-items: center;
|
|
362
|
+
gap: 1rem;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.status-icon {
|
|
366
|
+
font-size: 2rem;
|
|
367
|
+
line-height: 1;
|
|
368
|
+
font-weight: 600;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.report-header.pass .status-icon {
|
|
372
|
+
color: var(--pass);
|
|
373
|
+
}
|
|
374
|
+
.report-header.fail .status-icon {
|
|
375
|
+
color: var(--fail);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
h1 {
|
|
379
|
+
font-size: 2rem;
|
|
380
|
+
margin-bottom: 0.2rem;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.header-meta {
|
|
384
|
+
font-size: 0.8125rem;
|
|
385
|
+
color: var(--text-muted);
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: center;
|
|
388
|
+
gap: 0.5rem;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.mono {
|
|
392
|
+
font-family: 'JetBrains Mono', monospace;
|
|
393
|
+
font-size: 0.78rem;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.header-stats {
|
|
397
|
+
display: flex;
|
|
398
|
+
gap: 1.5rem;
|
|
399
|
+
align-items: flex-start;
|
|
400
|
+
flex-shrink: 0;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.stat {
|
|
404
|
+
display: flex;
|
|
405
|
+
flex-direction: column;
|
|
406
|
+
align-items: center;
|
|
407
|
+
gap: 0.1rem;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.stat-num {
|
|
411
|
+
font-family: var(--font-display);
|
|
412
|
+
font-size: 1.75rem;
|
|
413
|
+
line-height: 1;
|
|
414
|
+
font-weight: 400;
|
|
415
|
+
color: var(--text);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.stat-label {
|
|
419
|
+
font-size: 0.68rem;
|
|
420
|
+
color: var(--text-muted);
|
|
421
|
+
letter-spacing: 0.06em;
|
|
422
|
+
text-transform: uppercase;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.pass-color {
|
|
426
|
+
color: var(--pass);
|
|
427
|
+
}
|
|
428
|
+
.fail-color {
|
|
429
|
+
color: var(--fail);
|
|
430
|
+
}
|
|
431
|
+
.muted-color {
|
|
432
|
+
color: var(--text-muted);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* ── Features ── */
|
|
436
|
+
.feature {
|
|
437
|
+
margin-bottom: 1.5rem;
|
|
438
|
+
animation: fadeUp 0.35s var(--ease-out) both;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.feature-header {
|
|
442
|
+
display: flex;
|
|
443
|
+
align-items: center;
|
|
444
|
+
gap: 0.75rem;
|
|
445
|
+
margin-bottom: 0.75rem;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.feature-name {
|
|
449
|
+
font-size: 1.1rem;
|
|
450
|
+
font-family: var(--font-display);
|
|
451
|
+
font-weight: 400;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.feature-file {
|
|
455
|
+
font-family: 'JetBrains Mono', monospace;
|
|
456
|
+
font-size: 0.72rem;
|
|
457
|
+
color: var(--text-muted);
|
|
458
|
+
margin-left: auto;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/* ── Scenarios ── */
|
|
462
|
+
.scenarios {
|
|
463
|
+
display: flex;
|
|
464
|
+
flex-direction: column;
|
|
465
|
+
gap: 0.375rem;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.scenario {
|
|
469
|
+
border: 1px solid var(--border);
|
|
470
|
+
border-radius: var(--radius-md);
|
|
471
|
+
background: var(--bg-elevated);
|
|
472
|
+
overflow: hidden;
|
|
473
|
+
animation: fadeUp 0.3s var(--ease-out) both;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.scenario-header {
|
|
477
|
+
display: flex;
|
|
478
|
+
align-items: center;
|
|
479
|
+
gap: 0.75rem;
|
|
480
|
+
padding: 0.75rem 1rem;
|
|
481
|
+
width: 100%;
|
|
482
|
+
background: transparent;
|
|
483
|
+
border: none;
|
|
484
|
+
cursor: pointer;
|
|
485
|
+
text-align: left;
|
|
486
|
+
font-family: var(--font-body);
|
|
487
|
+
transition: background var(--duration-fast);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.scenario-header:hover {
|
|
491
|
+
background: var(--bg-subtle);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.scenario-status-dot {
|
|
495
|
+
width: 8px;
|
|
496
|
+
height: 8px;
|
|
497
|
+
border-radius: 50%;
|
|
498
|
+
flex-shrink: 0;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.scenario-status-dot.pass {
|
|
502
|
+
background: var(--pass);
|
|
503
|
+
}
|
|
504
|
+
.scenario-status-dot.fail {
|
|
505
|
+
background: var(--fail);
|
|
506
|
+
}
|
|
507
|
+
.scenario-status-dot.skip {
|
|
508
|
+
background: var(--text-muted);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.scenario-name {
|
|
512
|
+
flex: 1;
|
|
513
|
+
font-size: 0.875rem;
|
|
514
|
+
color: var(--text);
|
|
515
|
+
font-weight: 400;
|
|
516
|
+
text-align: left;
|
|
517
|
+
display: inline-flex;
|
|
518
|
+
align-items: center;
|
|
519
|
+
gap: 0.4rem;
|
|
520
|
+
min-width: 0;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.scenario-count {
|
|
524
|
+
font-size: 0.65rem;
|
|
525
|
+
font-weight: 500;
|
|
526
|
+
letter-spacing: 0.04em;
|
|
527
|
+
text-transform: uppercase;
|
|
528
|
+
color: var(--text-muted);
|
|
529
|
+
background: var(--bg-subtle);
|
|
530
|
+
border: 1px solid var(--border);
|
|
531
|
+
border-radius: 100px;
|
|
532
|
+
padding: 0.05rem 0.4rem;
|
|
533
|
+
white-space: nowrap;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.scenario-tags {
|
|
537
|
+
display: flex;
|
|
538
|
+
gap: 0.25rem;
|
|
539
|
+
flex-shrink: 0;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.tag-chip {
|
|
543
|
+
font-size: 0.65rem;
|
|
544
|
+
font-family: 'JetBrains Mono', monospace;
|
|
545
|
+
background: var(--accent-soft);
|
|
546
|
+
color: var(--accent);
|
|
547
|
+
padding: 0.1rem 0.4rem;
|
|
548
|
+
border-radius: 100px;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.scenario-duration {
|
|
552
|
+
font-size: 0.75rem;
|
|
553
|
+
color: var(--text-muted);
|
|
554
|
+
font-family: 'JetBrains Mono', monospace;
|
|
555
|
+
flex-shrink: 0;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.chevron {
|
|
559
|
+
color: var(--text-muted);
|
|
560
|
+
flex-shrink: 0;
|
|
561
|
+
transition: transform var(--duration-fast) var(--ease-out);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.chevron.rotated {
|
|
565
|
+
transform: rotate(90deg);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* ── Steps ── */
|
|
569
|
+
.steps {
|
|
570
|
+
border-top: 1px solid var(--border);
|
|
571
|
+
background: var(--bg-subtle);
|
|
572
|
+
padding: 0.5rem 0;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.example-header {
|
|
576
|
+
display: flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
gap: 0.5rem;
|
|
579
|
+
padding: 0.625rem 1rem 0.25rem 1.25rem;
|
|
580
|
+
color: var(--text-muted);
|
|
581
|
+
font-size: 0.72rem;
|
|
582
|
+
font-weight: 500;
|
|
583
|
+
letter-spacing: 0.05em;
|
|
584
|
+
text-transform: uppercase;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.example-header:not(:first-child) {
|
|
588
|
+
margin-top: 0.375rem;
|
|
589
|
+
border-top: 1px dashed var(--border);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.example-header .scenario-duration {
|
|
593
|
+
margin-left: auto;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.step {
|
|
597
|
+
padding: 0.375rem 1rem 0.375rem 1.25rem;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.step-fail {
|
|
601
|
+
background: color-mix(in srgb, var(--fail-soft) 40%, transparent);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.step-skip {
|
|
605
|
+
opacity: 0.5;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.step-row {
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: baseline;
|
|
611
|
+
gap: 0.5rem;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.step-status-icon {
|
|
615
|
+
font-size: 0.75rem;
|
|
616
|
+
font-weight: 600;
|
|
617
|
+
width: 14px;
|
|
618
|
+
flex-shrink: 0;
|
|
619
|
+
color: var(--text-muted);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.step-fail .step-status-icon {
|
|
623
|
+
color: var(--fail);
|
|
624
|
+
}
|
|
625
|
+
.step:not(.step-fail):not(.step-skip) .step-status-icon {
|
|
626
|
+
color: var(--pass);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.kw {
|
|
630
|
+
font-size: 0.72rem;
|
|
631
|
+
font-weight: 500;
|
|
632
|
+
letter-spacing: 0.04em;
|
|
633
|
+
flex-shrink: 0;
|
|
634
|
+
padding: 0.05rem 0.4rem;
|
|
635
|
+
border-radius: 3px;
|
|
636
|
+
font-family: 'JetBrains Mono', monospace;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.kw-given {
|
|
640
|
+
background: var(--accent-soft);
|
|
641
|
+
color: var(--accent);
|
|
642
|
+
}
|
|
643
|
+
.kw-when {
|
|
644
|
+
background: var(--warn-soft);
|
|
645
|
+
color: var(--warn);
|
|
646
|
+
}
|
|
647
|
+
.kw-then {
|
|
648
|
+
background: var(--pass-soft);
|
|
649
|
+
color: var(--pass);
|
|
650
|
+
}
|
|
651
|
+
.kw-and {
|
|
652
|
+
background: var(--bg-elevated);
|
|
653
|
+
color: var(--text-muted);
|
|
654
|
+
border: 1px solid var(--border);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.step-name {
|
|
658
|
+
flex: 1;
|
|
659
|
+
font-size: 0.8125rem;
|
|
660
|
+
color: var(--text);
|
|
661
|
+
font-family: 'JetBrains Mono', monospace;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.step-duration {
|
|
665
|
+
font-size: 0.7rem;
|
|
666
|
+
color: var(--text-muted);
|
|
667
|
+
font-family: 'JetBrains Mono', monospace;
|
|
668
|
+
flex-shrink: 0;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.step-error {
|
|
672
|
+
margin: 0.375rem 0 0.25rem 1.75rem;
|
|
673
|
+
padding: 0.625rem 0.875rem;
|
|
674
|
+
background: var(--fail-soft);
|
|
675
|
+
color: var(--fail);
|
|
676
|
+
border-radius: var(--radius-sm);
|
|
677
|
+
font-family: 'JetBrains Mono', monospace;
|
|
678
|
+
font-size: 0.75rem;
|
|
679
|
+
line-height: 1.6;
|
|
680
|
+
white-space: pre-wrap;
|
|
681
|
+
word-break: break-word;
|
|
682
|
+
border-left: 2px solid var(--fail);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.screenshot-wrap {
|
|
686
|
+
margin: 0.5rem 0 0.25rem 1.75rem;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.screenshot-toggle {
|
|
690
|
+
font-size: 0.75rem;
|
|
691
|
+
color: var(--text-muted);
|
|
692
|
+
cursor: pointer;
|
|
693
|
+
user-select: none;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.screenshot {
|
|
697
|
+
margin-top: 0.5rem;
|
|
698
|
+
max-width: 100%;
|
|
699
|
+
border-radius: var(--radius-sm);
|
|
700
|
+
border: 1px solid var(--border);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/* ── Loading / error ── */
|
|
704
|
+
.loading-state {
|
|
705
|
+
display: flex;
|
|
706
|
+
justify-content: center;
|
|
707
|
+
padding: 4rem 0;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.loading-dots {
|
|
711
|
+
display: flex;
|
|
712
|
+
gap: 6px;
|
|
713
|
+
align-items: center;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.loading-dots span {
|
|
717
|
+
width: 8px;
|
|
718
|
+
height: 8px;
|
|
719
|
+
border-radius: 50%;
|
|
720
|
+
background: var(--accent);
|
|
721
|
+
animation: dotBeat 1.2s ease-in-out infinite;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.loading-dots span:nth-child(2) {
|
|
725
|
+
animation-delay: 0.2s;
|
|
726
|
+
}
|
|
727
|
+
.loading-dots span:nth-child(3) {
|
|
728
|
+
animation-delay: 0.4s;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
@keyframes dotBeat {
|
|
732
|
+
0%,
|
|
733
|
+
100% {
|
|
734
|
+
opacity: 1;
|
|
735
|
+
transform: scale(1);
|
|
736
|
+
}
|
|
737
|
+
50% {
|
|
738
|
+
opacity: 0.3;
|
|
739
|
+
transform: scale(0.6);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.error-state {
|
|
744
|
+
padding: 3rem 0;
|
|
745
|
+
color: var(--fail);
|
|
746
|
+
text-align: center;
|
|
747
|
+
font-size: 0.9375rem;
|
|
748
|
+
}
|
|
749
|
+
</style>
|