@acutis/cli 0.5.1-dev.31 → 0.6.0-dev.33
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/4RAEZKK5.js +1 -0
- package/.output/public/_nuxt/B71L_ar8.js +1 -0
- package/.output/public/_nuxt/{CsAwRnSX.js → B8-AOuPY.js} +1 -1
- package/.output/public/_nuxt/BDJSpxa5.js +1 -0
- package/.output/public/_nuxt/BSTaqC8B.js +1 -0
- package/.output/public/_nuxt/BX0w1sCd.js +64 -0
- package/.output/public/_nuxt/BZkyScXE.js +7 -0
- package/.output/public/_nuxt/Bcy6XGvf.js +1 -0
- package/.output/public/_nuxt/BwUN2VDn.js +28 -0
- package/.output/public/_nuxt/C7ujW0dH.js +1 -0
- package/.output/public/_nuxt/CCTDX4Ow.js +1 -0
- package/.output/public/_nuxt/CGBjV6IE.js +3 -0
- package/.output/public/_nuxt/CJwIJ5vo.js +1 -0
- package/.output/public/_nuxt/CRRnxrgg.js +1 -0
- package/.output/public/_nuxt/CW-iqL9y.js +1 -0
- package/.output/public/_nuxt/CX9rRDYY.js +1 -0
- package/.output/public/_nuxt/Cc9wzr_w.js +1 -0
- package/.output/public/_nuxt/Cfk1Mt0g.js +1 -0
- package/.output/public/_nuxt/Cha4KRz0.js +1 -0
- package/.output/public/_nuxt/D229JSjk.js +1 -0
- package/.output/public/_nuxt/D24Vvzw2.js +1 -0
- package/.output/public/_nuxt/DRoB9fQQ.js +1 -0
- package/.output/public/_nuxt/DZ5wax3g.js +1 -0
- package/.output/public/_nuxt/DZkgJHFm.js +1 -0
- package/.output/public/_nuxt/PIShll5e.js +1 -0
- package/.output/public/_nuxt/_oJUkNQ2.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/522d5fac-12d3-4a5c-b094-a2116ce9fbdd.json +1 -0
- package/.output/public/_nuxt/{entry.BmTN_nlL.css → entry.cOeTFjBb.css} +1 -1
- package/.output/public/_nuxt/jaiNplxU.js +1 -0
- package/.output/public/_nuxt/{Dn-SWUOQ.js → nocvyJKp.js} +1 -1
- package/.output/server/chunks/_/auth2.mjs +2 -2
- package/.output/server/chunks/_/environment.mjs +2 -2
- package/.output/server/chunks/_/execution.mjs +6 -4
- package/.output/server/chunks/_/execution.mjs.map +1 -1
- package/.output/server/chunks/_/generation.mjs +2 -2
- package/.output/server/chunks/_/project.mjs +1 -1
- package/.output/server/chunks/_/project.service.mjs +2 -2
- package/.output/server/chunks/_/scenario2.mjs +88 -6
- package/.output/server/chunks/_/scenario2.mjs.map +1 -1
- package/.output/server/chunks/build/{Alert-CGPbjyet.mjs → Alert-BJf39Ayb.mjs} +1 -1
- package/.output/server/chunks/build/{Alert-CGPbjyet.mjs.map → Alert-BJf39Ayb.mjs.map} +1 -1
- package/.output/server/chunks/build/Badge-BMpCypXw.mjs +394 -0
- package/.output/server/chunks/build/Badge-BMpCypXw.mjs.map +1 -0
- package/.output/server/chunks/build/{Container-Bw8GVIe-.mjs → Container-D0WjluxO.mjs} +1 -1
- package/.output/server/chunks/build/{Container-Bw8GVIe-.mjs.map → Container-D0WjluxO.mjs.map} +1 -1
- package/.output/server/chunks/build/ContextMenu-CC085wXq.mjs +1746 -0
- package/.output/server/chunks/build/ContextMenu-CC085wXq.mjs.map +1 -0
- package/.output/server/chunks/build/{Pagination-BF2ykxf_.mjs → Pagination-DxUglDxC.mjs} +1 -1
- package/.output/server/chunks/build/{Pagination-BF2ykxf_.mjs.map → Pagination-DxUglDxC.mjs.map} +1 -1
- package/.output/server/chunks/build/{_...scenario_-CPwSmhfV.mjs → _...scenario_-mkuUQnXV.mjs} +48 -28
- package/.output/server/chunks/build/_...scenario_-mkuUQnXV.mjs.map +1 -0
- package/.output/server/chunks/build/_run_-CURVtzqt.mjs +649 -0
- package/.output/server/chunks/build/_run_-CURVtzqt.mjs.map +1 -0
- package/.output/server/chunks/build/{_slug_-DjtFCLa7.mjs → _slug_-CCufladN.mjs} +373 -138
- package/.output/server/chunks/build/{_slug_-DjtFCLa7.mjs.map → _slug_-CCufladN.mjs.map} +1 -1
- package/.output/server/chunks/build/error-404-B5fzVPdQ.mjs +1 -1
- package/.output/server/chunks/build/error-500-Be62wrWs.mjs +1 -1
- package/.output/server/chunks/build/{modal-styles.BULzQjZ8.mjs → modal-styles.CLPmxixy.mjs} +3 -3
- package/.output/server/chunks/build/modal-styles.CLPmxixy.mjs.map +1 -0
- package/.output/server/chunks/build/{origin-D49r5-BY.mjs → origin-COKNa406.mjs} +102 -396
- package/.output/server/chunks/build/{origin-D49r5-BY.mjs.map → origin-COKNa406.mjs.map} +1 -1
- package/.output/server/chunks/build/{pages-Dve6n3fN.mjs → pages-BoaPn4t_.mjs} +171 -51
- package/.output/server/chunks/build/{pages-Dve6n3fN.mjs.map → pages-BoaPn4t_.mjs.map} +1 -1
- package/.output/server/chunks/build/plural-DvfNYUEX.mjs +93 -0
- package/.output/server/chunks/build/plural-DvfNYUEX.mjs.map +1 -0
- package/.output/server/chunks/build/report-ISc2vlII.mjs +725 -0
- package/.output/server/chunks/build/report-ISc2vlII.mjs.map +1 -0
- package/.output/server/chunks/build/run-stream-Dfh0fAdN.mjs +198 -0
- package/.output/server/chunks/build/run-stream-Dfh0fAdN.mjs.map +1 -0
- package/.output/server/chunks/build/{tags-CU5wN20i.mjs → tags-BiGI0PZP.mjs} +16 -299
- package/.output/server/chunks/build/tags-BiGI0PZP.mjs.map +1 -0
- package/.output/server/chunks/build/{telemetria-CU1QSpLB.mjs → telemetria-CXZfYngH.mjs} +3 -3
- package/.output/server/chunks/build/{telemetria-CU1QSpLB.mjs.map → telemetria-CXZfYngH.mjs.map} +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +227 -148
- package/.output/server/chunks/routes/api/projects/_slug/run-stream.get.mjs +5 -1
- package/.output/server/chunks/routes/api/projects/_slug/run-stream.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/_slug/runs.get.mjs +79 -0
- package/.output/server/chunks/routes/api/projects/_slug/runs.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/telemetry/report.post.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +3 -3
- package/.output/server/chunks/routes/ws.mjs +1 -1
- package/.output/server/chunks/virtual/entry.mjs +9336 -8497
- package/.output/server/chunks/virtual/entry.mjs.map +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/chunks/virtual/styles.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/2nD-p2HC.js +0 -1
- package/.output/public/_nuxt/B9s6bjC6.js +0 -1
- package/.output/public/_nuxt/BNt3M20G.js +0 -3
- package/.output/public/_nuxt/BVORrxe1.js +0 -1
- package/.output/public/_nuxt/BWJi3RB7.js +0 -7
- package/.output/public/_nuxt/BZKoKeJ4.js +0 -1
- package/.output/public/_nuxt/BdD531YY.js +0 -1
- package/.output/public/_nuxt/Bim2Ilco.js +0 -1
- package/.output/public/_nuxt/BormXq2m.js +0 -1
- package/.output/public/_nuxt/Bv4T7S6_.js +0 -1
- package/.output/public/_nuxt/BwcOmYtM.js +0 -1
- package/.output/public/_nuxt/CJJvNaNU.js +0 -1
- package/.output/public/_nuxt/Dq_3AVr2.js +0 -1
- package/.output/public/_nuxt/builds/meta/5edd57d4-09ec-4816-9ce0-37d246a982cc.json +0 -1
- package/.output/public/_nuxt/jEu0WM6o.js +0 -28
- package/.output/public/_nuxt/x-Ln6s2E.js +0 -64
- package/.output/server/chunks/build/_...scenario_-CPwSmhfV.mjs.map +0 -1
- package/.output/server/chunks/build/modal-styles.BULzQjZ8.mjs.map +0 -1
- package/.output/server/chunks/build/tags-CU5wN20i.mjs.map +0 -1
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import { f as useRoute, g as useFetch, i as icon_default, h as _sfc_main$7, N as NuxtLink } from '../virtual/entry.mjs';
|
|
2
|
+
import { _ as _sfc_main } from './Container-D0WjluxO.mjs';
|
|
3
|
+
import { _ as _sfc_main$1 } from './Badge-BMpCypXw.mjs';
|
|
4
|
+
import { e as empty_default, r as reportUrlFor } from './run-stream-Dfh0fAdN.mjs';
|
|
5
|
+
import { p as plural, m as metric_default, c as counted, r as ranking_default } from './plural-DvfNYUEX.mjs';
|
|
6
|
+
import { defineComponent, computed, ref, withAsyncContext, mergeProps, unref, withCtx, createVNode, toDisplayString, createTextVNode, openBlock, createBlock, Fragment, createCommentVNode, renderList, useSSRContext } from 'vue';
|
|
7
|
+
import { ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttrs, ssrRenderAttr } from 'vue/server-renderer';
|
|
8
|
+
import 'unhead/plugins';
|
|
9
|
+
import 'unhead/utils';
|
|
10
|
+
import '../routes/renderer.mjs';
|
|
11
|
+
import '../nitro/nitro.mjs';
|
|
12
|
+
import 'node:http';
|
|
13
|
+
import 'node:https';
|
|
14
|
+
import 'node:crypto';
|
|
15
|
+
import 'stream';
|
|
16
|
+
import 'events';
|
|
17
|
+
import 'http';
|
|
18
|
+
import 'crypto';
|
|
19
|
+
import 'buffer';
|
|
20
|
+
import 'zlib';
|
|
21
|
+
import 'https';
|
|
22
|
+
import 'net';
|
|
23
|
+
import 'tls';
|
|
24
|
+
import 'url';
|
|
25
|
+
import 'node:events';
|
|
26
|
+
import 'node:buffer';
|
|
27
|
+
import 'node:fs';
|
|
28
|
+
import 'node:path';
|
|
29
|
+
import 'node:dns/promises';
|
|
30
|
+
import 'node:net';
|
|
31
|
+
import 'playwright';
|
|
32
|
+
import 'zod';
|
|
33
|
+
import 'node:url';
|
|
34
|
+
import 'node:fs/promises';
|
|
35
|
+
import 'node:async_hooks';
|
|
36
|
+
import 'node:os';
|
|
37
|
+
import 'typeorm';
|
|
38
|
+
import '@langchain/langgraph';
|
|
39
|
+
import '@anthropic-ai/claude-agent-sdk';
|
|
40
|
+
import 'langchain';
|
|
41
|
+
import '@iconify/utils';
|
|
42
|
+
import 'consola';
|
|
43
|
+
import 'unhead/server';
|
|
44
|
+
import 'unhead/legacy';
|
|
45
|
+
import 'nostics';
|
|
46
|
+
import 'vue-bundle-renderer/runtime';
|
|
47
|
+
import 'devalue';
|
|
48
|
+
import 'fnv1a-64';
|
|
49
|
+
import 'object-identity';
|
|
50
|
+
import 'tailwindcss/colors';
|
|
51
|
+
|
|
52
|
+
//#region app/components/project/report/donut.vue?vue&type=script&setup=true&lang.ts
|
|
53
|
+
var RADIUS = 15.9155;
|
|
54
|
+
var donut_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
55
|
+
__name: "donut",
|
|
56
|
+
__ssrInlineRender: true,
|
|
57
|
+
props: {
|
|
58
|
+
title: {},
|
|
59
|
+
slices: {},
|
|
60
|
+
palette: { default: "tempo" },
|
|
61
|
+
center: { default: "" },
|
|
62
|
+
centerLabel: { default: "" },
|
|
63
|
+
format: {
|
|
64
|
+
type: Function,
|
|
65
|
+
default: (value) => `${value}`
|
|
66
|
+
},
|
|
67
|
+
testid: {}
|
|
68
|
+
},
|
|
69
|
+
setup(__props) {
|
|
70
|
+
/** Classe escrita por extenso: montada em runtime, o Tailwind não a enxerga e a fatia sai cinza. */
|
|
71
|
+
const PALETTES = {
|
|
72
|
+
tempo: [
|
|
73
|
+
{
|
|
74
|
+
ring: "stroke-primary",
|
|
75
|
+
dot: "bg-primary"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
ring: "stroke-primary/70",
|
|
79
|
+
dot: "bg-primary/70"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
ring: "stroke-primary/50",
|
|
83
|
+
dot: "bg-primary/50"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
ring: "stroke-primary/35",
|
|
87
|
+
dot: "bg-primary/35"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
ring: "stroke-primary/20",
|
|
91
|
+
dot: "bg-primary/20"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
resultado: [{
|
|
95
|
+
ring: "stroke-success",
|
|
96
|
+
dot: "bg-success"
|
|
97
|
+
}, {
|
|
98
|
+
ring: "stroke-error",
|
|
99
|
+
dot: "bg-error"
|
|
100
|
+
}]
|
|
101
|
+
};
|
|
102
|
+
const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
|
|
103
|
+
const total = computed(() => __props.slices.reduce((sum, slice) => sum + slice.value, 0));
|
|
104
|
+
/** Cada anel começa onde o anterior parou, girando no sentido do relógio a partir do topo. */
|
|
105
|
+
const rings = computed(() => {
|
|
106
|
+
let offset = 0;
|
|
107
|
+
return __props.slices.map((slice, index) => {
|
|
108
|
+
const share = total.value === 0 ? 0 : slice.value / total.value;
|
|
109
|
+
const tones = PALETTES[__props.palette];
|
|
110
|
+
const ring = {
|
|
111
|
+
...slice,
|
|
112
|
+
share,
|
|
113
|
+
tone: tones[index % tones.length],
|
|
114
|
+
dash: `${share * CIRCUMFERENCE} ${CIRCUMFERENCE}`,
|
|
115
|
+
offset: -offset * CIRCUMFERENCE
|
|
116
|
+
};
|
|
117
|
+
offset += share;
|
|
118
|
+
return ring;
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
function percent(share) {
|
|
122
|
+
return `${(share * 100).toLocaleString("pt-BR", { maximumFractionDigits: 1 })}%`;
|
|
123
|
+
}
|
|
124
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
125
|
+
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
126
|
+
class: "rounded-lg bg-elevated p-4",
|
|
127
|
+
"data-testid": __props.testid
|
|
128
|
+
}, _attrs))}><p class="mb-3 text-sm font-semibold">${ssrInterpolate(__props.title)}</p><div class="flex flex-wrap items-center gap-5"><div class="relative size-36 shrink-0"><svg viewBox="0 0 40 40" class="size-full -rotate-90" role="img"${ssrRenderAttr("aria-label", __props.title)}><circle cx="20" cy="20"${ssrRenderAttr("r", RADIUS)} fill="none" class="stroke-accented" stroke-width="6"></circle><!--[-->`);
|
|
129
|
+
ssrRenderList(unref(rings), (ring) => {
|
|
130
|
+
_push(`<circle cx="20" cy="20"${ssrRenderAttr("r", RADIUS)} fill="none" class="${ssrRenderClass(ring.tone.ring)}" stroke-width="6"${ssrRenderAttr("stroke-dasharray", ring.dash)}${ssrRenderAttr("stroke-dashoffset", ring.offset)}></circle>`);
|
|
131
|
+
});
|
|
132
|
+
_push(`<!--]--></svg>`);
|
|
133
|
+
if (__props.center) {
|
|
134
|
+
_push(`<div class="absolute inset-0 flex flex-col items-center justify-center"><span class="text-xl font-semibold tabular-nums">${ssrInterpolate(__props.center)}</span>`);
|
|
135
|
+
if (__props.centerLabel) _push(`<span class="text-xs text-dimmed">${ssrInterpolate(__props.centerLabel)}</span>`);
|
|
136
|
+
else _push(`<!---->`);
|
|
137
|
+
_push(`</div>`);
|
|
138
|
+
} else _push(`<!---->`);
|
|
139
|
+
_push(`</div><ul class="flex min-w-0 grow flex-col gap-1.5 text-sm"><!--[-->`);
|
|
140
|
+
ssrRenderList(unref(rings), (ring) => {
|
|
141
|
+
_push(`<li class="flex items-center gap-2"><span class="${ssrRenderClass([ring.tone.dot, "size-2.5 shrink-0 rounded-xs"])}"></span><span class="min-w-0 grow truncate">${ssrInterpolate(ring.label)}</span><span class="shrink-0 text-muted tabular-nums">${ssrInterpolate(__props.format(ring.value))} · ${ssrInterpolate(percent(ring.share))}</span></li>`);
|
|
142
|
+
});
|
|
143
|
+
_push(`<!--]--></ul></div></div>`);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region app/components/project/report/donut.vue
|
|
149
|
+
var _sfc_setup$1 = donut_vue_vue_type_script_setup_true_lang_default.setup;
|
|
150
|
+
donut_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
151
|
+
const ssrContext = useSSRContext();
|
|
152
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/project/report/donut.vue");
|
|
153
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
154
|
+
};
|
|
155
|
+
var donut_default = Object.assign(donut_vue_vue_type_script_setup_true_lang_default, { __name: "ProjectReportDonut" });
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region app/pages/projects/[projectSlug]/report/[run].vue?vue&type=script&setup=true&lang.ts
|
|
158
|
+
/** O que mudou de uma rodada para a outra: quem quebrou, quem voltou, quem entrou e quem saiu. */
|
|
159
|
+
var _run__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
160
|
+
__name: "[run]",
|
|
161
|
+
__ssrInlineRender: true,
|
|
162
|
+
async setup(__props) {
|
|
163
|
+
let __temp, __restore;
|
|
164
|
+
const route = useRoute();
|
|
165
|
+
const slug = computed(() => route.params.projectSlug);
|
|
166
|
+
const startedAt = computed(() => Number(route.params.run));
|
|
167
|
+
const hydrated = ref(false);
|
|
168
|
+
const { data: project } = ([__temp, __restore] = withAsyncContext(() => useFetch(`/api/projects/${slug.value}`, "$jiF6Gu6Rr4")), __temp = await __temp, __restore(), __temp);
|
|
169
|
+
const { data } = ([__temp, __restore] = withAsyncContext(() => useFetch(`/api/projects/${slug.value}/runs`, "$HOuP5kXhgi")), __temp = await __temp, __restore(), __temp);
|
|
170
|
+
const runs = computed(() => data.value?.runs ?? []);
|
|
171
|
+
const index = computed(() => runs.value.findIndex((run) => Date.parse(run.started_at) === startedAt.value));
|
|
172
|
+
const run = computed(() => runs.value[index.value]);
|
|
173
|
+
/** A rodada seguinte na lista é a anterior no tempo: é com ela que esta se compara. */
|
|
174
|
+
const previous = computed(() => index.value === -1 ? void 0 : runs.value[index.value + 1]);
|
|
175
|
+
const isLatest = computed(() => index.value === 0);
|
|
176
|
+
function seconds(ms) {
|
|
177
|
+
return `${(ms / 1e3).toLocaleString("pt-BR", { maximumFractionDigits: 1 })}s`;
|
|
178
|
+
}
|
|
179
|
+
function percent(part, total) {
|
|
180
|
+
return `${(total === 0 ? 0 : part / total * 100).toLocaleString("pt-BR", { maximumFractionDigits: 1 })}%`;
|
|
181
|
+
}
|
|
182
|
+
const when = computed(() => new Date(run.value.started_at).toLocaleString("pt-BR", {
|
|
183
|
+
dateStyle: "short",
|
|
184
|
+
timeStyle: "short"
|
|
185
|
+
}));
|
|
186
|
+
const broken = computed(() => run.value.tests.filter((test) => !test.passed));
|
|
187
|
+
/** Do que levou mais tempo para o que levou menos: é assim que se acha onde a rodada demorou. */
|
|
188
|
+
const byDuration = computed(() => [...run.value.tests].sort((a, b) => b.duration_ms - a.duration_ms));
|
|
189
|
+
const slowest = computed(() => byDuration.value[0]);
|
|
190
|
+
const share = computed(() => byDuration.value.map((test) => ({
|
|
191
|
+
label: test.title,
|
|
192
|
+
value: test.duration_ms,
|
|
193
|
+
display: `${seconds(test.duration_ms)} · ${percent(test.duration_ms, run.value.duration_ms)}`
|
|
194
|
+
})));
|
|
195
|
+
const results = computed(() => [{
|
|
196
|
+
label: "Passaram",
|
|
197
|
+
value: run.value.totals.passed
|
|
198
|
+
}, {
|
|
199
|
+
label: "Falharam",
|
|
200
|
+
value: run.value.totals.failed
|
|
201
|
+
}]);
|
|
202
|
+
/** Quatro cenários nomeados e o resto somado: mais fatias que isso viram confete. */
|
|
203
|
+
const timeSlices = computed(() => {
|
|
204
|
+
const top = byDuration.value.slice(0, 4).map((test) => ({
|
|
205
|
+
label: test.title,
|
|
206
|
+
value: test.duration_ms
|
|
207
|
+
}));
|
|
208
|
+
const rest = byDuration.value.slice(4);
|
|
209
|
+
if (rest.length === 0) return top;
|
|
210
|
+
return [...top, {
|
|
211
|
+
label: `${plural(rest.length, "outro", "outros")} ${rest.length} ${plural(rest.length, "cenário", "cenários")}`,
|
|
212
|
+
value: rest.reduce((total, test) => total + test.duration_ms, 0)
|
|
213
|
+
}];
|
|
214
|
+
});
|
|
215
|
+
function runLink(test) {
|
|
216
|
+
return `/projects/${slug.value}/scenarios/${test.id}?tab=execucoes&run=${encodeURIComponent(run.value.started_at)}`;
|
|
217
|
+
}
|
|
218
|
+
const changes = computed(() => {
|
|
219
|
+
const before = previous.value;
|
|
220
|
+
if (!before) return [];
|
|
221
|
+
const previousOf = new Map(before.tests.map((test) => [test.id, test]));
|
|
222
|
+
const currentOf = new Map(run.value.tests.map((test) => [test.id, test]));
|
|
223
|
+
const moved = run.value.tests.flatMap((test) => {
|
|
224
|
+
const was = previousOf.get(test.id);
|
|
225
|
+
if (!was) return [{
|
|
226
|
+
title: test.title,
|
|
227
|
+
kind: "novo"
|
|
228
|
+
}];
|
|
229
|
+
if (was.passed === test.passed) return [];
|
|
230
|
+
return [{
|
|
231
|
+
title: test.title,
|
|
232
|
+
kind: test.passed ? "voltou" : "quebrou"
|
|
233
|
+
}];
|
|
234
|
+
});
|
|
235
|
+
const gone = before.tests.filter((test) => !currentOf.has(test.id)).map((test) => ({
|
|
236
|
+
title: test.title,
|
|
237
|
+
kind: "saiu"
|
|
238
|
+
}));
|
|
239
|
+
return [...moved, ...gone];
|
|
240
|
+
});
|
|
241
|
+
const changeLabel = {
|
|
242
|
+
quebrou: "passava e quebrou",
|
|
243
|
+
voltou: "falhava e voltou a passar",
|
|
244
|
+
novo: "não estava na rodada anterior",
|
|
245
|
+
saiu: "ficou de fora desta rodada"
|
|
246
|
+
};
|
|
247
|
+
const changeTone = {
|
|
248
|
+
quebrou: "text-error",
|
|
249
|
+
voltou: "text-success",
|
|
250
|
+
novo: "text-muted",
|
|
251
|
+
saiu: "text-muted"
|
|
252
|
+
};
|
|
253
|
+
const durationDelta = computed(() => previous.value ? run.value.duration_ms - previous.value.duration_ms : null);
|
|
254
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
255
|
+
const _component_UContainer = _sfc_main;
|
|
256
|
+
const _component_BaseButtonIcon = icon_default;
|
|
257
|
+
const _component_BaseEmpty = empty_default;
|
|
258
|
+
const _component_UBadge = _sfc_main$1;
|
|
259
|
+
const _component_UTooltip = _sfc_main$7;
|
|
260
|
+
const _component_ProjectReportMetric = metric_default;
|
|
261
|
+
const _component_NuxtLink = NuxtLink;
|
|
262
|
+
const _component_ProjectReportDonut = donut_default;
|
|
263
|
+
const _component_ProjectReportRanking = ranking_default;
|
|
264
|
+
_push(ssrRenderComponent(_component_UContainer, mergeProps({
|
|
265
|
+
"data-hydrated": unref(hydrated),
|
|
266
|
+
class: "py-6 lg:py-10"
|
|
267
|
+
}, _attrs), {
|
|
268
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
269
|
+
if (_push) {
|
|
270
|
+
_push(`<div class="flex items-center gap-2"${_scopeId}>`);
|
|
271
|
+
_push(ssrRenderComponent(_component_BaseButtonIcon, {
|
|
272
|
+
icon: "i-ic-round-arrow-back",
|
|
273
|
+
label: "Voltar ao relatório",
|
|
274
|
+
color: "neutral",
|
|
275
|
+
variant: "ghost",
|
|
276
|
+
to: `/projects/${unref(slug)}/report`,
|
|
277
|
+
"data-testid": "execucao-voltar"
|
|
278
|
+
}, null, _parent, _scopeId));
|
|
279
|
+
_push(`<h1 class="truncate text-2xl font-bold" data-testid="execucao-titulo"${_scopeId}>`);
|
|
280
|
+
if (unref(run)) _push(`<!--[--> Execução de ${ssrInterpolate(unref(when))}<!--]-->`);
|
|
281
|
+
else _push(`<!--[--> Execução <!--]-->`);
|
|
282
|
+
_push(`</h1></div>`);
|
|
283
|
+
if (!unref(run)) _push(ssrRenderComponent(_component_BaseEmpty, {
|
|
284
|
+
class: "mt-10",
|
|
285
|
+
icon: "i-ic-round-history-toggle-off",
|
|
286
|
+
title: "Esta execução não está mais guardada",
|
|
287
|
+
description: "O histórico do projeto guarda as 50 rodadas mais recentes. Volte ao relatório para ver as que ainda estão lá.",
|
|
288
|
+
testid: "execucao-inexistente"
|
|
289
|
+
}, null, _parent, _scopeId));
|
|
290
|
+
else {
|
|
291
|
+
_push(`<!--[--><div class="mt-4 flex flex-wrap items-center justify-between gap-3"${_scopeId}><div class="flex flex-wrap items-center gap-3"${_scopeId}>`);
|
|
292
|
+
_push(ssrRenderComponent(_component_UBadge, {
|
|
293
|
+
color: unref(run).passed ? "success" : "error",
|
|
294
|
+
icon: unref(run).passed ? "i-ic-round-check-circle" : "i-ic-round-error",
|
|
295
|
+
label: unref(run).passed ? "Sucesso" : `${unref(run).totals.failed} ${("plural" in _ctx ? _ctx.plural : unref(plural))(unref(run).totals.failed, "falhou", "falharam")}`,
|
|
296
|
+
"data-testid": "execucao-status"
|
|
297
|
+
}, null, _parent, _scopeId));
|
|
298
|
+
_push(`<p class="flex min-w-0 flex-wrap items-center gap-x-1.5 text-muted" data-testid="execucao-contexto"${_scopeId}><span${_scopeId}>${ssrInterpolate(unref(project)?.name)}</span><span${_scopeId}>·</span>`);
|
|
299
|
+
if (unref(run).filter) _push(ssrRenderComponent(_component_UTooltip, {
|
|
300
|
+
"delay-duration": 0,
|
|
301
|
+
text: unref(run).filter
|
|
302
|
+
}, {
|
|
303
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
304
|
+
if (_push) _push(`<span class="underline decoration-dotted underline-offset-4"${_scopeId}> filtro com ${ssrInterpolate(unref(run).totals.tests)} ${ssrInterpolate(("plural" in _ctx ? _ctx.plural : unref(plural))(unref(run).totals.tests, "cenário", "cenários"))}</span>`);
|
|
305
|
+
else return [createVNode("span", { class: "underline decoration-dotted underline-offset-4" }, " filtro com " + toDisplayString(unref(run).totals.tests) + " " + toDisplayString(("plural" in _ctx ? _ctx.plural : unref(plural))(unref(run).totals.tests, "cenário", "cenários")), 1)];
|
|
306
|
+
}),
|
|
307
|
+
_: 1
|
|
308
|
+
}, _parent, _scopeId));
|
|
309
|
+
else _push(`<span${_scopeId}>o projeto inteiro</span>`);
|
|
310
|
+
if (unref(run).branch) _push(`<!--[--><span${_scopeId}>·</span><span${_scopeId}>${ssrInterpolate(unref(run).branch)}</span><!--]-->`);
|
|
311
|
+
else _push(`<!---->`);
|
|
312
|
+
if (unref(run).author) _push(`<!--[--><span${_scopeId}>·</span><span${_scopeId}>${ssrInterpolate(unref(run).author)}</span><!--]-->`);
|
|
313
|
+
else _push(`<!---->`);
|
|
314
|
+
_push(`</p></div>`);
|
|
315
|
+
if (unref(isLatest)) _push(ssrRenderComponent(_component_BaseButtonIcon, {
|
|
316
|
+
icon: "i-ic-round-assessment",
|
|
317
|
+
label: "Abrir o relatório do Playwright, com vídeo e trace. Ele guarda só a execução mais recente, que é esta.",
|
|
318
|
+
color: "neutral",
|
|
319
|
+
variant: "soft",
|
|
320
|
+
to: unref(reportUrlFor)(unref(slug)),
|
|
321
|
+
target: "_blank",
|
|
322
|
+
external: "",
|
|
323
|
+
"data-testid": "execucao-playwright"
|
|
324
|
+
}, null, _parent, _scopeId));
|
|
325
|
+
else _push(`<!---->`);
|
|
326
|
+
_push(`</div><div class="mt-6 grid grid-cols-2 gap-3 lg:grid-cols-5"${_scopeId}>`);
|
|
327
|
+
_push(ssrRenderComponent(_component_ProjectReportMetric, {
|
|
328
|
+
name: "cenarios",
|
|
329
|
+
label: "Cenários",
|
|
330
|
+
value: `${unref(run).totals.passed}/${unref(run).totals.tests}`,
|
|
331
|
+
tone: unref(run).passed ? "success" : "error",
|
|
332
|
+
hint: ("counted" in _ctx ? _ctx.counted : unref(counted))(unref(run).totals.failed, "falhou", "falharam", "nenhum falhou")
|
|
333
|
+
}, null, _parent, _scopeId));
|
|
334
|
+
_push(ssrRenderComponent(_component_ProjectReportMetric, {
|
|
335
|
+
name: "sucesso",
|
|
336
|
+
label: "Sucesso",
|
|
337
|
+
value: percent(unref(run).totals.passed, unref(run).totals.tests)
|
|
338
|
+
}, null, _parent, _scopeId));
|
|
339
|
+
_push(ssrRenderComponent(_component_ProjectReportMetric, {
|
|
340
|
+
name: "duracao",
|
|
341
|
+
label: "Duração",
|
|
342
|
+
value: seconds(unref(run).duration_ms),
|
|
343
|
+
hint: unref(durationDelta) === null ? "sem rodada anterior para comparar" : `${unref(durationDelta) >= 0 ? "+" : "-"}${seconds(Math.abs(unref(durationDelta)))} contra a anterior`
|
|
344
|
+
}, null, _parent, _scopeId));
|
|
345
|
+
_push(ssrRenderComponent(_component_ProjectReportMetric, {
|
|
346
|
+
name: "steps",
|
|
347
|
+
label: "Steps",
|
|
348
|
+
value: `${unref(run).totals.steps}`,
|
|
349
|
+
hint: `${(unref(run).totals.steps / Math.max(unref(run).totals.tests, 1)).toLocaleString("pt-BR", { maximumFractionDigits: 1 })} por cenário`
|
|
350
|
+
}, null, _parent, _scopeId));
|
|
351
|
+
_push(ssrRenderComponent(_component_ProjectReportMetric, {
|
|
352
|
+
name: "mais-lento",
|
|
353
|
+
label: "Mais lento",
|
|
354
|
+
value: unref(slowest) ? seconds(unref(slowest).duration_ms) : "—",
|
|
355
|
+
hint: unref(slowest)?.title ?? ""
|
|
356
|
+
}, null, _parent, _scopeId));
|
|
357
|
+
_push(`</div>`);
|
|
358
|
+
if (unref(broken).length) {
|
|
359
|
+
_push(`<section class="mt-4 rounded-lg bg-elevated p-4"${_scopeId}><p class="mb-3 text-sm font-semibold"${_scopeId}> O que quebrou </p><ul class="flex flex-col gap-2"${_scopeId}><!--[-->`);
|
|
360
|
+
ssrRenderList(unref(broken), (test) => {
|
|
361
|
+
_push(`<li class="flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 border-b border-default pb-2 last:border-0 last:pb-0" data-testid="execucao-quebrou"${_scopeId}><span${_scopeId}>${ssrInterpolate(test.title)} <span class="text-muted"${_scopeId}> · ${ssrInterpolate(test.failed_step ?? "sem passo reportado")}</span></span>`);
|
|
362
|
+
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
363
|
+
to: runLink(test),
|
|
364
|
+
class: "shrink-0 text-primary hover:underline"
|
|
365
|
+
}, {
|
|
366
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
367
|
+
if (_push) _push(` Ver o erro e o vídeo → `);
|
|
368
|
+
else return [createTextVNode(" Ver o erro e o vídeo → ")];
|
|
369
|
+
}),
|
|
370
|
+
_: 2
|
|
371
|
+
}, _parent, _scopeId));
|
|
372
|
+
_push(`</li>`);
|
|
373
|
+
});
|
|
374
|
+
_push(`<!--]--></ul></section>`);
|
|
375
|
+
} else _push(`<!---->`);
|
|
376
|
+
_push(`<div class="mt-4 grid gap-3 lg:grid-cols-2"${_scopeId}>`);
|
|
377
|
+
_push(ssrRenderComponent(_component_ProjectReportDonut, {
|
|
378
|
+
title: "Resultado dos cenários",
|
|
379
|
+
slices: unref(results),
|
|
380
|
+
palette: "resultado",
|
|
381
|
+
center: percent(unref(run).totals.passed, unref(run).totals.tests),
|
|
382
|
+
"center-label": "passaram",
|
|
383
|
+
testid: "execucao-donut-resultado"
|
|
384
|
+
}, null, _parent, _scopeId));
|
|
385
|
+
_push(ssrRenderComponent(_component_ProjectReportDonut, {
|
|
386
|
+
title: "Onde o tempo foi gasto",
|
|
387
|
+
slices: unref(timeSlices),
|
|
388
|
+
center: seconds(unref(run).duration_ms),
|
|
389
|
+
"center-label": "no total",
|
|
390
|
+
format: seconds,
|
|
391
|
+
testid: "execucao-donut-tempo"
|
|
392
|
+
}, null, _parent, _scopeId));
|
|
393
|
+
_push(ssrRenderComponent(_component_ProjectReportRanking, {
|
|
394
|
+
title: "Duração por cenário",
|
|
395
|
+
empty: "Nenhum cenário rodou.",
|
|
396
|
+
items: unref(share),
|
|
397
|
+
testid: "execucao-tempo"
|
|
398
|
+
}, null, _parent, _scopeId));
|
|
399
|
+
_push(`<div class="rounded-lg bg-elevated p-4" data-testid="execucao-comparacao"${_scopeId}><p class="mb-3 text-sm font-semibold"${_scopeId}> Contra a rodada anterior </p>`);
|
|
400
|
+
if (!unref(previous)) _push(`<p class="text-sm text-dimmed"${_scopeId}> Esta é a rodada mais antiga que o histórico guarda. </p>`);
|
|
401
|
+
else {
|
|
402
|
+
_push(`<!--[--><p class="mb-3 text-sm text-muted tabular-nums"${_scopeId}>${ssrInterpolate(unref(durationDelta) !== null && unref(durationDelta) >= 0 ? "Levou" : "Economizou")} ${ssrInterpolate(seconds(Math.abs(unref(durationDelta) ?? 0)))} ${ssrInterpolate(unref(durationDelta) !== null && unref(durationDelta) >= 0 ? "a mais" : "a menos")} que a de ${ssrInterpolate(new Date(unref(previous).started_at).toLocaleString("pt-BR", {
|
|
403
|
+
dateStyle: "short",
|
|
404
|
+
timeStyle: "short"
|
|
405
|
+
}))}, que levou ${ssrInterpolate(seconds(unref(previous).duration_ms))}. </p>`);
|
|
406
|
+
if (unref(changes).length === 0) _push(`<p class="text-sm text-dimmed"${_scopeId}> Mesmos cenários, mesmos resultados. </p>`);
|
|
407
|
+
else {
|
|
408
|
+
_push(`<ul class="flex flex-col gap-2 text-sm"${_scopeId}><!--[-->`);
|
|
409
|
+
ssrRenderList(unref(changes), (change) => {
|
|
410
|
+
_push(`<li class="flex flex-wrap items-baseline gap-x-2"${_scopeId}><span class="truncate"${_scopeId}>${ssrInterpolate(change.title)}</span><span class="${ssrRenderClass(changeTone[change.kind])}"${_scopeId}>${ssrInterpolate(changeLabel[change.kind])}</span></li>`);
|
|
411
|
+
});
|
|
412
|
+
_push(`<!--]--></ul>`);
|
|
413
|
+
}
|
|
414
|
+
_push(`<!--]-->`);
|
|
415
|
+
}
|
|
416
|
+
_push(`</div></div><h2 class="mt-10 mb-3 text-lg font-semibold"${_scopeId}> Cenários da rodada </h2><div class="overflow-x-auto rounded-lg bg-elevated px-4 py-3"${_scopeId}><table class="w-full text-sm"${_scopeId}><thead class="text-xs uppercase tracking-wide text-dimmed"${_scopeId}><tr${_scopeId}><th class="py-1 text-left font-normal"${_scopeId}> Cenário </th><th class="py-1 text-center font-normal"${_scopeId}> Status </th><th class="py-1 px-3 text-center font-normal"${_scopeId}> Steps </th><th class="py-1 px-3 text-center font-normal"${_scopeId}> Duração </th><th class="py-1 px-3 text-center font-normal"${_scopeId}> Fatia do tempo </th><th class="py-1 pl-4 text-center font-normal"${_scopeId}> Passo que quebrou </th></tr></thead><tbody${_scopeId}><!--[-->`);
|
|
417
|
+
ssrRenderList(unref(byDuration), (test) => {
|
|
418
|
+
_push(`<tr class="border-t border-default" data-testid="execucao-teste"${_scopeId}><td class="py-2 pr-3"${_scopeId}>${ssrInterpolate(test.title)}</td><td class="py-2 pr-3 text-center"${_scopeId}>`);
|
|
419
|
+
_push(ssrRenderComponent(_component_UBadge, {
|
|
420
|
+
size: "sm",
|
|
421
|
+
variant: "solid",
|
|
422
|
+
color: test.passed ? "success" : "error",
|
|
423
|
+
label: test.passed ? "Passou" : "Falhou"
|
|
424
|
+
}, null, _parent, _scopeId));
|
|
425
|
+
_push(`</td><td class="py-2 px-3 text-center tabular-nums"${_scopeId}>${ssrInterpolate(test.steps)}</td><td class="py-2 px-3 text-center tabular-nums"${_scopeId}>${ssrInterpolate(seconds(test.duration_ms))}</td><td class="py-2 px-3 text-center tabular-nums"${_scopeId}>${ssrInterpolate(percent(test.duration_ms, unref(run).duration_ms))}</td><td class="py-2 pl-4 text-center"${_scopeId}>`);
|
|
426
|
+
if (!test.passed) _push(ssrRenderComponent(_component_NuxtLink, {
|
|
427
|
+
to: runLink(test),
|
|
428
|
+
class: "text-primary hover:underline",
|
|
429
|
+
"data-testid": "execucao-teste-link"
|
|
430
|
+
}, {
|
|
431
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
432
|
+
if (_push) _push(`${ssrInterpolate(test.failed_step ?? "Ver a execução")} → `);
|
|
433
|
+
else return [createTextVNode(toDisplayString(test.failed_step ?? "Ver a execução") + " → ", 1)];
|
|
434
|
+
}),
|
|
435
|
+
_: 2
|
|
436
|
+
}, _parent, _scopeId));
|
|
437
|
+
else _push(`<span class="text-dimmed"${_scopeId}>—</span>`);
|
|
438
|
+
_push(`</td></tr>`);
|
|
439
|
+
});
|
|
440
|
+
_push(`<!--]--></tbody></table></div><!--]-->`);
|
|
441
|
+
}
|
|
442
|
+
} else return [createVNode("div", { class: "flex items-center gap-2" }, [createVNode(_component_BaseButtonIcon, {
|
|
443
|
+
icon: "i-ic-round-arrow-back",
|
|
444
|
+
label: "Voltar ao relatório",
|
|
445
|
+
color: "neutral",
|
|
446
|
+
variant: "ghost",
|
|
447
|
+
to: `/projects/${unref(slug)}/report`,
|
|
448
|
+
"data-testid": "execucao-voltar"
|
|
449
|
+
}, null, 8, ["to"]), createVNode("h1", {
|
|
450
|
+
class: "truncate text-2xl font-bold",
|
|
451
|
+
"data-testid": "execucao-titulo"
|
|
452
|
+
}, [unref(run) ? (openBlock(), createBlock(Fragment, { key: 0 }, [createTextVNode(" Execução de " + toDisplayString(unref(when)), 1)], 64)) : (openBlock(), createBlock(Fragment, { key: 1 }, [createTextVNode(" Execução ")], 64))])]), !unref(run) ? (openBlock(), createBlock(_component_BaseEmpty, {
|
|
453
|
+
key: 0,
|
|
454
|
+
class: "mt-10",
|
|
455
|
+
icon: "i-ic-round-history-toggle-off",
|
|
456
|
+
title: "Esta execução não está mais guardada",
|
|
457
|
+
description: "O histórico do projeto guarda as 50 rodadas mais recentes. Volte ao relatório para ver as que ainda estão lá.",
|
|
458
|
+
testid: "execucao-inexistente"
|
|
459
|
+
})) : (openBlock(), createBlock(Fragment, { key: 1 }, [
|
|
460
|
+
createVNode("div", { class: "mt-4 flex flex-wrap items-center justify-between gap-3" }, [createVNode("div", { class: "flex flex-wrap items-center gap-3" }, [createVNode(_component_UBadge, {
|
|
461
|
+
color: unref(run).passed ? "success" : "error",
|
|
462
|
+
icon: unref(run).passed ? "i-ic-round-check-circle" : "i-ic-round-error",
|
|
463
|
+
label: unref(run).passed ? "Sucesso" : `${unref(run).totals.failed} ${("plural" in _ctx ? _ctx.plural : unref(plural))(unref(run).totals.failed, "falhou", "falharam")}`,
|
|
464
|
+
"data-testid": "execucao-status"
|
|
465
|
+
}, null, 8, [
|
|
466
|
+
"color",
|
|
467
|
+
"icon",
|
|
468
|
+
"label"
|
|
469
|
+
]), createVNode("p", {
|
|
470
|
+
class: "flex min-w-0 flex-wrap items-center gap-x-1.5 text-muted",
|
|
471
|
+
"data-testid": "execucao-contexto"
|
|
472
|
+
}, [
|
|
473
|
+
createVNode("span", null, toDisplayString(unref(project)?.name), 1),
|
|
474
|
+
createVNode("span", null, "·"),
|
|
475
|
+
unref(run).filter ? (openBlock(), createBlock(_component_UTooltip, {
|
|
476
|
+
key: 0,
|
|
477
|
+
"delay-duration": 0,
|
|
478
|
+
text: unref(run).filter
|
|
479
|
+
}, {
|
|
480
|
+
default: withCtx(() => [createVNode("span", { class: "underline decoration-dotted underline-offset-4" }, " filtro com " + toDisplayString(unref(run).totals.tests) + " " + toDisplayString(("plural" in _ctx ? _ctx.plural : unref(plural))(unref(run).totals.tests, "cenário", "cenários")), 1)]),
|
|
481
|
+
_: 1
|
|
482
|
+
}, 8, ["text"])) : (openBlock(), createBlock("span", { key: 1 }, "o projeto inteiro")),
|
|
483
|
+
unref(run).branch ? (openBlock(), createBlock(Fragment, { key: 2 }, [createVNode("span", null, "·"), createVNode("span", null, toDisplayString(unref(run).branch), 1)], 64)) : createCommentVNode("", true),
|
|
484
|
+
unref(run).author ? (openBlock(), createBlock(Fragment, { key: 3 }, [createVNode("span", null, "·"), createVNode("span", null, toDisplayString(unref(run).author), 1)], 64)) : createCommentVNode("", true)
|
|
485
|
+
])]), unref(isLatest) ? (openBlock(), createBlock(_component_BaseButtonIcon, {
|
|
486
|
+
key: 0,
|
|
487
|
+
icon: "i-ic-round-assessment",
|
|
488
|
+
label: "Abrir o relatório do Playwright, com vídeo e trace. Ele guarda só a execução mais recente, que é esta.",
|
|
489
|
+
color: "neutral",
|
|
490
|
+
variant: "soft",
|
|
491
|
+
to: unref(reportUrlFor)(unref(slug)),
|
|
492
|
+
target: "_blank",
|
|
493
|
+
external: "",
|
|
494
|
+
"data-testid": "execucao-playwright"
|
|
495
|
+
}, null, 8, ["to"])) : createCommentVNode("", true)]),
|
|
496
|
+
createVNode("div", { class: "mt-6 grid grid-cols-2 gap-3 lg:grid-cols-5" }, [
|
|
497
|
+
createVNode(_component_ProjectReportMetric, {
|
|
498
|
+
name: "cenarios",
|
|
499
|
+
label: "Cenários",
|
|
500
|
+
value: `${unref(run).totals.passed}/${unref(run).totals.tests}`,
|
|
501
|
+
tone: unref(run).passed ? "success" : "error",
|
|
502
|
+
hint: ("counted" in _ctx ? _ctx.counted : unref(counted))(unref(run).totals.failed, "falhou", "falharam", "nenhum falhou")
|
|
503
|
+
}, null, 8, [
|
|
504
|
+
"value",
|
|
505
|
+
"tone",
|
|
506
|
+
"hint"
|
|
507
|
+
]),
|
|
508
|
+
createVNode(_component_ProjectReportMetric, {
|
|
509
|
+
name: "sucesso",
|
|
510
|
+
label: "Sucesso",
|
|
511
|
+
value: percent(unref(run).totals.passed, unref(run).totals.tests)
|
|
512
|
+
}, null, 8, ["value"]),
|
|
513
|
+
createVNode(_component_ProjectReportMetric, {
|
|
514
|
+
name: "duracao",
|
|
515
|
+
label: "Duração",
|
|
516
|
+
value: seconds(unref(run).duration_ms),
|
|
517
|
+
hint: unref(durationDelta) === null ? "sem rodada anterior para comparar" : `${unref(durationDelta) >= 0 ? "+" : "-"}${seconds(Math.abs(unref(durationDelta)))} contra a anterior`
|
|
518
|
+
}, null, 8, ["value", "hint"]),
|
|
519
|
+
createVNode(_component_ProjectReportMetric, {
|
|
520
|
+
name: "steps",
|
|
521
|
+
label: "Steps",
|
|
522
|
+
value: `${unref(run).totals.steps}`,
|
|
523
|
+
hint: `${(unref(run).totals.steps / Math.max(unref(run).totals.tests, 1)).toLocaleString("pt-BR", { maximumFractionDigits: 1 })} por cenário`
|
|
524
|
+
}, null, 8, ["value", "hint"]),
|
|
525
|
+
createVNode(_component_ProjectReportMetric, {
|
|
526
|
+
name: "mais-lento",
|
|
527
|
+
label: "Mais lento",
|
|
528
|
+
value: unref(slowest) ? seconds(unref(slowest).duration_ms) : "—",
|
|
529
|
+
hint: unref(slowest)?.title ?? ""
|
|
530
|
+
}, null, 8, ["value", "hint"])
|
|
531
|
+
]),
|
|
532
|
+
unref(broken).length ? (openBlock(), createBlock("section", {
|
|
533
|
+
key: 0,
|
|
534
|
+
class: "mt-4 rounded-lg bg-elevated p-4"
|
|
535
|
+
}, [createVNode("p", { class: "mb-3 text-sm font-semibold" }, " O que quebrou "), createVNode("ul", { class: "flex flex-col gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(broken), (test) => {
|
|
536
|
+
return openBlock(), createBlock("li", {
|
|
537
|
+
key: test.id,
|
|
538
|
+
class: "flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 border-b border-default pb-2 last:border-0 last:pb-0",
|
|
539
|
+
"data-testid": "execucao-quebrou"
|
|
540
|
+
}, [createVNode("span", null, [createTextVNode(toDisplayString(test.title) + " ", 1), createVNode("span", { class: "text-muted" }, " · " + toDisplayString(test.failed_step ?? "sem passo reportado"), 1)]), createVNode(_component_NuxtLink, {
|
|
541
|
+
to: runLink(test),
|
|
542
|
+
class: "shrink-0 text-primary hover:underline"
|
|
543
|
+
}, {
|
|
544
|
+
default: withCtx(() => [createTextVNode(" Ver o erro e o vídeo → ")]),
|
|
545
|
+
_: 1
|
|
546
|
+
}, 8, ["to"])]);
|
|
547
|
+
}), 128))])])) : createCommentVNode("", true),
|
|
548
|
+
createVNode("div", { class: "mt-4 grid gap-3 lg:grid-cols-2" }, [
|
|
549
|
+
createVNode(_component_ProjectReportDonut, {
|
|
550
|
+
title: "Resultado dos cenários",
|
|
551
|
+
slices: unref(results),
|
|
552
|
+
palette: "resultado",
|
|
553
|
+
center: percent(unref(run).totals.passed, unref(run).totals.tests),
|
|
554
|
+
"center-label": "passaram",
|
|
555
|
+
testid: "execucao-donut-resultado"
|
|
556
|
+
}, null, 8, ["slices", "center"]),
|
|
557
|
+
createVNode(_component_ProjectReportDonut, {
|
|
558
|
+
title: "Onde o tempo foi gasto",
|
|
559
|
+
slices: unref(timeSlices),
|
|
560
|
+
center: seconds(unref(run).duration_ms),
|
|
561
|
+
"center-label": "no total",
|
|
562
|
+
format: seconds,
|
|
563
|
+
testid: "execucao-donut-tempo"
|
|
564
|
+
}, null, 8, ["slices", "center"]),
|
|
565
|
+
createVNode(_component_ProjectReportRanking, {
|
|
566
|
+
title: "Duração por cenário",
|
|
567
|
+
empty: "Nenhum cenário rodou.",
|
|
568
|
+
items: unref(share),
|
|
569
|
+
testid: "execucao-tempo"
|
|
570
|
+
}, null, 8, ["items"]),
|
|
571
|
+
createVNode("div", {
|
|
572
|
+
class: "rounded-lg bg-elevated p-4",
|
|
573
|
+
"data-testid": "execucao-comparacao"
|
|
574
|
+
}, [createVNode("p", { class: "mb-3 text-sm font-semibold" }, " Contra a rodada anterior "), !unref(previous) ? (openBlock(), createBlock("p", {
|
|
575
|
+
key: 0,
|
|
576
|
+
class: "text-sm text-dimmed"
|
|
577
|
+
}, " Esta é a rodada mais antiga que o histórico guarda. ")) : (openBlock(), createBlock(Fragment, { key: 1 }, [createVNode("p", { class: "mb-3 text-sm text-muted tabular-nums" }, toDisplayString(unref(durationDelta) !== null && unref(durationDelta) >= 0 ? "Levou" : "Economizou") + " " + toDisplayString(seconds(Math.abs(unref(durationDelta) ?? 0))) + " " + toDisplayString(unref(durationDelta) !== null && unref(durationDelta) >= 0 ? "a mais" : "a menos") + " que a de " + toDisplayString(new Date(unref(previous).started_at).toLocaleString("pt-BR", {
|
|
578
|
+
dateStyle: "short",
|
|
579
|
+
timeStyle: "short"
|
|
580
|
+
})) + ", que levou " + toDisplayString(seconds(unref(previous).duration_ms)) + ". ", 1), unref(changes).length === 0 ? (openBlock(), createBlock("p", {
|
|
581
|
+
key: 0,
|
|
582
|
+
class: "text-sm text-dimmed"
|
|
583
|
+
}, " Mesmos cenários, mesmos resultados. ")) : (openBlock(), createBlock("ul", {
|
|
584
|
+
key: 1,
|
|
585
|
+
class: "flex flex-col gap-2 text-sm"
|
|
586
|
+
}, [(openBlock(true), createBlock(Fragment, null, renderList(unref(changes), (change) => {
|
|
587
|
+
return openBlock(), createBlock("li", {
|
|
588
|
+
key: `${change.kind}-${change.title}`,
|
|
589
|
+
class: "flex flex-wrap items-baseline gap-x-2"
|
|
590
|
+
}, [createVNode("span", { class: "truncate" }, toDisplayString(change.title), 1), createVNode("span", { class: changeTone[change.kind] }, toDisplayString(changeLabel[change.kind]), 3)]);
|
|
591
|
+
}), 128))]))], 64))])
|
|
592
|
+
]),
|
|
593
|
+
createVNode("h2", { class: "mt-10 mb-3 text-lg font-semibold" }, " Cenários da rodada "),
|
|
594
|
+
createVNode("div", { class: "overflow-x-auto rounded-lg bg-elevated px-4 py-3" }, [createVNode("table", { class: "w-full text-sm" }, [createVNode("thead", { class: "text-xs uppercase tracking-wide text-dimmed" }, [createVNode("tr", null, [
|
|
595
|
+
createVNode("th", { class: "py-1 text-left font-normal" }, " Cenário "),
|
|
596
|
+
createVNode("th", { class: "py-1 text-center font-normal" }, " Status "),
|
|
597
|
+
createVNode("th", { class: "py-1 px-3 text-center font-normal" }, " Steps "),
|
|
598
|
+
createVNode("th", { class: "py-1 px-3 text-center font-normal" }, " Duração "),
|
|
599
|
+
createVNode("th", { class: "py-1 px-3 text-center font-normal" }, " Fatia do tempo "),
|
|
600
|
+
createVNode("th", { class: "py-1 pl-4 text-center font-normal" }, " Passo que quebrou ")
|
|
601
|
+
])]), createVNode("tbody", null, [(openBlock(true), createBlock(Fragment, null, renderList(unref(byDuration), (test) => {
|
|
602
|
+
return openBlock(), createBlock("tr", {
|
|
603
|
+
key: test.id,
|
|
604
|
+
class: "border-t border-default",
|
|
605
|
+
"data-testid": "execucao-teste"
|
|
606
|
+
}, [
|
|
607
|
+
createVNode("td", { class: "py-2 pr-3" }, toDisplayString(test.title), 1),
|
|
608
|
+
createVNode("td", { class: "py-2 pr-3 text-center" }, [createVNode(_component_UBadge, {
|
|
609
|
+
size: "sm",
|
|
610
|
+
variant: "solid",
|
|
611
|
+
color: test.passed ? "success" : "error",
|
|
612
|
+
label: test.passed ? "Passou" : "Falhou"
|
|
613
|
+
}, null, 8, ["color", "label"])]),
|
|
614
|
+
createVNode("td", { class: "py-2 px-3 text-center tabular-nums" }, toDisplayString(test.steps), 1),
|
|
615
|
+
createVNode("td", { class: "py-2 px-3 text-center tabular-nums" }, toDisplayString(seconds(test.duration_ms)), 1),
|
|
616
|
+
createVNode("td", { class: "py-2 px-3 text-center tabular-nums" }, toDisplayString(percent(test.duration_ms, unref(run).duration_ms)), 1),
|
|
617
|
+
createVNode("td", { class: "py-2 pl-4 text-center" }, [!test.passed ? (openBlock(), createBlock(_component_NuxtLink, {
|
|
618
|
+
key: 0,
|
|
619
|
+
to: runLink(test),
|
|
620
|
+
class: "text-primary hover:underline",
|
|
621
|
+
"data-testid": "execucao-teste-link"
|
|
622
|
+
}, {
|
|
623
|
+
default: withCtx(() => [createTextVNode(toDisplayString(test.failed_step ?? "Ver a execução") + " → ", 1)]),
|
|
624
|
+
_: 2
|
|
625
|
+
}, 1032, ["to"])) : (openBlock(), createBlock("span", {
|
|
626
|
+
key: 1,
|
|
627
|
+
class: "text-dimmed"
|
|
628
|
+
}, "—"))])
|
|
629
|
+
]);
|
|
630
|
+
}), 128))])])])
|
|
631
|
+
], 64))];
|
|
632
|
+
}),
|
|
633
|
+
_: 1
|
|
634
|
+
}, _parent));
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region app/pages/projects/[projectSlug]/report/[run].vue
|
|
640
|
+
var _sfc_setup = _run__vue_vue_type_script_setup_true_lang_default.setup;
|
|
641
|
+
_run__vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
642
|
+
const ssrContext = useSSRContext();
|
|
643
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/projects/[projectSlug]/report/[run].vue");
|
|
644
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
645
|
+
};
|
|
646
|
+
var _run__default = _run__vue_vue_type_script_setup_true_lang_default;
|
|
647
|
+
|
|
648
|
+
export { _run__default as default };
|
|
649
|
+
//# sourceMappingURL=_run_-CURVtzqt.mjs.map
|