@acutis/cli 0.1.2-dev.21 → 0.1.2-dev.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/1DjC7bBa.js +64 -0
- package/.output/public/_nuxt/BNJ2GN0A.js +1 -0
- package/.output/public/_nuxt/{b5tj-z25.js → BgV7uYhh.js} +1 -1
- package/.output/public/_nuxt/C0IyPp1C.js +28 -0
- package/.output/public/_nuxt/C5NzO9dO.js +1 -0
- package/.output/public/_nuxt/CUTaKHid.js +1 -0
- package/.output/public/_nuxt/DHNHaKIX.js +1 -0
- package/.output/public/_nuxt/DKFReY2j.js +1 -0
- package/.output/public/_nuxt/DXk74b-E.js +1 -0
- package/.output/public/_nuxt/Dc6npEU3.js +1 -0
- package/.output/public/_nuxt/DyrXGv84.js +1 -0
- package/.output/public/_nuxt/WurCawTj.js +3 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/f4520b8a-9c39-4e41-af7a-b806928ef3ac.json +1 -0
- package/.output/public/_nuxt/lH5PYs8w.js +1 -0
- package/.output/public/_nuxt/tags.C6gBUbEB.css +1 -0
- package/.output/public/_nuxt/zH54s-gB.js +6 -0
- package/.output/server/chunks/_/project.service.mjs +1 -1
- package/.output/server/chunks/build/{Pagination-D2AcUggP.mjs → Pagination-BuiQpYWD.mjs} +26 -26
- package/.output/server/chunks/build/{Pagination-D2AcUggP.mjs.map → Pagination-BuiQpYWD.mjs.map} +1 -1
- package/.output/server/chunks/build/{_...scenario_-D8fF8UCa.mjs → _...scenario_-PVjOOR8j.mjs} +606 -211
- package/.output/server/chunks/build/_...scenario_-PVjOOR8j.mjs.map +1 -0
- package/.output/server/chunks/build/{_slug_-0Xu9aQ3b.mjs → _slug_-COpWNGAB.mjs} +745 -416
- package/.output/server/chunks/build/_slug_-COpWNGAB.mjs.map +1 -0
- package/.output/server/chunks/build/{origin-_7Gia2Vr.mjs → origin-NWHPNXep.mjs} +594 -20
- package/.output/server/chunks/build/origin-NWHPNXep.mjs.map +1 -0
- package/.output/server/chunks/build/{pages-C0ubizZ3.mjs → pages-C7-vXRcH.mjs} +22 -25
- package/.output/server/chunks/build/{pages-C0ubizZ3.mjs.map → pages-C7-vXRcH.mjs.map} +1 -1
- package/.output/server/chunks/build/tags-X7K7nkM2.mjs +2079 -0
- package/.output/server/chunks/build/tags-X7K7nkM2.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +142 -363
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/virtual/entry.mjs +29334 -29367
- package/.output/server/chunks/virtual/entry.mjs.map +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/9eLkUDDj.js +0 -1
- package/.output/public/_nuxt/ANcp5QFz.js +0 -1
- package/.output/public/_nuxt/BEQgcp5R.js +0 -1
- package/.output/public/_nuxt/BEk00u4_.js +0 -1
- package/.output/public/_nuxt/BGdmRvCK2.js +0 -8
- package/.output/public/_nuxt/BGkBW2ni2.js +0 -1
- package/.output/public/_nuxt/BKydt2Wp2.js +0 -4
- package/.output/public/_nuxt/BMLYuU_e.js +0 -1
- package/.output/public/_nuxt/BWJpSLJL.js +0 -1
- package/.output/public/_nuxt/BXpPYfMx.js +0 -1
- package/.output/public/_nuxt/BbjTtCyI.js +0 -3
- package/.output/public/_nuxt/Bd538XcA2.js +0 -1
- package/.output/public/_nuxt/Bp3A7I5W2.js +0 -1
- package/.output/public/_nuxt/BuOb9NX0.js +0 -1
- package/.output/public/_nuxt/C1tNhfTr.js +0 -1
- package/.output/public/_nuxt/C2KIeuhG.js +0 -1
- package/.output/public/_nuxt/C5uJN_MU.js +0 -1
- package/.output/public/_nuxt/CBVnImq2.js +0 -1
- package/.output/public/_nuxt/CDI0GNVb2.js +0 -1
- package/.output/public/_nuxt/CIFC2HNk.js +0 -1
- package/.output/public/_nuxt/CKps1Vc12.js +0 -3
- package/.output/public/_nuxt/CRH0iqnQ.js +0 -1
- package/.output/public/_nuxt/CTqLwyQP.js +0 -1
- package/.output/public/_nuxt/CU7sPrmY.js +0 -3
- package/.output/public/_nuxt/CfOqJVtU.js +0 -1
- package/.output/public/_nuxt/Ch1EeKHP.js +0 -1
- package/.output/public/_nuxt/Clv7nJ_T2.js +0 -1
- package/.output/public/_nuxt/CqZ7dV6a2.js +0 -64
- package/.output/public/_nuxt/D-7v7DZs.js +0 -1
- package/.output/public/_nuxt/DEJ3sRrh2.js +0 -1
- package/.output/public/_nuxt/DPM_BYFz2.js +0 -1
- package/.output/public/_nuxt/DQk6DVe-.js +0 -28
- package/.output/public/_nuxt/DXLPf3t6.js +0 -1
- package/.output/public/_nuxt/DtuQPKVG.js +0 -1
- package/.output/public/_nuxt/FvWrDx_z.js +0 -1
- package/.output/public/_nuxt/Gcazu-lR.js +0 -1
- package/.output/public/_nuxt/QcKfgokC.js +0 -1
- package/.output/public/_nuxt/XDsaI4JL.js +0 -1
- package/.output/public/_nuxt/builds/meta/b5eccb33-8028-439b-99f5-6377d84bdfed.json +0 -1
- package/.output/public/_nuxt/dCqlxK8U2.js +0 -1
- package/.output/public/_nuxt/f0o80Gcm.js +0 -1
- package/.output/public/_nuxt/k5q7GKnv.js +0 -1
- package/.output/public/_nuxt/modal.3A_G7d4A.css +0 -1
- package/.output/public/_nuxt/tLr-SJaf.js +0 -1
- package/.output/public/_nuxt/tags.B5A43CvD.css +0 -1
- package/.output/public/dev/sample-run.webm +0 -0
- package/.output/server/chunks/build/Alert-DX-UEOEY.mjs +0 -433
- package/.output/server/chunks/build/Alert-DX-UEOEY.mjs.map +0 -1
- package/.output/server/chunks/build/Badge-DCotJtd8.mjs +0 -394
- package/.output/server/chunks/build/Badge-DCotJtd8.mjs.map +0 -1
- package/.output/server/chunks/build/Card-D7QwltkF.mjs +0 -144
- package/.output/server/chunks/build/Card-D7QwltkF.mjs.map +0 -1
- package/.output/server/chunks/build/Container-Biz72Lxy.mjs +0 -55
- package/.output/server/chunks/build/Container-Biz72Lxy.mjs.map +0 -1
- package/.output/server/chunks/build/_...scenario_-D8fF8UCa.mjs.map +0 -1
- package/.output/server/chunks/build/_slug_-0Xu9aQ3b.mjs.map +0 -1
- package/.output/server/chunks/build/auth-status-kUEDoxDI.mjs +0 -53
- package/.output/server/chunks/build/auth-status-kUEDoxDI.mjs.map +0 -1
- package/.output/server/chunks/build/auth-status-kswM9iTW.mjs +0 -128
- package/.output/server/chunks/build/auth-status-kswM9iTW.mjs.map +0 -1
- package/.output/server/chunks/build/empty-D8gbt7LG.mjs +0 -44
- package/.output/server/chunks/build/empty-D8gbt7LG.mjs.map +0 -1
- package/.output/server/chunks/build/generation-warnings-D4Br9kVN.mjs +0 -123
- package/.output/server/chunks/build/generation-warnings-D4Br9kVN.mjs.map +0 -1
- package/.output/server/chunks/build/history-eVF-ijkS.mjs +0 -163
- package/.output/server/chunks/build/history-eVF-ijkS.mjs.map +0 -1
- package/.output/server/chunks/build/modal-CELo8GdZ.mjs +0 -342
- package/.output/server/chunks/build/modal-CELo8GdZ.mjs.map +0 -1
- package/.output/server/chunks/build/modal-CUNv4bFw.mjs +0 -659
- package/.output/server/chunks/build/modal-CUNv4bFw.mjs.map +0 -1
- package/.output/server/chunks/build/modal-Cl4zRASg.mjs +0 -321
- package/.output/server/chunks/build/modal-Cl4zRASg.mjs.map +0 -1
- package/.output/server/chunks/build/origin-_7Gia2Vr.mjs.map +0 -1
- package/.output/server/chunks/build/phrases-rvaRKDG_.mjs +0 -38
- package/.output/server/chunks/build/phrases-rvaRKDG_.mjs.map +0 -1
- package/.output/server/chunks/build/project-run-filtered-DFIlti8u.mjs +0 -455
- package/.output/server/chunks/build/project-run-filtered-DFIlti8u.mjs.map +0 -1
- package/.output/server/chunks/build/run-stream-CNVDpZ_S.mjs +0 -157
- package/.output/server/chunks/build/run-stream-CNVDpZ_S.mjs.map +0 -1
- package/.output/server/chunks/build/scenario-runs-bilf1StX.mjs +0 -135
- package/.output/server/chunks/build/scenario-runs-bilf1StX.mjs.map +0 -1
- package/.output/server/chunks/build/scenario-suggestions-CMPsmNXz.mjs +0 -210
- package/.output/server/chunks/build/scenario-suggestions-CMPsmNXz.mjs.map +0 -1
- package/.output/server/chunks/build/scenario-test-run-DIjyHDe-.mjs +0 -505
- package/.output/server/chunks/build/scenario-test-run-DIjyHDe-.mjs.map +0 -1
- package/.output/server/chunks/build/steps-DBViokqd.mjs +0 -54
- package/.output/server/chunks/build/steps-DBViokqd.mjs.map +0 -1
- package/.output/server/chunks/build/tags-BiGRnEfK.mjs +0 -639
- package/.output/server/chunks/build/tags-BiGRnEfK.mjs.map +0 -1
- package/.output/server/chunks/build/warnings-BjFCNgyv.mjs +0 -76
- package/.output/server/chunks/build/warnings-BjFCNgyv.mjs.map +0 -1
- package/.output/server/chunks/raw/sample-run.mjs +0 -7
- package/.output/server/chunks/raw/sample-run.mjs.map +0 -1
- package/dist-ui/dev/sample-run.webm +0 -0
- /package/.output/public/_nuxt/{BDNMzG2s2.js → BDNMzG2s.js} +0 -0
|
@@ -1,639 +0,0 @@
|
|
|
1
|
-
import { M as useState, v as useRoute, z as icon_default, _ as _sfc_main$2, m as modal_default$1, e as _sfc_main$1, N as useRequestEvent, C as _sfc_main$8, o as _sfc_main$6 } from '../virtual/entry.mjs';
|
|
2
|
-
import { _ as _sfc_main } from './origin-_7Gia2Vr.mjs';
|
|
3
|
-
import { c as codefield_default } from './modal-CELo8GdZ.mjs';
|
|
4
|
-
import { _ as _plugin_vue_export_helper_default } from './_plugin-vue_export-helper-BOaGB7Aw.mjs';
|
|
5
|
-
import { defineComponent, ref, computed, mergeProps, isRef, unref, useModel, withCtx, createVNode, renderSlot, createTextVNode, toDisplayString, mergeModels, watch, nextTick, useSSRContext } from 'vue';
|
|
6
|
-
import { m as getRequestURL } from '../nitro/nitro.mjs';
|
|
7
|
-
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrRenderClass, ssrRenderList, ssrRenderSlot } from 'vue/server-renderer';
|
|
8
|
-
|
|
9
|
-
//#region node_modules/.pnpm/nuxt@4.5.2_@babel+plugin-syntax-jsx@7.29.7_@babel+core@7.29.7__@babel+plugin-syntax-typ_45e57be3aa7485e3075b5014322cbc65/node_modules/nuxt/dist/app/composables/url.js
|
|
10
|
-
/** @since 3.5.0 */
|
|
11
|
-
function useRequestURL(opts) {
|
|
12
|
-
return getRequestURL(useRequestEvent(), opts);
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region app/components/webdriver/setup.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var setup_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
17
|
-
__name: "setup",
|
|
18
|
-
__ssrInlineRender: true,
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const os = ref("macos");
|
|
21
|
-
const tabs = [
|
|
22
|
-
{
|
|
23
|
-
label: "macOS",
|
|
24
|
-
value: "macos"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: "Linux",
|
|
28
|
-
value: "linux"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "Windows",
|
|
32
|
-
value: "windows"
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
const route = useRoute();
|
|
36
|
-
const origin = useRequestURL().origin;
|
|
37
|
-
const currentUrl = computed(() => `${origin}${route.fullPath}`);
|
|
38
|
-
const commands = computed(() => ({
|
|
39
|
-
macos: `open -na "Google Chrome" --args --remote-debugging-port=9222 --user-data-dir="$HOME/.acutis/chrome" "${currentUrl.value}"`,
|
|
40
|
-
linux: `google-chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.acutis/chrome" "${currentUrl.value}" &`,
|
|
41
|
-
windows: `Start-Process "chrome" -ArgumentList "--remote-debugging-port=9222","--user-data-dir=$env:USERPROFILE\\.acutis\\chrome","${currentUrl.value}"`
|
|
42
|
-
}));
|
|
43
|
-
const copied = ref(false);
|
|
44
|
-
let copiedTimer;
|
|
45
|
-
async function copy() {
|
|
46
|
-
await (void 0).clipboard.writeText(commands.value[os.value]);
|
|
47
|
-
copied.value = true;
|
|
48
|
-
clearTimeout(copiedTimer);
|
|
49
|
-
copiedTimer = setTimeout(() => {
|
|
50
|
-
copied.value = false;
|
|
51
|
-
}, 2e3);
|
|
52
|
-
}
|
|
53
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
54
|
-
const _component_UTabs = _sfc_main;
|
|
55
|
-
const _component_BaseButtonIcon = icon_default;
|
|
56
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-3 rounded-lg bg-elevated p-4" }, _attrs))}><p class="text-sm text-muted"> Abra o Chrome com a porta de depuração. Ele já abre nesta página, é só clicar em <span class="font-medium text-default">Novo cenário</span> de novo: </p>`);
|
|
57
|
-
_push(ssrRenderComponent(_component_UTabs, {
|
|
58
|
-
modelValue: unref(os),
|
|
59
|
-
"onUpdate:modelValue": ($event) => isRef(os) ? os.value = $event : null,
|
|
60
|
-
items: tabs,
|
|
61
|
-
content: false,
|
|
62
|
-
class: "w-full"
|
|
63
|
-
}, null, _parent));
|
|
64
|
-
_push(`<div class="flex items-center gap-2"><code data-testid="webdriver-comando" class="grow overflow-x-auto whitespace-nowrap rounded-md bg-default p-3 text-xs">${ssrInterpolate(unref(commands)[unref(os)])}</code>`);
|
|
65
|
-
_push(ssrRenderComponent(_component_BaseButtonIcon, {
|
|
66
|
-
icon: unref(copied) ? "i-ic-round-check" : "i-ic-round-content-copy",
|
|
67
|
-
label: unref(copied) ? "Copiado!" : "Copiar comando",
|
|
68
|
-
color: "neutral",
|
|
69
|
-
variant: "soft",
|
|
70
|
-
"data-testid": "webdriver-copiar",
|
|
71
|
-
onClick: copy
|
|
72
|
-
}, null, _parent));
|
|
73
|
-
_push(`</div></div>`);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region app/components/webdriver/setup.vue
|
|
79
|
-
var _sfc_setup$3 = setup_vue_vue_type_script_setup_true_lang_default.setup;
|
|
80
|
-
setup_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
81
|
-
const ssrContext = useSSRContext();
|
|
82
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/webdriver/setup.vue");
|
|
83
|
-
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
84
|
-
};
|
|
85
|
-
var setup_default = Object.assign(setup_vue_vue_type_script_setup_true_lang_default, { __name: "WebdriverSetup" });
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region app/utils/recorder-event.ts
|
|
88
|
-
/** A gravação como o backend a guarda: os campos do evento, sem o que é do transporte. */
|
|
89
|
-
function toRecordedEvents(events) {
|
|
90
|
-
return events.map((event) => ({
|
|
91
|
-
type: event.type,
|
|
92
|
-
timestamp: event.timestamp,
|
|
93
|
-
url: event.url ?? null,
|
|
94
|
-
selectors: event.selectors ?? null,
|
|
95
|
-
label: event.label ?? null,
|
|
96
|
-
innerText: event.innerText ?? null,
|
|
97
|
-
tagName: event.tagName ?? null,
|
|
98
|
-
inputType: event.inputType ?? null,
|
|
99
|
-
value: event.value ?? null,
|
|
100
|
-
sensitive: event.sensitive ?? false,
|
|
101
|
-
checked: event.checked ?? null,
|
|
102
|
-
html: event.html ?? null,
|
|
103
|
-
assert: event.assert
|
|
104
|
-
}));
|
|
105
|
-
}
|
|
106
|
-
/** Como o evento chama o elemento, na mesma ordem de fontes do `SpecEmitter` do backend. */
|
|
107
|
-
function target(event) {
|
|
108
|
-
const selectors = event.selectors;
|
|
109
|
-
const clean = (event.label || event.innerText || selectors?.placeholder || selectors?.text || "").replace(/\s+/g, " ").trim();
|
|
110
|
-
return clean === "" ? null : clean;
|
|
111
|
-
}
|
|
112
|
-
/** O alvo entre aspas, separando o que veio da tela do verbo que o descreve. */
|
|
113
|
-
function quoted(what) {
|
|
114
|
-
return `"${what}"`;
|
|
115
|
-
}
|
|
116
|
-
/** O caminho da URL, que é como a execução chama a tela: "/login", ou a página inicial na raiz. */
|
|
117
|
-
function page(event) {
|
|
118
|
-
const url = event.url ?? "";
|
|
119
|
-
try {
|
|
120
|
-
const path = new URL(url, "http://base.test").pathname;
|
|
121
|
-
return path === "/" ? "a página inicial" : quoted(path);
|
|
122
|
-
} catch {
|
|
123
|
-
return url ? quoted(url) : "a página inicial";
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* A frase que descreve o evento gravado, no mesmo vocabulário dos passos da execução
|
|
128
|
-
* ("Clica em Entrar", "Preenche Senha"). A navegação é dita pelo caminho da URL.
|
|
129
|
-
*/
|
|
130
|
-
function describeRecorderEvent(event) {
|
|
131
|
-
const what = target(event);
|
|
132
|
-
switch (event.type) {
|
|
133
|
-
case "navigate": return `Navega para ${page(event)}`;
|
|
134
|
-
case "click": return what ? `Clica em ${quoted(what)}` : "Clica no elemento";
|
|
135
|
-
case "hover": return what ? `Passa o mouse em ${quoted(what)}` : "Passa o mouse no elemento";
|
|
136
|
-
case "fill": {
|
|
137
|
-
const field = what ? quoted(what) : "o campo";
|
|
138
|
-
if (!event.value) return `Preenche ${field}`;
|
|
139
|
-
return `Preenche ${field} com ${event.sensitive ? "••••" : quoted(event.value)}`;
|
|
140
|
-
}
|
|
141
|
-
case "submit": return "Envia o formulário";
|
|
142
|
-
case "assert":
|
|
143
|
-
if (event.assert?.assertType === "url") return `Confere que a tela é ${page(event)}`;
|
|
144
|
-
return `Confere ${what ? quoted(what) : "o elemento"}`;
|
|
145
|
-
default: return what ?? event.url ?? event.type ?? "";
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region app/components/scenario/review/timeline.vue?vue&type=script&setup=true&lang.ts
|
|
150
|
-
var timeline_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
151
|
-
__name: "timeline",
|
|
152
|
-
__ssrInlineRender: true,
|
|
153
|
-
props: {
|
|
154
|
-
events: {},
|
|
155
|
-
videoSrc: { default: null },
|
|
156
|
-
recordingStartedAt: { default: null },
|
|
157
|
-
resumable: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
default: false
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
emits: ["resume"],
|
|
163
|
-
setup(__props, { emit: __emit }) {
|
|
164
|
-
ref(null);
|
|
165
|
-
const currentTime = ref(0);
|
|
166
|
-
const armed = ref(null);
|
|
167
|
-
const ready = ref(false);
|
|
168
|
-
const eventIcons = {
|
|
169
|
-
navigate: "i-ic-round-public",
|
|
170
|
-
click: "i-ic-round-ads-click",
|
|
171
|
-
fill: "i-ic-round-edit",
|
|
172
|
-
submit: "i-ic-round-send",
|
|
173
|
-
hover: "i-ic-round-mouse",
|
|
174
|
-
assert: "i-ic-round-check-circle"
|
|
175
|
-
};
|
|
176
|
-
function offsetSeconds(event) {
|
|
177
|
-
if (!__props.recordingStartedAt || !event.timestamp) return 0;
|
|
178
|
-
return Math.max(0, (event.timestamp - __props.recordingStartedAt) / 1e3);
|
|
179
|
-
}
|
|
180
|
-
const currentIndex = computed(() => {
|
|
181
|
-
let index = -1;
|
|
182
|
-
__props.events.forEach((event, i) => {
|
|
183
|
-
if (offsetSeconds(event) <= currentTime.value) index = i;
|
|
184
|
-
});
|
|
185
|
-
return index;
|
|
186
|
-
});
|
|
187
|
-
/** Quantos passos saem da gravação quando o corte armado for confirmado. */
|
|
188
|
-
const dropped = computed(() => armed.value === null ? 0 : __props.events.length - armed.value);
|
|
189
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
190
|
-
const _component_UIcon = _sfc_main$2;
|
|
191
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "grid grid-cols-1 gap-6 lg:grid-cols-5" }, _attrs))} data-v-46efcf33>`);
|
|
192
|
-
if (__props.videoSrc) _push(`<video data-testid="revisao-video"${ssrRenderAttr("src", __props.videoSrc)} controls class="w-full self-start rounded-lg lg:sticky lg:top-0 lg:col-span-3" data-v-46efcf33></video>`);
|
|
193
|
-
else _push(`<!---->`);
|
|
194
|
-
_push(`<div class="${ssrRenderClass(__props.videoSrc ? "lg:col-span-2" : "lg:col-span-5")}" data-v-46efcf33><p class="mb-3 font-semibold" data-v-46efcf33> Timeline dos eventos </p><ol class="flex w-max max-w-full flex-col" data-v-46efcf33><!--[-->`);
|
|
195
|
-
ssrRenderList(__props.events, (event, i) => {
|
|
196
|
-
_push(`<li data-testid="revisao-evento"${ssrRenderAttr("data-current", i === unref(currentIndex) ? "true" : "false")}${ssrRenderAttr("data-dropped", unref(armed) !== null && i >= unref(armed) ? "true" : "false")} class="${ssrRenderClass([unref(armed) !== null && i >= unref(armed) ? "opacity-50" : "", "group relative flex cursor-pointer items-stretch gap-3 transition-opacity"])}" data-v-46efcf33>`);
|
|
197
|
-
if (__props.resumable && i > 0) {
|
|
198
|
-
_push(`<button type="button" data-testid="revisao-retomar"${ssrRenderAttr("data-armed", unref(armed) === i ? "true" : "false")} class="${ssrRenderClass([unref(armed) === i ? "opacity-100!" : "", "absolute -top-5 -right-1.5 -left-1.5 z-10 flex h-4 items-center gap-2 opacity-0 transition-opacity focus-visible:opacity-100 group-hover:opacity-100"])}"${ssrRenderAttr("aria-label", unref(armed) === i ? `Confirmar a retomada deste passo, descartando ${unref(dropped)}` : "Retomar a gravação deste passo")} data-v-46efcf33><span class="${ssrRenderClass([unref(armed) === i ? "bg-error" : "bg-primary", "h-px flex-1 rounded-full"])}" data-v-46efcf33></span><span class="${ssrRenderClass([unref(armed) === i ? "bg-error text-inverted" : "bg-default text-primary", "rounded-full px-2 py-0.5 text-[10px] leading-none font-medium tracking-wide uppercase"])}" data-v-46efcf33>`);
|
|
199
|
-
if (unref(armed) !== i) _push(`<!--[-->retomar daqui<!--]-->`);
|
|
200
|
-
else if (unref(ready)) _push(`<!--[-->clique de novo · descarta ${ssrInterpolate(unref(dropped))}<!--]-->`);
|
|
201
|
-
else _push(`<!--[-->aguarde…<!--]-->`);
|
|
202
|
-
_push(`</span><span class="relative h-px flex-1 overflow-visible rounded-full bg-accented" data-v-46efcf33>`);
|
|
203
|
-
if (unref(armed) === i) _push(`<span class="arming absolute inset-y-0 left-0 rounded-full bg-error" data-v-46efcf33></span>`);
|
|
204
|
-
else _push(`<!---->`);
|
|
205
|
-
_push(`</span></button>`);
|
|
206
|
-
} else _push(`<!---->`);
|
|
207
|
-
_push(`<div class="flex flex-col items-center" data-v-46efcf33>`);
|
|
208
|
-
_push(ssrRenderComponent(_component_UIcon, {
|
|
209
|
-
name: eventIcons[event.type] ?? "i-ic-round-help-outline",
|
|
210
|
-
class: ["size-5 shrink-0 transition-colors", i <= unref(currentIndex) ? "text-primary" : "text-muted"]
|
|
211
|
-
}, null, _parent));
|
|
212
|
-
if (i < __props.events.length - 1) _push(`<span class="${ssrRenderClass([i < unref(currentIndex) ? "bg-primary" : "bg-accented", "w-px grow transition-colors"])}" data-v-46efcf33></span>`);
|
|
213
|
-
else _push(`<!---->`);
|
|
214
|
-
_push(`</div><div class="pb-6 min-w-0 flex-1" data-v-46efcf33><p class="${ssrRenderClass([[i === unref(currentIndex) ? "font-semibold text-primary" : "text-default", unref(armed) !== null && i >= unref(armed) ? "line-through decoration-dimmed" : ""], "truncate text-sm transition-colors group-hover:text-highlighted"])}" data-v-46efcf33>${ssrInterpolate(unref(describeRecorderEvent)(event))}</p>`);
|
|
215
|
-
if (__props.recordingStartedAt) _push(`<p class="text-xs text-dimmed" data-v-46efcf33>${ssrInterpolate(offsetSeconds(event).toFixed(1))}s </p>`);
|
|
216
|
-
else _push(`<!---->`);
|
|
217
|
-
_push(`</div></li>`);
|
|
218
|
-
});
|
|
219
|
-
_push(`<!--]--></ol></div></div>`);
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region app/components/scenario/review/timeline.vue
|
|
225
|
-
var _sfc_setup$2 = timeline_vue_vue_type_script_setup_true_lang_default.setup;
|
|
226
|
-
timeline_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
227
|
-
const ssrContext = useSSRContext();
|
|
228
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/review/timeline.vue");
|
|
229
|
-
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
230
|
-
};
|
|
231
|
-
var timeline_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(timeline_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-46efcf33"]]), { __name: "ScenarioReviewTimeline" });
|
|
232
|
-
//#endregion
|
|
233
|
-
//#region app/components/base/confirm.vue?vue&type=script&setup=true&lang.ts
|
|
234
|
-
var confirm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
235
|
-
__name: "confirm",
|
|
236
|
-
__ssrInlineRender: true,
|
|
237
|
-
props: /*@__PURE__*/ mergeModels({
|
|
238
|
-
title: {},
|
|
239
|
-
description: { default: "" },
|
|
240
|
-
confirmLabel: { default: "Confirmar" },
|
|
241
|
-
confirmColor: { default: "primary" },
|
|
242
|
-
confirmTestid: { default: "confirmar" },
|
|
243
|
-
loading: {
|
|
244
|
-
type: Boolean,
|
|
245
|
-
default: false
|
|
246
|
-
}
|
|
247
|
-
}, {
|
|
248
|
-
"open": {
|
|
249
|
-
type: Boolean,
|
|
250
|
-
default: false
|
|
251
|
-
},
|
|
252
|
-
"openModifiers": {}
|
|
253
|
-
}),
|
|
254
|
-
emits: /*@__PURE__*/ mergeModels(["confirm"], ["update:open"]),
|
|
255
|
-
setup(__props, { emit: __emit }) {
|
|
256
|
-
const open = useModel(__props, "open");
|
|
257
|
-
const emit = __emit;
|
|
258
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
259
|
-
const _component_BaseModal = modal_default$1;
|
|
260
|
-
const _component_UButton = _sfc_main$1;
|
|
261
|
-
_push(ssrRenderComponent(_component_BaseModal, mergeProps({
|
|
262
|
-
open: open.value,
|
|
263
|
-
"onUpdate:open": ($event) => open.value = $event,
|
|
264
|
-
title: __props.title
|
|
265
|
-
}, _attrs), {
|
|
266
|
-
body: withCtx((_, _push, _parent, _scopeId) => {
|
|
267
|
-
if (_push) {
|
|
268
|
-
_push(`<div class="flex min-h-24 items-center justify-center text-center"${_scopeId}><p class="w-full text-lg text-muted break-words"${_scopeId}>`);
|
|
269
|
-
ssrRenderSlot(_ctx.$slots, "description", {}, () => {
|
|
270
|
-
_push(`${ssrInterpolate(__props.description)}`);
|
|
271
|
-
}, _push, _parent, _scopeId);
|
|
272
|
-
_push(`</p></div>`);
|
|
273
|
-
} else return [createVNode("div", { class: "flex min-h-24 items-center justify-center text-center" }, [createVNode("p", { class: "w-full text-lg text-muted break-words" }, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])])];
|
|
274
|
-
}),
|
|
275
|
-
footer: withCtx((_, _push, _parent, _scopeId) => {
|
|
276
|
-
if (_push) {
|
|
277
|
-
_push(ssrRenderComponent(_component_UButton, {
|
|
278
|
-
label: "Cancelar",
|
|
279
|
-
color: "neutral",
|
|
280
|
-
variant: "ghost",
|
|
281
|
-
"data-testid": "confirmar-cancelar",
|
|
282
|
-
onClick: ($event) => open.value = false
|
|
283
|
-
}, null, _parent, _scopeId));
|
|
284
|
-
_push(ssrRenderComponent(_component_UButton, {
|
|
285
|
-
label: __props.confirmLabel,
|
|
286
|
-
color: __props.confirmColor,
|
|
287
|
-
loading: __props.loading,
|
|
288
|
-
"data-testid": __props.confirmTestid,
|
|
289
|
-
onClick: ($event) => emit("confirm")
|
|
290
|
-
}, null, _parent, _scopeId));
|
|
291
|
-
} else return [createVNode(_component_UButton, {
|
|
292
|
-
label: "Cancelar",
|
|
293
|
-
color: "neutral",
|
|
294
|
-
variant: "ghost",
|
|
295
|
-
"data-testid": "confirmar-cancelar",
|
|
296
|
-
onClick: ($event) => open.value = false
|
|
297
|
-
}, null, 8, ["onClick"]), createVNode(_component_UButton, {
|
|
298
|
-
label: __props.confirmLabel,
|
|
299
|
-
color: __props.confirmColor,
|
|
300
|
-
loading: __props.loading,
|
|
301
|
-
"data-testid": __props.confirmTestid,
|
|
302
|
-
onClick: ($event) => emit("confirm")
|
|
303
|
-
}, null, 8, [
|
|
304
|
-
"label",
|
|
305
|
-
"color",
|
|
306
|
-
"loading",
|
|
307
|
-
"data-testid",
|
|
308
|
-
"onClick"
|
|
309
|
-
])];
|
|
310
|
-
}),
|
|
311
|
-
_: 3
|
|
312
|
-
}, _parent));
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
//#endregion
|
|
317
|
-
//#region app/components/base/confirm.vue
|
|
318
|
-
var _sfc_setup$1 = confirm_vue_vue_type_script_setup_true_lang_default.setup;
|
|
319
|
-
confirm_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
320
|
-
const ssrContext = useSSRContext();
|
|
321
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/base/confirm.vue");
|
|
322
|
-
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
323
|
-
};
|
|
324
|
-
var confirm_default = Object.assign(confirm_vue_vue_type_script_setup_true_lang_default, { __name: "BaseConfirm" });
|
|
325
|
-
/** O nome de arquivo que um título vira. Acompanha o `Str::slug` que o backend aplica ao gravar. */
|
|
326
|
-
function slugify(value) {
|
|
327
|
-
return value.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 80).replace(/^-+|-+$/g, "");
|
|
328
|
-
}
|
|
329
|
-
function draftFromScenario(scenario) {
|
|
330
|
-
const parts = scenario.spec.replace(/^tests\//, "").replace(/\.spec\.ts$/, "").split("/");
|
|
331
|
-
return {
|
|
332
|
-
title: scenario.title,
|
|
333
|
-
path: parts.at(-1),
|
|
334
|
-
domain: parts.length > 1 ? parts.slice(0, -1).join("/") : "",
|
|
335
|
-
tags: scenario.tags,
|
|
336
|
-
gherkin: scenario.gherkin ?? "",
|
|
337
|
-
playwright: scenario.playwright
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region app/components/scenario/review/contexts.vue?vue&type=script&setup=true&lang.ts
|
|
342
|
-
var contexts_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
343
|
-
__name: "contexts",
|
|
344
|
-
__ssrInlineRender: true,
|
|
345
|
-
props: /*@__PURE__*/ mergeModels({
|
|
346
|
-
isAuth: {
|
|
347
|
-
type: Boolean,
|
|
348
|
-
default: false
|
|
349
|
-
},
|
|
350
|
-
novo: {
|
|
351
|
-
type: Boolean,
|
|
352
|
-
default: false
|
|
353
|
-
}
|
|
354
|
-
}, {
|
|
355
|
-
"draft": { required: true },
|
|
356
|
-
"draftModifiers": {}
|
|
357
|
-
}),
|
|
358
|
-
emits: ["update:draft"],
|
|
359
|
-
setup(__props) {
|
|
360
|
-
const draft = useModel(__props, "draft");
|
|
361
|
-
function tagsFromLine(line) {
|
|
362
|
-
return line.match(/@[\w-]+/g) ?? [];
|
|
363
|
-
}
|
|
364
|
-
function tagsFromGherkin(gherkin) {
|
|
365
|
-
const firstLine = gherkin.split("\n")[0] ?? "";
|
|
366
|
-
return firstLine.trim().startsWith("@") ? tagsFromLine(firstLine) : [];
|
|
367
|
-
}
|
|
368
|
-
function tagsFromPlaywright(playwright) {
|
|
369
|
-
const match = playwright.match(/tag:\s*\[([^\]]*)\]/);
|
|
370
|
-
return match ? tagsFromLine(match[1]) : [];
|
|
371
|
-
}
|
|
372
|
-
function stampGherkinTags(gherkin, tags) {
|
|
373
|
-
if (!gherkin.trim()) return gherkin;
|
|
374
|
-
const lines = gherkin.split("\n");
|
|
375
|
-
if (lines[0]?.trim().startsWith("@")) lines.shift();
|
|
376
|
-
const body = lines.join("\n");
|
|
377
|
-
return tags.length ? `${tags.join(" ")}\n${body}` : body;
|
|
378
|
-
}
|
|
379
|
-
function stampPlaywrightTags(playwright, tags) {
|
|
380
|
-
if (!tags.length) return playwright;
|
|
381
|
-
const list = `tag: [${tags.map((t) => `'${t}'`).join(", ")}]`;
|
|
382
|
-
if (/tag:\s*\[[^\]]*\]/.test(playwright)) return playwright.replace(/tag:\s*\[[^\]]*\]/, list);
|
|
383
|
-
return playwright.replace(/test\.describe\(\s*((["']).+?\2)\s*,\s*(?=\(|async)/, `test.describe($1, { ${list} }, `);
|
|
384
|
-
}
|
|
385
|
-
let syncing = false;
|
|
386
|
-
function applyTags(tags) {
|
|
387
|
-
syncing = true;
|
|
388
|
-
draft.value = {
|
|
389
|
-
...draft.value,
|
|
390
|
-
tags,
|
|
391
|
-
gherkin: stampGherkinTags(draft.value.gherkin, tags),
|
|
392
|
-
playwright: stampPlaywrightTags(draft.value.playwright, tags)
|
|
393
|
-
};
|
|
394
|
-
nextTick(() => {
|
|
395
|
-
syncing = false;
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
const tagsText = computed({
|
|
399
|
-
get: () => draft.value.tags.join(" "),
|
|
400
|
-
set: (value) => applyTags(tagsFromLine(value))
|
|
401
|
-
});
|
|
402
|
-
watch(() => draft.value.gherkin, (gherkin) => {
|
|
403
|
-
if (syncing) return;
|
|
404
|
-
const tags = tagsFromGherkin(gherkin);
|
|
405
|
-
if (tags.length && tags.join(" ") !== draft.value.tags.join(" ")) applyTags(tags);
|
|
406
|
-
});
|
|
407
|
-
watch(() => draft.value.playwright, (playwright) => {
|
|
408
|
-
if (syncing) return;
|
|
409
|
-
const tags = tagsFromPlaywright(playwright);
|
|
410
|
-
if (tags.length && tags.join(" ") !== draft.value.tags.join(" ")) applyTags(tags);
|
|
411
|
-
});
|
|
412
|
-
/** No cenário novo o arquivo espelha o título, enquanto ninguém o tiver editado à mão. */
|
|
413
|
-
watch(() => draft.value.title, (title, previous) => {
|
|
414
|
-
if (!__props.novo || draft.value.path !== slugify(previous)) return;
|
|
415
|
-
draft.value = {
|
|
416
|
-
...draft.value,
|
|
417
|
-
path: slugify(title)
|
|
418
|
-
};
|
|
419
|
-
});
|
|
420
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
421
|
-
const _component_UFormField = _sfc_main$8;
|
|
422
|
-
const _component_UInput = _sfc_main$6;
|
|
423
|
-
const _component_BaseCodefield = codefield_default;
|
|
424
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-5" }, _attrs))}><div class="grid grid-cols-1 gap-4 sm:grid-cols-2">`);
|
|
425
|
-
_push(ssrRenderComponent(_component_UFormField, { label: "Título do cenário" }, {
|
|
426
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
427
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
428
|
-
modelValue: draft.value.title,
|
|
429
|
-
"onUpdate:modelValue": ($event) => draft.value.title = $event,
|
|
430
|
-
maxlength: unref(120),
|
|
431
|
-
"data-testid": "contexto-titulo",
|
|
432
|
-
class: "w-full"
|
|
433
|
-
}, null, _parent, _scopeId));
|
|
434
|
-
else return [createVNode(_component_UInput, {
|
|
435
|
-
modelValue: draft.value.title,
|
|
436
|
-
"onUpdate:modelValue": ($event) => draft.value.title = $event,
|
|
437
|
-
maxlength: unref(120),
|
|
438
|
-
"data-testid": "contexto-titulo",
|
|
439
|
-
class: "w-full"
|
|
440
|
-
}, null, 8, [
|
|
441
|
-
"modelValue",
|
|
442
|
-
"onUpdate:modelValue",
|
|
443
|
-
"maxlength"
|
|
444
|
-
])];
|
|
445
|
-
}),
|
|
446
|
-
_: 1
|
|
447
|
-
}, _parent));
|
|
448
|
-
if (!__props.isAuth) _push(ssrRenderComponent(_component_UFormField, {
|
|
449
|
-
label: "Arquivo",
|
|
450
|
-
help: "Nome do .spec.ts / .feature"
|
|
451
|
-
}, {
|
|
452
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
453
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
454
|
-
modelValue: draft.value.path,
|
|
455
|
-
"onUpdate:modelValue": ($event) => draft.value.path = $event,
|
|
456
|
-
maxlength: unref(80),
|
|
457
|
-
"data-testid": "contexto-path",
|
|
458
|
-
class: "w-full"
|
|
459
|
-
}, null, _parent, _scopeId));
|
|
460
|
-
else return [createVNode(_component_UInput, {
|
|
461
|
-
modelValue: draft.value.path,
|
|
462
|
-
"onUpdate:modelValue": ($event) => draft.value.path = $event,
|
|
463
|
-
maxlength: unref(80),
|
|
464
|
-
"data-testid": "contexto-path",
|
|
465
|
-
class: "w-full"
|
|
466
|
-
}, null, 8, [
|
|
467
|
-
"modelValue",
|
|
468
|
-
"onUpdate:modelValue",
|
|
469
|
-
"maxlength"
|
|
470
|
-
])];
|
|
471
|
-
}),
|
|
472
|
-
_: 1
|
|
473
|
-
}, _parent));
|
|
474
|
-
else _push(`<!---->`);
|
|
475
|
-
_push(`</div>`);
|
|
476
|
-
if (!__props.isAuth) _push(ssrRenderComponent(_component_UFormField, {
|
|
477
|
-
label: "Domínio",
|
|
478
|
-
help: "Pasta onde o cenário será salvo (ex.: login, checkout)"
|
|
479
|
-
}, {
|
|
480
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
481
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
482
|
-
modelValue: draft.value.domain,
|
|
483
|
-
"onUpdate:modelValue": ($event) => draft.value.domain = $event,
|
|
484
|
-
maxlength: unref(80),
|
|
485
|
-
"data-testid": "contexto-dominio",
|
|
486
|
-
class: "w-full"
|
|
487
|
-
}, null, _parent, _scopeId));
|
|
488
|
-
else return [createVNode(_component_UInput, {
|
|
489
|
-
modelValue: draft.value.domain,
|
|
490
|
-
"onUpdate:modelValue": ($event) => draft.value.domain = $event,
|
|
491
|
-
maxlength: unref(80),
|
|
492
|
-
"data-testid": "contexto-dominio",
|
|
493
|
-
class: "w-full"
|
|
494
|
-
}, null, 8, [
|
|
495
|
-
"modelValue",
|
|
496
|
-
"onUpdate:modelValue",
|
|
497
|
-
"maxlength"
|
|
498
|
-
])];
|
|
499
|
-
}),
|
|
500
|
-
_: 1
|
|
501
|
-
}, _parent));
|
|
502
|
-
else _push(`<!---->`);
|
|
503
|
-
if (!__props.isAuth) _push(ssrRenderComponent(_component_UFormField, {
|
|
504
|
-
label: "Tags",
|
|
505
|
-
help: "Separadas por espaço (ex.: @read @criando)"
|
|
506
|
-
}, {
|
|
507
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
508
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
509
|
-
modelValue: unref(tagsText),
|
|
510
|
-
"onUpdate:modelValue": ($event) => isRef(tagsText) ? tagsText.value = $event : null,
|
|
511
|
-
"data-testid": "contexto-tags",
|
|
512
|
-
class: "w-full"
|
|
513
|
-
}, null, _parent, _scopeId));
|
|
514
|
-
else return [createVNode(_component_UInput, {
|
|
515
|
-
modelValue: unref(tagsText),
|
|
516
|
-
"onUpdate:modelValue": ($event) => isRef(tagsText) ? tagsText.value = $event : null,
|
|
517
|
-
"data-testid": "contexto-tags",
|
|
518
|
-
class: "w-full"
|
|
519
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])];
|
|
520
|
-
}),
|
|
521
|
-
_: 1
|
|
522
|
-
}, _parent));
|
|
523
|
-
else _push(`<!---->`);
|
|
524
|
-
_push(ssrRenderComponent(_component_UFormField, { label: "Cenário (Gherkin)" }, {
|
|
525
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
526
|
-
if (_push) _push(ssrRenderComponent(_component_BaseCodefield, {
|
|
527
|
-
modelValue: draft.value.gherkin,
|
|
528
|
-
"onUpdate:modelValue": ($event) => draft.value.gherkin = $event,
|
|
529
|
-
language: "gherkin",
|
|
530
|
-
testid: "contexto-cenario"
|
|
531
|
-
}, null, _parent, _scopeId));
|
|
532
|
-
else return [createVNode(_component_BaseCodefield, {
|
|
533
|
-
modelValue: draft.value.gherkin,
|
|
534
|
-
"onUpdate:modelValue": ($event) => draft.value.gherkin = $event,
|
|
535
|
-
language: "gherkin",
|
|
536
|
-
testid: "contexto-cenario"
|
|
537
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])];
|
|
538
|
-
}),
|
|
539
|
-
_: 1
|
|
540
|
-
}, _parent));
|
|
541
|
-
_push(ssrRenderComponent(_component_UFormField, { label: "Teste (Playwright)" }, {
|
|
542
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
543
|
-
if (_push) _push(ssrRenderComponent(_component_BaseCodefield, {
|
|
544
|
-
modelValue: draft.value.playwright,
|
|
545
|
-
"onUpdate:modelValue": ($event) => draft.value.playwright = $event,
|
|
546
|
-
language: "typescript",
|
|
547
|
-
testid: "contexto-teste"
|
|
548
|
-
}, null, _parent, _scopeId));
|
|
549
|
-
else return [createVNode(_component_BaseCodefield, {
|
|
550
|
-
modelValue: draft.value.playwright,
|
|
551
|
-
"onUpdate:modelValue": ($event) => draft.value.playwright = $event,
|
|
552
|
-
language: "typescript",
|
|
553
|
-
testid: "contexto-teste"
|
|
554
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])];
|
|
555
|
-
}),
|
|
556
|
-
_: 1
|
|
557
|
-
}, _parent));
|
|
558
|
-
_push(`</div>`);
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
});
|
|
562
|
-
//#endregion
|
|
563
|
-
//#region app/components/scenario/review/contexts.vue
|
|
564
|
-
var _sfc_setup = contexts_vue_vue_type_script_setup_true_lang_default.setup;
|
|
565
|
-
contexts_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
566
|
-
const ssrContext = useSSRContext();
|
|
567
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/review/contexts.vue");
|
|
568
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
569
|
-
};
|
|
570
|
-
var contexts_default = Object.assign(contexts_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioReviewContexts" });
|
|
571
|
-
//#endregion
|
|
572
|
-
//#region app/composables/webdriver.ts
|
|
573
|
-
var socket = null;
|
|
574
|
-
function useWebdriver() {
|
|
575
|
-
const state = useState("webdriver", () => ({
|
|
576
|
-
connected: false,
|
|
577
|
-
extensionReady: false,
|
|
578
|
-
recording: false,
|
|
579
|
-
replaying: false,
|
|
580
|
-
replayFailedStep: null,
|
|
581
|
-
error: null,
|
|
582
|
-
events: [],
|
|
583
|
-
videoSessionId: null,
|
|
584
|
-
recordingStartedAt: null,
|
|
585
|
-
storageState: null
|
|
586
|
-
}));
|
|
587
|
-
const url = "";
|
|
588
|
-
function send(type, payload = {}) {
|
|
589
|
-
if (void 0 === WebSocket.OPEN) socket.send(JSON.stringify({
|
|
590
|
-
type,
|
|
591
|
-
...payload
|
|
592
|
-
}));
|
|
593
|
-
}
|
|
594
|
-
function ensureConnected() {}
|
|
595
|
-
function startRecording(mode = "scenario", options = {}) {
|
|
596
|
-
state.value.error = null;
|
|
597
|
-
state.value.events = options.replay ?? [];
|
|
598
|
-
state.value.videoSessionId = null;
|
|
599
|
-
state.value.storageState = null;
|
|
600
|
-
state.value.recording = true;
|
|
601
|
-
state.value.replaying = (options.replay?.length ?? 0) > 0;
|
|
602
|
-
state.value.replayFailedStep = null;
|
|
603
|
-
send("START_RECORDING", {
|
|
604
|
-
mode,
|
|
605
|
-
...options
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
function stopRecording() {
|
|
609
|
-
send("STOP_RECORDING");
|
|
610
|
-
state.value.recording = false;
|
|
611
|
-
}
|
|
612
|
-
return {
|
|
613
|
-
state,
|
|
614
|
-
url,
|
|
615
|
-
ensureConnected,
|
|
616
|
-
startRecording,
|
|
617
|
-
stopRecording
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
/** A origem em que a gravação começou, que é a URL base que o backend precisa para escrever o teste. */
|
|
621
|
-
function eventsBaseUrl(events) {
|
|
622
|
-
const first = events.find((event) => event.url);
|
|
623
|
-
if (!first?.url) return null;
|
|
624
|
-
try {
|
|
625
|
-
return new URL(first.url).origin;
|
|
626
|
-
} catch {
|
|
627
|
-
return null;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region app/utils/tags.ts
|
|
632
|
-
function tagColor(tag) {
|
|
633
|
-
if (tag === "@read") return "success";
|
|
634
|
-
if (tag === "@write") return "warning";
|
|
635
|
-
return "primary";
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
export { timeline_default as a, toRecordedEvents as b, confirm_default as c, draftFromScenario as d, eventsBaseUrl as e, contexts_default as f, setup_default as s, tagColor as t, useWebdriver as u };
|
|
639
|
-
//# sourceMappingURL=tags-BiGRnEfK.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags-BiGRnEfK.mjs","sources":["../../../../node_modules/.pnpm/nuxt@4.5.2_@babel+plugin-syntax-jsx@7.29.7_@babel+core@7.29.7__@babel+plugin-syntax-typ_45e57be3aa7485e3075b5014322cbc65/node_modules/nuxt/dist/app/composables/url.js","../../../../app/components/webdriver/setup.vue","../../../../app/utils/recorder-event.ts","../../../../app/components/scenario/review/timeline.vue","../../../../app/components/base/confirm.vue","../../../../app/utils/scenario-draft.ts","../../../../app/components/scenario/review/contexts.vue","../../../../app/composables/webdriver.ts","../../../../app/utils/tags.ts"],"names":[],"mappings":"","x_google_ignoreList":[0]}
|