@acutis/cli 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/AC3CibKK.js +1 -0
- package/.output/public/_nuxt/BGc2VNce.js +1 -0
- package/.output/public/_nuxt/BN4XOpVt.js +1 -0
- package/.output/public/_nuxt/BNJ2GN0A.js +1 -0
- package/.output/public/_nuxt/BP52ABGx.js +1 -0
- package/.output/public/_nuxt/BWcsrofD.js +1 -0
- package/.output/public/_nuxt/{b5tj-z25.js → Bqp63OdK.js} +1 -1
- package/.output/public/_nuxt/CF8y5KTS.js +3 -0
- package/.output/public/_nuxt/CUTaKHid.js +1 -0
- package/.output/public/_nuxt/CZEhodn6.js +1 -0
- package/.output/public/_nuxt/Cym5RBDq.js +1 -0
- package/.output/public/_nuxt/D1ge6Bwo.js +1 -0
- package/.output/public/_nuxt/D2UpbqeN.js +28 -0
- package/.output/public/_nuxt/DDKd6Dxq.js +1 -0
- package/.output/public/_nuxt/D_FJunXs.js +64 -0
- package/.output/public/_nuxt/Dc2A-6xl.js +6 -0
- package/.output/public/_nuxt/DoQkJV4U.js +1 -0
- package/.output/public/_nuxt/JwPm-b3T.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/45a88f3e-8555-4d4c-bdac-4d0788b1fa61.json +1 -0
- package/.output/public/_nuxt/cnFSOQCu.js +1 -0
- package/.output/public/_nuxt/entry.BmTN_nlL.css +2 -0
- package/.output/public/_nuxt/error-404.CkhL7nxg.css +1 -0
- package/.output/public/_nuxt/error-500.DNftkU4A.css +1 -0
- package/.output/public/_nuxt/tags.C6gBUbEB.css +1 -0
- package/.output/server/chunks/_/auth2.mjs +3 -3
- package/.output/server/chunks/_/environment.mjs +3 -3
- package/.output/server/chunks/_/error-500.mjs.map +1 -1
- package/.output/server/chunks/_/generation.mjs +3 -3
- package/.output/server/chunks/_/project.mjs +2 -2
- package/.output/server/chunks/_/project.service.mjs +3 -31
- package/.output/server/chunks/_/project.service.mjs.map +1 -1
- package/.output/server/chunks/_/recording.mjs +5 -2
- package/.output/server/chunks/_/recording.mjs.map +1 -1
- package/.output/server/chunks/_/scenario.mjs +4 -2
- package/.output/server/chunks/_/scenario.mjs.map +1 -1
- package/.output/server/chunks/_/scenario2.mjs +22 -5
- package/.output/server/chunks/_/scenario2.mjs.map +1 -1
- package/.output/server/chunks/_/spec-rules.mjs +29 -232
- package/.output/server/chunks/_/spec-rules.mjs.map +1 -1
- package/.output/server/chunks/build/{Alert-Q5hBYuxt.mjs → Alert-WVcujYrW.mjs} +14 -14
- package/.output/server/chunks/build/Alert-WVcujYrW.mjs.map +1 -0
- package/.output/server/chunks/build/{Container-HW0bT_Wn.mjs → Container-C0k092cW.mjs} +4 -4
- package/.output/server/chunks/build/Container-C0k092cW.mjs.map +1 -0
- package/.output/server/chunks/build/{Pagination-FFamqWKD.mjs → Pagination-BXryRfUN.mjs} +4 -4
- package/.output/server/chunks/build/{Pagination-FFamqWKD.mjs.map → Pagination-BXryRfUN.mjs.map} +1 -1
- package/.output/server/chunks/build/{_...scenario_-DNqQ06NM.mjs → _...scenario_-qp56INdQ.mjs} +687 -149
- package/.output/server/chunks/build/_...scenario_-qp56INdQ.mjs.map +1 -0
- package/.output/server/chunks/build/{_slug_-BlLRYU9d.mjs → _slug_-dNDiCabc.mjs} +788 -433
- package/.output/server/chunks/build/_slug_-dNDiCabc.mjs.map +1 -0
- package/.output/server/chunks/build/{error-404-Dzfp7Wik.mjs → error-404-B5fzVPdQ.mjs} +5 -5
- package/.output/server/chunks/build/error-404-B5fzVPdQ.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.C6Lq0aSH.mjs +9 -0
- package/.output/server/chunks/build/error-404-styles.C6Lq0aSH.mjs.map +1 -0
- package/.output/server/chunks/build/{error-500-Df60mzLr.mjs → error-500-Be62wrWs.mjs} +5 -5
- package/.output/server/chunks/build/error-500-Be62wrWs.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.D3b6pwL1.mjs +9 -0
- package/.output/server/chunks/build/error-500-styles.D3b6pwL1.mjs.map +1 -0
- package/.output/server/chunks/build/{origin-_Ab6zkKk.mjs → origin-DFFT7pGA.mjs} +546 -21
- package/.output/server/chunks/build/{origin-_Ab6zkKk.mjs.map → origin-DFFT7pGA.mjs.map} +1 -1
- package/.output/server/chunks/build/{pages-BuW8VoW3.mjs → pages-NkoKH95O.mjs} +35 -37
- package/.output/server/chunks/build/pages-NkoKH95O.mjs.map +1 -0
- package/.output/server/chunks/build/tags-DXumXgr9.mjs +1653 -0
- package/.output/server/chunks/build/tags-DXumXgr9.mjs.map +1 -0
- package/.output/server/chunks/build/telemetria-BaMsUnJ8.mjs +131 -0
- package/.output/server/chunks/build/telemetria-BaMsUnJ8.mjs.map +1 -0
- package/.output/server/chunks/build/timeline-styles.CzOXKr8R.mjs +9 -0
- package/.output/server/chunks/build/timeline-styles.CzOXKr8R.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +618 -377
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/raw/driver-entry.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_slug/auth/record.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_slug/auth/skip.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_slug/auth.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/_slug/auth.put.mjs +1 -1
- package/.output/server/chunks/routes/api/telemetry/report.post.mjs +133 -0
- package/.output/server/chunks/routes/api/telemetry/report.post.mjs.map +1 -0
- package/.output/server/chunks/routes/debug/close-page.post.mjs +40 -0
- package/.output/server/chunks/routes/debug/close-page.post.mjs.map +1 -0
- package/.output/server/chunks/routes/debug/erro-de-telemetria.get.mjs +49 -0
- package/.output/server/chunks/routes/debug/erro-de-telemetria.get.mjs.map +1 -0
- package/.output/server/chunks/routes/debug/replay-decision.post.mjs +43 -0
- package/.output/server/chunks/routes/debug/replay-decision.post.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/routes/renderer.mjs.map +1 -1
- package/.output/server/chunks/routes/runner/video.get.mjs +1 -1
- package/.output/server/chunks/routes/ws.mjs +19 -2
- package/.output/server/chunks/routes/ws.mjs.map +1 -1
- package/.output/server/chunks/virtual/entry.mjs +11755 -11725
- 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 +4 -3
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/bin/splash.mjs +2 -2
- package/dist-ui/driver-entry.js +3 -3
- package/package.json +5 -1
- package/reporters/stream-reporter.cjs +3 -3
- package/.output/public/_nuxt/5GgR1mbX.js +0 -1
- package/.output/public/_nuxt/ANcp5QFz.js +0 -1
- package/.output/public/_nuxt/BEFJRHhA2.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/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/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/CC0OsuIz.js +0 -28
- 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/CTLrtTtn2.js +0 -64
- 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/D-7v7DZs.js +0 -1
- package/.output/public/_nuxt/D4ykC_lY2.js +0 -1
- package/.output/public/_nuxt/D5HF1Z0f2.js +0 -1
- package/.output/public/_nuxt/DDHUGtv32.js +0 -4
- package/.output/public/_nuxt/DEJ3sRrh2.js +0 -1
- package/.output/public/_nuxt/DPM_BYFz2.js +0 -1
- package/.output/public/_nuxt/DXLPf3t6.js +0 -1
- package/.output/public/_nuxt/Dpnaldxf2.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/bf2cb2c6-2ddb-4f64-9777-e314571fd19d.json +0 -1
- package/.output/public/_nuxt/entry.m-nAFUcz.css +0 -2
- package/.output/public/_nuxt/error-404.DopINOT1.css +0 -1
- package/.output/public/_nuxt/error-500.D7goJC9g.css +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/dev/sample-run.webm +0 -0
- package/.output/server/chunks/build/Alert-Q5hBYuxt.mjs.map +0 -1
- package/.output/server/chunks/build/Badge-BgyIJKeU.mjs +0 -394
- package/.output/server/chunks/build/Badge-BgyIJKeU.mjs.map +0 -1
- package/.output/server/chunks/build/Card-DLzZ816u.mjs +0 -144
- package/.output/server/chunks/build/Card-DLzZ816u.mjs.map +0 -1
- package/.output/server/chunks/build/Container-HW0bT_Wn.mjs.map +0 -1
- package/.output/server/chunks/build/_...scenario_-DNqQ06NM.mjs.map +0 -1
- package/.output/server/chunks/build/_slug_-BlLRYU9d.mjs.map +0 -1
- package/.output/server/chunks/build/auth-status-5sNoLTPk.mjs +0 -128
- package/.output/server/chunks/build/auth-status-5sNoLTPk.mjs.map +0 -1
- package/.output/server/chunks/build/auth-status-Bo2gxZ-H.mjs +0 -53
- package/.output/server/chunks/build/auth-status-Bo2gxZ-H.mjs.map +0 -1
- package/.output/server/chunks/build/empty-xO5aD2Ip.mjs +0 -44
- package/.output/server/chunks/build/empty-xO5aD2Ip.mjs.map +0 -1
- package/.output/server/chunks/build/error-404-Dzfp7Wik.mjs.map +0 -1
- package/.output/server/chunks/build/error-404-styles.ByPbpRGS.mjs +0 -9
- package/.output/server/chunks/build/error-404-styles.ByPbpRGS.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-Df60mzLr.mjs.map +0 -1
- package/.output/server/chunks/build/error-500-styles.Dz8enkTW.mjs +0 -9
- package/.output/server/chunks/build/error-500-styles.Dz8enkTW.mjs.map +0 -1
- package/.output/server/chunks/build/generation-warnings-RCB9uLi8.mjs +0 -123
- package/.output/server/chunks/build/generation-warnings-RCB9uLi8.mjs.map +0 -1
- package/.output/server/chunks/build/history-D-mei_D6.mjs +0 -163
- package/.output/server/chunks/build/history-D-mei_D6.mjs.map +0 -1
- package/.output/server/chunks/build/modal-81h_kbj9.mjs +0 -321
- package/.output/server/chunks/build/modal-81h_kbj9.mjs.map +0 -1
- package/.output/server/chunks/build/modal-Cpj-bQgu.mjs +0 -342
- package/.output/server/chunks/build/modal-Cpj-bQgu.mjs.map +0 -1
- package/.output/server/chunks/build/modal-DV_DQ0hO.mjs +0 -659
- package/.output/server/chunks/build/modal-DV_DQ0hO.mjs.map +0 -1
- package/.output/server/chunks/build/pages-BuW8VoW3.mjs.map +0 -1
- package/.output/server/chunks/build/phrases-CSDEYSbZ.mjs +0 -38
- package/.output/server/chunks/build/phrases-CSDEYSbZ.mjs.map +0 -1
- package/.output/server/chunks/build/project-run-filtered-CplHFc5x.mjs +0 -455
- package/.output/server/chunks/build/project-run-filtered-CplHFc5x.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-C7TDC5iA.mjs +0 -135
- package/.output/server/chunks/build/scenario-runs-C7TDC5iA.mjs.map +0 -1
- package/.output/server/chunks/build/scenario-suggestions-CsQg875h.mjs +0 -210
- package/.output/server/chunks/build/scenario-suggestions-CsQg875h.mjs.map +0 -1
- package/.output/server/chunks/build/scenario-test-run-Deg4Qlme.mjs +0 -505
- package/.output/server/chunks/build/scenario-test-run-Deg4Qlme.mjs.map +0 -1
- package/.output/server/chunks/build/steps-CcAjZqHX.mjs +0 -54
- package/.output/server/chunks/build/steps-CcAjZqHX.mjs.map +0 -1
- package/.output/server/chunks/build/tags-DrKY6Ah4.mjs +0 -594
- package/.output/server/chunks/build/tags-DrKY6Ah4.mjs.map +0 -1
- package/.output/server/chunks/build/warnings-D8SWbHw0.mjs +0 -76
- package/.output/server/chunks/build/warnings-D8SWbHw0.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,594 +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-_Ab6zkKk.mjs';
|
|
3
|
-
import { c as codefield_default } from './modal-Cpj-bQgu.mjs';
|
|
4
|
-
import { defineComponent, ref, computed, mergeProps, isRef, unref, useModel, withCtx, createVNode, renderSlot, createTextVNode, toDisplayString, mergeModels, watch, nextTick, useSSRContext } from 'vue';
|
|
5
|
-
import { m as getRequestURL } from '../nitro/nitro.mjs';
|
|
6
|
-
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrRenderClass, ssrRenderList, ssrRenderSlot } from 'vue/server-renderer';
|
|
7
|
-
|
|
8
|
-
//#region node_modules/.pnpm/nuxt@4.5.2_@babel+plugin-syntax-jsx@7.29.7_@babel+core@7.29.7__@babel+plugin-syntax-typ_416b7c14be74ec1137687d64bf90f040/node_modules/nuxt/dist/app/composables/url.js
|
|
9
|
-
/** @since 3.5.0 */
|
|
10
|
-
function useRequestURL(opts) {
|
|
11
|
-
return getRequestURL(useRequestEvent(), opts);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region app/components/webdriver/setup.vue?vue&type=script&setup=true&lang.ts
|
|
15
|
-
var setup_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
16
|
-
__name: "setup",
|
|
17
|
-
__ssrInlineRender: true,
|
|
18
|
-
setup(__props) {
|
|
19
|
-
const os = ref("macos");
|
|
20
|
-
const tabs = [
|
|
21
|
-
{
|
|
22
|
-
label: "macOS",
|
|
23
|
-
value: "macos"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: "Linux",
|
|
27
|
-
value: "linux"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
label: "Windows",
|
|
31
|
-
value: "windows"
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
const route = useRoute();
|
|
35
|
-
const origin = useRequestURL().origin;
|
|
36
|
-
const currentUrl = computed(() => `${origin}${route.fullPath}`);
|
|
37
|
-
const commands = computed(() => ({
|
|
38
|
-
macos: `open -na "Google Chrome" --args --remote-debugging-port=9222 --user-data-dir="$HOME/.acutis/chrome" "${currentUrl.value}"`,
|
|
39
|
-
linux: `google-chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.acutis/chrome" "${currentUrl.value}" &`,
|
|
40
|
-
windows: `Start-Process "chrome" -ArgumentList "--remote-debugging-port=9222","--user-data-dir=$env:USERPROFILE\\.acutis\\chrome","${currentUrl.value}"`
|
|
41
|
-
}));
|
|
42
|
-
const copied = ref(false);
|
|
43
|
-
let copiedTimer;
|
|
44
|
-
async function copy() {
|
|
45
|
-
await (void 0).clipboard.writeText(commands.value[os.value]);
|
|
46
|
-
copied.value = true;
|
|
47
|
-
clearTimeout(copiedTimer);
|
|
48
|
-
copiedTimer = setTimeout(() => {
|
|
49
|
-
copied.value = false;
|
|
50
|
-
}, 2e3);
|
|
51
|
-
}
|
|
52
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
53
|
-
const _component_UTabs = _sfc_main;
|
|
54
|
-
const _component_BaseButtonIcon = icon_default;
|
|
55
|
-
_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>`);
|
|
56
|
-
_push(ssrRenderComponent(_component_UTabs, {
|
|
57
|
-
modelValue: unref(os),
|
|
58
|
-
"onUpdate:modelValue": ($event) => isRef(os) ? os.value = $event : null,
|
|
59
|
-
items: tabs,
|
|
60
|
-
content: false,
|
|
61
|
-
class: "w-full"
|
|
62
|
-
}, null, _parent));
|
|
63
|
-
_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>`);
|
|
64
|
-
_push(ssrRenderComponent(_component_BaseButtonIcon, {
|
|
65
|
-
icon: unref(copied) ? "i-ic-round-check" : "i-ic-round-content-copy",
|
|
66
|
-
label: unref(copied) ? "Copiado!" : "Copiar comando",
|
|
67
|
-
color: "neutral",
|
|
68
|
-
variant: "soft",
|
|
69
|
-
"data-testid": "webdriver-copiar",
|
|
70
|
-
onClick: copy
|
|
71
|
-
}, null, _parent));
|
|
72
|
-
_push(`</div></div>`);
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region app/components/webdriver/setup.vue
|
|
78
|
-
var _sfc_setup$3 = setup_vue_vue_type_script_setup_true_lang_default.setup;
|
|
79
|
-
setup_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
80
|
-
const ssrContext = useSSRContext();
|
|
81
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/webdriver/setup.vue");
|
|
82
|
-
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
83
|
-
};
|
|
84
|
-
var setup_default = Object.assign(setup_vue_vue_type_script_setup_true_lang_default, { __name: "WebdriverSetup" });
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region app/utils/recorder-event.ts
|
|
87
|
-
/** Como o evento chama o elemento, na mesma ordem de fontes do `SpecEmitter` do backend. */
|
|
88
|
-
function target(event) {
|
|
89
|
-
const selectors = event.selectors;
|
|
90
|
-
const clean = (event.label || event.innerText || selectors?.placeholder || selectors?.text || "").replace(/\s+/g, " ").trim();
|
|
91
|
-
return clean === "" ? null : clean;
|
|
92
|
-
}
|
|
93
|
-
/** O alvo entre aspas, separando o que veio da tela do verbo que o descreve. */
|
|
94
|
-
function quoted(what) {
|
|
95
|
-
return `"${what}"`;
|
|
96
|
-
}
|
|
97
|
-
/** O caminho da URL, que é como a execução chama a tela: "/login", ou a página inicial na raiz. */
|
|
98
|
-
function page(event) {
|
|
99
|
-
const url = event.url ?? "";
|
|
100
|
-
try {
|
|
101
|
-
const path = new URL(url, "http://base.test").pathname;
|
|
102
|
-
return path === "/" ? "a página inicial" : quoted(path);
|
|
103
|
-
} catch {
|
|
104
|
-
return url ? quoted(url) : "a página inicial";
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* A frase que descreve o evento gravado, no mesmo vocabulário dos passos da execução
|
|
109
|
-
* ("Clica em Entrar", "Preenche Senha"). A navegação é dita pelo caminho da URL.
|
|
110
|
-
*/
|
|
111
|
-
function describeRecorderEvent(event) {
|
|
112
|
-
const what = target(event);
|
|
113
|
-
switch (event.type) {
|
|
114
|
-
case "navigate": return `Navega para ${page(event)}`;
|
|
115
|
-
case "click": return what ? `Clica em ${quoted(what)}` : "Clica no elemento";
|
|
116
|
-
case "hover": return what ? `Passa o mouse em ${quoted(what)}` : "Passa o mouse no elemento";
|
|
117
|
-
case "fill": {
|
|
118
|
-
const field = what ? quoted(what) : "o campo";
|
|
119
|
-
if (!event.value) return `Preenche ${field}`;
|
|
120
|
-
return `Preenche ${field} com ${event.sensitive ? "••••" : quoted(event.value)}`;
|
|
121
|
-
}
|
|
122
|
-
case "submit": return "Envia o formulário";
|
|
123
|
-
case "assert": return `Confere ${what ? quoted(what) : "o elemento"}`;
|
|
124
|
-
default: return what ?? event.url ?? event.type ?? "";
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region app/components/scenario/review/timeline.vue?vue&type=script&setup=true&lang.ts
|
|
129
|
-
var timeline_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
130
|
-
__name: "timeline",
|
|
131
|
-
__ssrInlineRender: true,
|
|
132
|
-
props: {
|
|
133
|
-
events: {},
|
|
134
|
-
videoSrc: { default: null },
|
|
135
|
-
recordingStartedAt: { default: null }
|
|
136
|
-
},
|
|
137
|
-
setup(__props) {
|
|
138
|
-
ref(null);
|
|
139
|
-
const currentTime = ref(0);
|
|
140
|
-
const eventIcons = {
|
|
141
|
-
navigate: "i-ic-round-public",
|
|
142
|
-
click: "i-ic-round-ads-click",
|
|
143
|
-
fill: "i-ic-round-edit",
|
|
144
|
-
submit: "i-ic-round-send",
|
|
145
|
-
hover: "i-ic-round-mouse",
|
|
146
|
-
assert: "i-ic-round-check-circle"
|
|
147
|
-
};
|
|
148
|
-
function offsetSeconds(event) {
|
|
149
|
-
if (!__props.recordingStartedAt || !event.timestamp) return 0;
|
|
150
|
-
return Math.max(0, (event.timestamp - __props.recordingStartedAt) / 1e3);
|
|
151
|
-
}
|
|
152
|
-
const currentIndex = computed(() => {
|
|
153
|
-
let index = -1;
|
|
154
|
-
__props.events.forEach((event, i) => {
|
|
155
|
-
if (offsetSeconds(event) <= currentTime.value) index = i;
|
|
156
|
-
});
|
|
157
|
-
return index;
|
|
158
|
-
});
|
|
159
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
160
|
-
const _component_UIcon = _sfc_main$2;
|
|
161
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "grid grid-cols-1 gap-6 lg:grid-cols-5" }, _attrs))}>`);
|
|
162
|
-
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"></video>`);
|
|
163
|
-
else _push(`<!---->`);
|
|
164
|
-
_push(`<div class="${ssrRenderClass(__props.videoSrc ? "lg:col-span-2" : "lg:col-span-5")}"><p class="mb-3 font-semibold"> Timeline dos eventos </p><ol class="flex flex-col"><!--[-->`);
|
|
165
|
-
ssrRenderList(__props.events, (event, i) => {
|
|
166
|
-
_push(`<li data-testid="revisao-evento"${ssrRenderAttr("data-current", i === unref(currentIndex) ? "true" : "false")} class="group flex cursor-pointer items-stretch gap-3"><div class="flex flex-col items-center">`);
|
|
167
|
-
_push(ssrRenderComponent(_component_UIcon, {
|
|
168
|
-
name: eventIcons[event.type] ?? "i-ic-round-help-outline",
|
|
169
|
-
class: ["size-5 shrink-0 transition-colors", i <= unref(currentIndex) ? "text-primary" : "text-muted"]
|
|
170
|
-
}, null, _parent));
|
|
171
|
-
if (i < __props.events.length - 1) _push(`<span class="${ssrRenderClass([i < unref(currentIndex) ? "bg-primary" : "bg-accented", "w-px grow transition-colors"])}"></span>`);
|
|
172
|
-
else _push(`<!---->`);
|
|
173
|
-
_push(`</div><div class="pb-4 min-w-0"><p class="${ssrRenderClass([i === unref(currentIndex) ? "font-semibold text-primary" : "text-default", "truncate text-sm transition-colors group-hover:text-highlighted"])}">${ssrInterpolate(unref(describeRecorderEvent)(event))}</p>`);
|
|
174
|
-
if (__props.recordingStartedAt) _push(`<p class="text-xs text-dimmed">${ssrInterpolate(offsetSeconds(event).toFixed(1))}s </p>`);
|
|
175
|
-
else _push(`<!---->`);
|
|
176
|
-
_push(`</div></li>`);
|
|
177
|
-
});
|
|
178
|
-
_push(`<!--]--></ol></div></div>`);
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region app/components/scenario/review/timeline.vue
|
|
184
|
-
var _sfc_setup$2 = timeline_vue_vue_type_script_setup_true_lang_default.setup;
|
|
185
|
-
timeline_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
186
|
-
const ssrContext = useSSRContext();
|
|
187
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/review/timeline.vue");
|
|
188
|
-
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
189
|
-
};
|
|
190
|
-
var timeline_default = Object.assign(timeline_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioReviewTimeline" });
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region app/components/base/confirm.vue?vue&type=script&setup=true&lang.ts
|
|
193
|
-
var confirm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
194
|
-
__name: "confirm",
|
|
195
|
-
__ssrInlineRender: true,
|
|
196
|
-
props: /*@__PURE__*/ mergeModels({
|
|
197
|
-
title: {},
|
|
198
|
-
description: { default: "" },
|
|
199
|
-
confirmLabel: { default: "Confirmar" },
|
|
200
|
-
confirmColor: { default: "primary" },
|
|
201
|
-
confirmTestid: { default: "confirmar" },
|
|
202
|
-
loading: {
|
|
203
|
-
type: Boolean,
|
|
204
|
-
default: false
|
|
205
|
-
}
|
|
206
|
-
}, {
|
|
207
|
-
"open": {
|
|
208
|
-
type: Boolean,
|
|
209
|
-
default: false
|
|
210
|
-
},
|
|
211
|
-
"openModifiers": {}
|
|
212
|
-
}),
|
|
213
|
-
emits: /*@__PURE__*/ mergeModels(["confirm"], ["update:open"]),
|
|
214
|
-
setup(__props, { emit: __emit }) {
|
|
215
|
-
const open = useModel(__props, "open");
|
|
216
|
-
const emit = __emit;
|
|
217
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
218
|
-
const _component_BaseModal = modal_default$1;
|
|
219
|
-
const _component_UButton = _sfc_main$1;
|
|
220
|
-
_push(ssrRenderComponent(_component_BaseModal, mergeProps({
|
|
221
|
-
open: open.value,
|
|
222
|
-
"onUpdate:open": ($event) => open.value = $event,
|
|
223
|
-
title: __props.title
|
|
224
|
-
}, _attrs), {
|
|
225
|
-
body: withCtx((_, _push, _parent, _scopeId) => {
|
|
226
|
-
if (_push) {
|
|
227
|
-
_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}>`);
|
|
228
|
-
ssrRenderSlot(_ctx.$slots, "description", {}, () => {
|
|
229
|
-
_push(`${ssrInterpolate(__props.description)}`);
|
|
230
|
-
}, _push, _parent, _scopeId);
|
|
231
|
-
_push(`</p></div>`);
|
|
232
|
-
} 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)])])])];
|
|
233
|
-
}),
|
|
234
|
-
footer: withCtx((_, _push, _parent, _scopeId) => {
|
|
235
|
-
if (_push) {
|
|
236
|
-
_push(ssrRenderComponent(_component_UButton, {
|
|
237
|
-
label: "Cancelar",
|
|
238
|
-
color: "neutral",
|
|
239
|
-
variant: "ghost",
|
|
240
|
-
"data-testid": "confirmar-cancelar",
|
|
241
|
-
onClick: ($event) => open.value = false
|
|
242
|
-
}, null, _parent, _scopeId));
|
|
243
|
-
_push(ssrRenderComponent(_component_UButton, {
|
|
244
|
-
label: __props.confirmLabel,
|
|
245
|
-
color: __props.confirmColor,
|
|
246
|
-
loading: __props.loading,
|
|
247
|
-
"data-testid": __props.confirmTestid,
|
|
248
|
-
onClick: ($event) => emit("confirm")
|
|
249
|
-
}, null, _parent, _scopeId));
|
|
250
|
-
} else return [createVNode(_component_UButton, {
|
|
251
|
-
label: "Cancelar",
|
|
252
|
-
color: "neutral",
|
|
253
|
-
variant: "ghost",
|
|
254
|
-
"data-testid": "confirmar-cancelar",
|
|
255
|
-
onClick: ($event) => open.value = false
|
|
256
|
-
}, null, 8, ["onClick"]), createVNode(_component_UButton, {
|
|
257
|
-
label: __props.confirmLabel,
|
|
258
|
-
color: __props.confirmColor,
|
|
259
|
-
loading: __props.loading,
|
|
260
|
-
"data-testid": __props.confirmTestid,
|
|
261
|
-
onClick: ($event) => emit("confirm")
|
|
262
|
-
}, null, 8, [
|
|
263
|
-
"label",
|
|
264
|
-
"color",
|
|
265
|
-
"loading",
|
|
266
|
-
"data-testid",
|
|
267
|
-
"onClick"
|
|
268
|
-
])];
|
|
269
|
-
}),
|
|
270
|
-
_: 3
|
|
271
|
-
}, _parent));
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
//#endregion
|
|
276
|
-
//#region app/components/base/confirm.vue
|
|
277
|
-
var _sfc_setup$1 = confirm_vue_vue_type_script_setup_true_lang_default.setup;
|
|
278
|
-
confirm_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
279
|
-
const ssrContext = useSSRContext();
|
|
280
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/base/confirm.vue");
|
|
281
|
-
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
282
|
-
};
|
|
283
|
-
var confirm_default = Object.assign(confirm_vue_vue_type_script_setup_true_lang_default, { __name: "BaseConfirm" });
|
|
284
|
-
/** O nome de arquivo que um título vira. Acompanha o `Str::slug` que o backend aplica ao gravar. */
|
|
285
|
-
function slugify(value) {
|
|
286
|
-
return value.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 80).replace(/^-+|-+$/g, "");
|
|
287
|
-
}
|
|
288
|
-
function draftFromScenario(scenario) {
|
|
289
|
-
const parts = scenario.spec.replace(/^tests\//, "").replace(/\.spec\.ts$/, "").split("/");
|
|
290
|
-
return {
|
|
291
|
-
title: scenario.title,
|
|
292
|
-
path: parts.at(-1),
|
|
293
|
-
domain: parts.length > 1 ? parts.slice(0, -1).join("/") : "",
|
|
294
|
-
tags: scenario.tags,
|
|
295
|
-
gherkin: scenario.gherkin ?? "",
|
|
296
|
-
playwright: scenario.playwright
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region app/components/scenario/review/contexts.vue?vue&type=script&setup=true&lang.ts
|
|
301
|
-
var contexts_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
302
|
-
__name: "contexts",
|
|
303
|
-
__ssrInlineRender: true,
|
|
304
|
-
props: /*@__PURE__*/ mergeModels({
|
|
305
|
-
isAuth: {
|
|
306
|
-
type: Boolean,
|
|
307
|
-
default: false
|
|
308
|
-
},
|
|
309
|
-
novo: {
|
|
310
|
-
type: Boolean,
|
|
311
|
-
default: false
|
|
312
|
-
}
|
|
313
|
-
}, {
|
|
314
|
-
"draft": { required: true },
|
|
315
|
-
"draftModifiers": {}
|
|
316
|
-
}),
|
|
317
|
-
emits: ["update:draft"],
|
|
318
|
-
setup(__props) {
|
|
319
|
-
const draft = useModel(__props, "draft");
|
|
320
|
-
function tagsFromLine(line) {
|
|
321
|
-
return line.match(/@[\w-]+/g) ?? [];
|
|
322
|
-
}
|
|
323
|
-
function tagsFromGherkin(gherkin) {
|
|
324
|
-
const firstLine = gherkin.split("\n")[0] ?? "";
|
|
325
|
-
return firstLine.trim().startsWith("@") ? tagsFromLine(firstLine) : [];
|
|
326
|
-
}
|
|
327
|
-
function tagsFromPlaywright(playwright) {
|
|
328
|
-
const match = playwright.match(/tag:\s*\[([^\]]*)\]/);
|
|
329
|
-
return match ? tagsFromLine(match[1]) : [];
|
|
330
|
-
}
|
|
331
|
-
function stampGherkinTags(gherkin, tags) {
|
|
332
|
-
if (!gherkin.trim()) return gherkin;
|
|
333
|
-
const lines = gherkin.split("\n");
|
|
334
|
-
if (lines[0]?.trim().startsWith("@")) lines.shift();
|
|
335
|
-
const body = lines.join("\n");
|
|
336
|
-
return tags.length ? `${tags.join(" ")}\n${body}` : body;
|
|
337
|
-
}
|
|
338
|
-
function stampPlaywrightTags(playwright, tags) {
|
|
339
|
-
if (!tags.length) return playwright;
|
|
340
|
-
const list = `tag: [${tags.map((t) => `'${t}'`).join(", ")}]`;
|
|
341
|
-
if (/tag:\s*\[[^\]]*\]/.test(playwright)) return playwright.replace(/tag:\s*\[[^\]]*\]/, list);
|
|
342
|
-
return playwright.replace(/test\.describe\(\s*((["']).+?\2)\s*,\s*(?=\(|async)/, `test.describe($1, { ${list} }, `);
|
|
343
|
-
}
|
|
344
|
-
let syncing = false;
|
|
345
|
-
function applyTags(tags) {
|
|
346
|
-
syncing = true;
|
|
347
|
-
draft.value = {
|
|
348
|
-
...draft.value,
|
|
349
|
-
tags,
|
|
350
|
-
gherkin: stampGherkinTags(draft.value.gherkin, tags),
|
|
351
|
-
playwright: stampPlaywrightTags(draft.value.playwright, tags)
|
|
352
|
-
};
|
|
353
|
-
nextTick(() => {
|
|
354
|
-
syncing = false;
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
const tagsText = computed({
|
|
358
|
-
get: () => draft.value.tags.join(" "),
|
|
359
|
-
set: (value) => applyTags(tagsFromLine(value))
|
|
360
|
-
});
|
|
361
|
-
watch(() => draft.value.gherkin, (gherkin) => {
|
|
362
|
-
if (syncing) return;
|
|
363
|
-
const tags = tagsFromGherkin(gherkin);
|
|
364
|
-
if (tags.length && tags.join(" ") !== draft.value.tags.join(" ")) applyTags(tags);
|
|
365
|
-
});
|
|
366
|
-
watch(() => draft.value.playwright, (playwright) => {
|
|
367
|
-
if (syncing) return;
|
|
368
|
-
const tags = tagsFromPlaywright(playwright);
|
|
369
|
-
if (tags.length && tags.join(" ") !== draft.value.tags.join(" ")) applyTags(tags);
|
|
370
|
-
});
|
|
371
|
-
/** No cenário novo o arquivo espelha o título, enquanto ninguém o tiver editado à mão. */
|
|
372
|
-
watch(() => draft.value.title, (title, previous) => {
|
|
373
|
-
if (!__props.novo || draft.value.path !== slugify(previous)) return;
|
|
374
|
-
draft.value = {
|
|
375
|
-
...draft.value,
|
|
376
|
-
path: slugify(title)
|
|
377
|
-
};
|
|
378
|
-
});
|
|
379
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
380
|
-
const _component_UFormField = _sfc_main$8;
|
|
381
|
-
const _component_UInput = _sfc_main$6;
|
|
382
|
-
const _component_BaseCodefield = codefield_default;
|
|
383
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-col gap-5" }, _attrs))}><div class="grid grid-cols-1 gap-4 sm:grid-cols-2">`);
|
|
384
|
-
_push(ssrRenderComponent(_component_UFormField, { label: "Título do cenário" }, {
|
|
385
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
386
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
387
|
-
modelValue: draft.value.title,
|
|
388
|
-
"onUpdate:modelValue": ($event) => draft.value.title = $event,
|
|
389
|
-
maxlength: unref(120),
|
|
390
|
-
"data-testid": "contexto-titulo",
|
|
391
|
-
class: "w-full"
|
|
392
|
-
}, null, _parent, _scopeId));
|
|
393
|
-
else return [createVNode(_component_UInput, {
|
|
394
|
-
modelValue: draft.value.title,
|
|
395
|
-
"onUpdate:modelValue": ($event) => draft.value.title = $event,
|
|
396
|
-
maxlength: unref(120),
|
|
397
|
-
"data-testid": "contexto-titulo",
|
|
398
|
-
class: "w-full"
|
|
399
|
-
}, null, 8, [
|
|
400
|
-
"modelValue",
|
|
401
|
-
"onUpdate:modelValue",
|
|
402
|
-
"maxlength"
|
|
403
|
-
])];
|
|
404
|
-
}),
|
|
405
|
-
_: 1
|
|
406
|
-
}, _parent));
|
|
407
|
-
if (!__props.isAuth) _push(ssrRenderComponent(_component_UFormField, {
|
|
408
|
-
label: "Arquivo",
|
|
409
|
-
help: "Nome do .spec.ts / .feature"
|
|
410
|
-
}, {
|
|
411
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
412
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
413
|
-
modelValue: draft.value.path,
|
|
414
|
-
"onUpdate:modelValue": ($event) => draft.value.path = $event,
|
|
415
|
-
maxlength: unref(80),
|
|
416
|
-
"data-testid": "contexto-path",
|
|
417
|
-
class: "w-full"
|
|
418
|
-
}, null, _parent, _scopeId));
|
|
419
|
-
else return [createVNode(_component_UInput, {
|
|
420
|
-
modelValue: draft.value.path,
|
|
421
|
-
"onUpdate:modelValue": ($event) => draft.value.path = $event,
|
|
422
|
-
maxlength: unref(80),
|
|
423
|
-
"data-testid": "contexto-path",
|
|
424
|
-
class: "w-full"
|
|
425
|
-
}, null, 8, [
|
|
426
|
-
"modelValue",
|
|
427
|
-
"onUpdate:modelValue",
|
|
428
|
-
"maxlength"
|
|
429
|
-
])];
|
|
430
|
-
}),
|
|
431
|
-
_: 1
|
|
432
|
-
}, _parent));
|
|
433
|
-
else _push(`<!---->`);
|
|
434
|
-
_push(`</div>`);
|
|
435
|
-
if (!__props.isAuth) _push(ssrRenderComponent(_component_UFormField, {
|
|
436
|
-
label: "Domínio",
|
|
437
|
-
help: "Pasta onde o cenário será salvo (ex.: login, checkout)"
|
|
438
|
-
}, {
|
|
439
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
440
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
441
|
-
modelValue: draft.value.domain,
|
|
442
|
-
"onUpdate:modelValue": ($event) => draft.value.domain = $event,
|
|
443
|
-
maxlength: unref(80),
|
|
444
|
-
"data-testid": "contexto-dominio",
|
|
445
|
-
class: "w-full"
|
|
446
|
-
}, null, _parent, _scopeId));
|
|
447
|
-
else return [createVNode(_component_UInput, {
|
|
448
|
-
modelValue: draft.value.domain,
|
|
449
|
-
"onUpdate:modelValue": ($event) => draft.value.domain = $event,
|
|
450
|
-
maxlength: unref(80),
|
|
451
|
-
"data-testid": "contexto-dominio",
|
|
452
|
-
class: "w-full"
|
|
453
|
-
}, null, 8, [
|
|
454
|
-
"modelValue",
|
|
455
|
-
"onUpdate:modelValue",
|
|
456
|
-
"maxlength"
|
|
457
|
-
])];
|
|
458
|
-
}),
|
|
459
|
-
_: 1
|
|
460
|
-
}, _parent));
|
|
461
|
-
else _push(`<!---->`);
|
|
462
|
-
if (!__props.isAuth) _push(ssrRenderComponent(_component_UFormField, {
|
|
463
|
-
label: "Tags",
|
|
464
|
-
help: "Separadas por espaço (ex.: @read @criando)"
|
|
465
|
-
}, {
|
|
466
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
467
|
-
if (_push) _push(ssrRenderComponent(_component_UInput, {
|
|
468
|
-
modelValue: unref(tagsText),
|
|
469
|
-
"onUpdate:modelValue": ($event) => isRef(tagsText) ? tagsText.value = $event : null,
|
|
470
|
-
"data-testid": "contexto-tags",
|
|
471
|
-
class: "w-full"
|
|
472
|
-
}, null, _parent, _scopeId));
|
|
473
|
-
else return [createVNode(_component_UInput, {
|
|
474
|
-
modelValue: unref(tagsText),
|
|
475
|
-
"onUpdate:modelValue": ($event) => isRef(tagsText) ? tagsText.value = $event : null,
|
|
476
|
-
"data-testid": "contexto-tags",
|
|
477
|
-
class: "w-full"
|
|
478
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])];
|
|
479
|
-
}),
|
|
480
|
-
_: 1
|
|
481
|
-
}, _parent));
|
|
482
|
-
else _push(`<!---->`);
|
|
483
|
-
_push(ssrRenderComponent(_component_UFormField, { label: "Cenário (Gherkin)" }, {
|
|
484
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
485
|
-
if (_push) _push(ssrRenderComponent(_component_BaseCodefield, {
|
|
486
|
-
modelValue: draft.value.gherkin,
|
|
487
|
-
"onUpdate:modelValue": ($event) => draft.value.gherkin = $event,
|
|
488
|
-
language: "gherkin",
|
|
489
|
-
testid: "contexto-cenario"
|
|
490
|
-
}, null, _parent, _scopeId));
|
|
491
|
-
else return [createVNode(_component_BaseCodefield, {
|
|
492
|
-
modelValue: draft.value.gherkin,
|
|
493
|
-
"onUpdate:modelValue": ($event) => draft.value.gherkin = $event,
|
|
494
|
-
language: "gherkin",
|
|
495
|
-
testid: "contexto-cenario"
|
|
496
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])];
|
|
497
|
-
}),
|
|
498
|
-
_: 1
|
|
499
|
-
}, _parent));
|
|
500
|
-
_push(ssrRenderComponent(_component_UFormField, { label: "Teste (Playwright)" }, {
|
|
501
|
-
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
502
|
-
if (_push) _push(ssrRenderComponent(_component_BaseCodefield, {
|
|
503
|
-
modelValue: draft.value.playwright,
|
|
504
|
-
"onUpdate:modelValue": ($event) => draft.value.playwright = $event,
|
|
505
|
-
language: "typescript",
|
|
506
|
-
testid: "contexto-teste"
|
|
507
|
-
}, null, _parent, _scopeId));
|
|
508
|
-
else return [createVNode(_component_BaseCodefield, {
|
|
509
|
-
modelValue: draft.value.playwright,
|
|
510
|
-
"onUpdate:modelValue": ($event) => draft.value.playwright = $event,
|
|
511
|
-
language: "typescript",
|
|
512
|
-
testid: "contexto-teste"
|
|
513
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])];
|
|
514
|
-
}),
|
|
515
|
-
_: 1
|
|
516
|
-
}, _parent));
|
|
517
|
-
_push(`</div>`);
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
});
|
|
521
|
-
//#endregion
|
|
522
|
-
//#region app/components/scenario/review/contexts.vue
|
|
523
|
-
var _sfc_setup = contexts_vue_vue_type_script_setup_true_lang_default.setup;
|
|
524
|
-
contexts_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
525
|
-
const ssrContext = useSSRContext();
|
|
526
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/review/contexts.vue");
|
|
527
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
528
|
-
};
|
|
529
|
-
var contexts_default = Object.assign(contexts_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioReviewContexts" });
|
|
530
|
-
//#endregion
|
|
531
|
-
//#region app/composables/webdriver.ts
|
|
532
|
-
var socket = null;
|
|
533
|
-
function useWebdriver() {
|
|
534
|
-
const state = useState("webdriver", () => ({
|
|
535
|
-
connected: false,
|
|
536
|
-
extensionReady: false,
|
|
537
|
-
recording: false,
|
|
538
|
-
error: null,
|
|
539
|
-
events: [],
|
|
540
|
-
videoSessionId: null,
|
|
541
|
-
recordingStartedAt: null,
|
|
542
|
-
storageState: null
|
|
543
|
-
}));
|
|
544
|
-
const url = "";
|
|
545
|
-
function send(type, payload = {}) {
|
|
546
|
-
if (void 0 === WebSocket.OPEN) socket.send(JSON.stringify({
|
|
547
|
-
type,
|
|
548
|
-
...payload
|
|
549
|
-
}));
|
|
550
|
-
}
|
|
551
|
-
function ensureConnected() {}
|
|
552
|
-
function startRecording(mode = "scenario", options = {}) {
|
|
553
|
-
state.value.error = null;
|
|
554
|
-
state.value.events = [];
|
|
555
|
-
state.value.videoSessionId = null;
|
|
556
|
-
state.value.storageState = null;
|
|
557
|
-
state.value.recording = true;
|
|
558
|
-
send("START_RECORDING", {
|
|
559
|
-
mode,
|
|
560
|
-
...options
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
function stopRecording() {
|
|
564
|
-
send("STOP_RECORDING");
|
|
565
|
-
state.value.recording = false;
|
|
566
|
-
}
|
|
567
|
-
return {
|
|
568
|
-
state,
|
|
569
|
-
url,
|
|
570
|
-
ensureConnected,
|
|
571
|
-
startRecording,
|
|
572
|
-
stopRecording
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
/** A origem em que a gravação começou, que é a URL base que o backend precisa para escrever o teste. */
|
|
576
|
-
function eventsBaseUrl(events) {
|
|
577
|
-
const first = events.find((event) => event.url);
|
|
578
|
-
if (!first?.url) return null;
|
|
579
|
-
try {
|
|
580
|
-
return new URL(first.url).origin;
|
|
581
|
-
} catch {
|
|
582
|
-
return null;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
//#endregion
|
|
586
|
-
//#region app/utils/tags.ts
|
|
587
|
-
function tagColor(tag) {
|
|
588
|
-
if (tag === "@read") return "success";
|
|
589
|
-
if (tag === "@write") return "warning";
|
|
590
|
-
return "primary";
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
export { timeline_default as a, contexts_default as b, confirm_default as c, draftFromScenario as d, eventsBaseUrl as e, setup_default as s, tagColor as t, useWebdriver as u };
|
|
594
|
-
//# sourceMappingURL=tags-DrKY6Ah4.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags-DrKY6Ah4.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_416b7c14be74ec1137687d64bf90f040/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]}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { e as _sfc_main$1 } from '../virtual/entry.mjs';
|
|
2
|
-
import { _ as _sfc_main } from './Alert-Q5hBYuxt.mjs';
|
|
3
|
-
import { defineComponent, computed, mergeProps, withCtx, unref, createVNode, openBlock, createBlock, Fragment, renderList, toDisplayString, createCommentVNode, useSSRContext } from 'vue';
|
|
4
|
-
import { ssrRenderComponent, ssrRenderList, ssrInterpolate } from 'vue/server-renderer';
|
|
5
|
-
|
|
6
|
-
//#region app/components/scenario/warnings.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var EMPTY_VAR = "env-sem-valor";
|
|
8
|
-
/** O texto da ressalva, sem o slug da regra que o backend prefixa. */
|
|
9
|
-
var warnings_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
10
|
-
__name: "warnings",
|
|
11
|
-
__ssrInlineRender: true,
|
|
12
|
-
props: {
|
|
13
|
-
warnings: { default: () => [] },
|
|
14
|
-
slug: {}
|
|
15
|
-
},
|
|
16
|
-
setup(__props) {
|
|
17
|
-
const reasons = computed(() => __props.warnings.map((warning) => warning.replace(/^[a-z-]+: /, "")));
|
|
18
|
-
const fillable = computed(() => __props.warnings.some((warning) => warning.startsWith(EMPTY_VAR)));
|
|
19
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
20
|
-
const _component_UAlert = _sfc_main;
|
|
21
|
-
const _component_UButton = _sfc_main$1;
|
|
22
|
-
if (__props.warnings.length) _push(ssrRenderComponent(_component_UAlert, mergeProps({
|
|
23
|
-
color: "warning",
|
|
24
|
-
variant: "soft",
|
|
25
|
-
icon: "i-ic-round-warning",
|
|
26
|
-
title: "A geração terminou com ressalvas",
|
|
27
|
-
"data-testid": "geracao-ressalvas"
|
|
28
|
-
}, _attrs), {
|
|
29
|
-
description: withCtx((_, _push, _parent, _scopeId) => {
|
|
30
|
-
if (_push) {
|
|
31
|
-
_push(`<ul class="list-disc pl-4"${_scopeId}><!--[-->`);
|
|
32
|
-
ssrRenderList(unref(reasons), (reason) => {
|
|
33
|
-
_push(`<li${_scopeId}>${ssrInterpolate(reason)}</li>`);
|
|
34
|
-
});
|
|
35
|
-
_push(`<!--]--></ul>`);
|
|
36
|
-
if (unref(fillable)) _push(ssrRenderComponent(_component_UButton, {
|
|
37
|
-
label: "Preencher ambiente",
|
|
38
|
-
"trailing-icon": "i-ic-round-arrow-forward",
|
|
39
|
-
color: "warning",
|
|
40
|
-
variant: "link",
|
|
41
|
-
class: "mt-1 px-0",
|
|
42
|
-
to: `/projects/${__props.slug}?environment`,
|
|
43
|
-
"data-testid": "ressalvas-ambiente"
|
|
44
|
-
}, null, _parent, _scopeId));
|
|
45
|
-
else _push(`<!---->`);
|
|
46
|
-
} else return [createVNode("ul", { class: "list-disc pl-4" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(reasons), (reason) => {
|
|
47
|
-
return openBlock(), createBlock("li", { key: reason }, toDisplayString(reason), 1);
|
|
48
|
-
}), 128))]), unref(fillable) ? (openBlock(), createBlock(_component_UButton, {
|
|
49
|
-
key: 0,
|
|
50
|
-
label: "Preencher ambiente",
|
|
51
|
-
"trailing-icon": "i-ic-round-arrow-forward",
|
|
52
|
-
color: "warning",
|
|
53
|
-
variant: "link",
|
|
54
|
-
class: "mt-1 px-0",
|
|
55
|
-
to: `/projects/${__props.slug}?environment`,
|
|
56
|
-
"data-testid": "ressalvas-ambiente"
|
|
57
|
-
}, null, 8, ["to"])) : createCommentVNode("", true)];
|
|
58
|
-
}),
|
|
59
|
-
_: 1
|
|
60
|
-
}, _parent));
|
|
61
|
-
else _push(`<!---->`);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region app/components/scenario/warnings.vue
|
|
67
|
-
var _sfc_setup = warnings_vue_vue_type_script_setup_true_lang_default.setup;
|
|
68
|
-
warnings_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
69
|
-
const ssrContext = useSSRContext();
|
|
70
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/warnings.vue");
|
|
71
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
72
|
-
};
|
|
73
|
-
var warnings_default = Object.assign(warnings_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioWarnings" });
|
|
74
|
-
|
|
75
|
-
export { warnings_default as w };
|
|
76
|
-
//# sourceMappingURL=warnings-D8SWbHw0.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"warnings-D8SWbHw0.mjs","sources":["../../../../app/components/scenario/warnings.vue"],"names":[],"mappings":";;;;;;AAWA,IAAM,SAAA,GAAY,eAAA;;;;;;;;;;EAGlB,MAAM,OAAA,GAAU,QAAA,CAAA,MAAe,OAAA,CAAA,QAAA,CAAS,GAAA,CAAA,CAAI,OAAA,KAAW,OAAA,CAAQ,OAAA,CAAQ,YAAA,EAAc,EAAE,CAAC,CAAC,CAAA;EAEzF,MAAM,QAAA,GAAW,QAAA,CAAA,MAAe,OAAA,CAAA,QAAA,CAAS,IAAA,CAAA,CAAK,YAAW,OAAA,CAAQ,UAAA,CAAW,SAAS,CAAC,CAAC,CAAA;;;;AAK7E,GAAA,IAAA,QAAA,QAAA,CAAS,MAAA,EAAA,KAAA,CAAA,kBAAA,CAAA,mBAAA,UAAA,CAAA;IACf,KAAA,EAAM,SAAA;IACN,OAAA,EAAQ,MAAA;IACR,IAAA,EAAK,oBAAA;IACL,KAAA,EAAM,kCAAA;IACN,aAAA,EAAY;;AAED,IAAA,WAAA,EAAW,OAAA,CAAA,CAoBX,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;;;MAjBY,aAAA,CAAA,KAAA,CAAA,OAAA,CAAA,EAAA,CAAV,MAAA,KAAM;AAGV,OAAA,KAAA,CAAA,MAAA,QAAA,CAAA,CAAA,EAAA,cAAA,CAAA,MAAM,EAAA,KAAA,CAAA,CAAA;;;AAKL,MAAA,IAAA,KAAA,CAAA,QAAA,CAAA,EAAA,KAAA,CAAA,mBAAA,kBAAA,EAAA;OACN,KAAA,EAAM,oBAAA;OACN,eAAA,EAAc,0BAAA;OACd,KAAA,EAAM,SAAA;OACN,OAAA,EAAQ,MAAA;OACR,KAAA,EAAM,WAAA;OACL,EAAA,EAAE,CAAA,UAAA,EAAe,QAAA,IAAA,CAAI,YAAA,CAAA;OACtB,aAAA,EAAY;;;AAjBd,KAAA,CAAA,MAAA,OAAA,CAAA,WAAA,CAOK,MAAA,EAPD,KAAA,EAAM,kBAAgB,EAAA,EACxB,UAAA,IAAA,CAAA,EAAA,YAKK,QAAA,EAAA,IAAA,EAAA,WAJc,KAAA,CAAA,OAAA,IAAV,MAAA,KAAM;MADf,OAAA,SAAA,EAAA,EAAA,WAAA,CAKK,IAAA,EAAA,EAHF,GAAA,EAAK,MAAA,EAAM,EAAA,eAAA,CAET,MAAM,CAAA,EAAA,CAAA,CAAA;KAKL,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,CAAA,EAAA,KAAA,CAAA,QAAA,CAAA,IADR,SAAA,EAAA,EAAA,WAAA,CASE,kBAAA,EAAA;;MAPA,KAAA,EAAM,oBAAA;MACN,eAAA,EAAc,0BAAA;MACd,KAAA,EAAM,SAAA;MACN,OAAA,EAAQ,MAAA;MACR,KAAA,EAAM,WAAA;MACL,EAAA,EAAE,CAAA,UAAA,EAAe,QAAA,IAAA,CAAI,YAAA,CAAA;MACtB,aAAA,EAAY;;;;;;;;;;;;;;;;;;;;;"}
|