@acutis/cli 0.1.2 → 0.2.0-dev.23
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/bcd56d50-e1a9-4021-b9df-ab200a81246a.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 +608 -367
- 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
package/.output/server/chunks/build/{_...scenario_-DNqQ06NM.mjs → _...scenario_-qp56INdQ.mjs}
RENAMED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as projectOrigin, _ as _sfc_main$
|
|
3
|
-
import { _ as _sfc_main } from './
|
|
4
|
-
import { _ as _sfc_main
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { w as warnings_default } from './warnings-D8SWbHw0.mjs';
|
|
8
|
-
import { p as phrases_default } from './phrases-CSDEYSbZ.mjs';
|
|
9
|
-
import { u as useRunStream, v as videoUrlFor, f as formatTestedAt } from './run-stream-CNVDpZ_S.mjs';
|
|
10
|
-
import { e as empty_default } from './empty-xO5aD2Ip.mjs';
|
|
11
|
-
import { h as history_default } from './history-D-mei_D6.mjs';
|
|
12
|
-
import { m as modal_default$2 } from './modal-81h_kbj9.mjs';
|
|
13
|
-
import { c as codefield_default, m as modal_default$3 } from './modal-Cpj-bQgu.mjs';
|
|
14
|
-
import { u as useWebdriver, e as eventsBaseUrl, t as tagColor, s as setup_default, a as timeline_default, c as confirm_default, d as draftFromScenario, b as contexts_default } from './tags-DrKY6Ah4.mjs';
|
|
1
|
+
import { f as useRoute, g as useFetch, h as createError$1, i as useAi, $ as $fetch$1, j as extractServerError, k as icon_default, l as _sfc_main$7, A as AI_OFF_HINT, _ as _sfc_main$1, e as _sfc_main$5, n as navigateTo, m as _sfc_main$4, o as _sfc_main$6, p as modal_default$4, q as _sfc_main$1$2 } from '../virtual/entry.mjs';
|
|
2
|
+
import { p as projectOrigin, _ as _sfc_main$2, a as _sfc_main$1$1, b as _sfc_main$8 } from './origin-DFFT7pGA.mjs';
|
|
3
|
+
import { _ as _sfc_main$9 } from './Pagination-BXryRfUN.mjs';
|
|
4
|
+
import { _ as _sfc_main } from './Container-C0k092cW.mjs';
|
|
5
|
+
import { _ as _sfc_main$3 } from './Alert-WVcujYrW.mjs';
|
|
6
|
+
import { u as useRunStream, a as useWebdriver, t as tagColor, w as warnings_default, s as setup_default, e as empty_default, b as timeline_default, c as codefield_default, d as confirm_default, m as modal_default$1$1, f as modal_default$3, v as videoUrlFor, g as formatTestedAt, h as draftFromScenario, i as contexts_default, p as phrases_default } from './tags-DXumXgr9.mjs';
|
|
15
7
|
import { defineComponent, computed, ref, withAsyncContext, watch, mergeProps, unref, withCtx, createVNode, isRef, toDisplayString, createTextVNode, openBlock, createBlock, createCommentVNode, Fragment, renderList, useModel, mergeModels, useSSRContext } from 'vue';
|
|
16
|
-
import { ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderAttr } from 'vue/server-renderer';
|
|
8
|
+
import { ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderAttr, ssrRenderAttrs } from 'vue/server-renderer';
|
|
17
9
|
import 'unhead/plugins';
|
|
18
10
|
import 'unhead/utils';
|
|
19
11
|
import '../routes/renderer.mjs';
|
|
@@ -57,19 +49,217 @@ import 'devalue';
|
|
|
57
49
|
import 'fnv1a-64';
|
|
58
50
|
import 'object-identity';
|
|
59
51
|
import 'tailwindcss/colors';
|
|
60
|
-
import './Pagination-FFamqWKD.mjs';
|
|
61
|
-
import './Card-DLzZ816u.mjs';
|
|
62
|
-
import './steps-CcAjZqHX.mjs';
|
|
63
52
|
import './_plugin-vue_export-helper-BOaGB7Aw.mjs';
|
|
64
53
|
import 'prismjs';
|
|
65
54
|
|
|
55
|
+
//#region app/components/scenario/auth-status.vue?vue&type=script&setup=true&lang.ts
|
|
56
|
+
var auth_status_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
57
|
+
__name: "auth-status",
|
|
58
|
+
__ssrInlineRender: true,
|
|
59
|
+
props: { status: {} },
|
|
60
|
+
setup(__props) {
|
|
61
|
+
/** Null em `unset`: aí quem conta o estado é o convite a gravar, e o badge só repetiria. */
|
|
62
|
+
const badge = computed(() => ({
|
|
63
|
+
configured: {
|
|
64
|
+
label: "Configurada",
|
|
65
|
+
icon: "i-ic-round-lock",
|
|
66
|
+
color: "success"
|
|
67
|
+
},
|
|
68
|
+
failing: {
|
|
69
|
+
label: "Falhando",
|
|
70
|
+
icon: "i-ic-round-error",
|
|
71
|
+
color: "error"
|
|
72
|
+
},
|
|
73
|
+
skipped: {
|
|
74
|
+
label: "Dispensada",
|
|
75
|
+
icon: "i-ic-round-lock-open",
|
|
76
|
+
color: "neutral"
|
|
77
|
+
}
|
|
78
|
+
})[__props.status] ?? null);
|
|
79
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
80
|
+
const _component_UBadge = _sfc_main$2;
|
|
81
|
+
if (unref(badge)) _push(ssrRenderComponent(_component_UBadge, mergeProps({
|
|
82
|
+
variant: "soft",
|
|
83
|
+
icon: unref(badge).icon,
|
|
84
|
+
color: unref(badge).color,
|
|
85
|
+
label: unref(badge).label,
|
|
86
|
+
"data-testid": "cenario-auth-status"
|
|
87
|
+
}, _attrs), null, _parent));
|
|
88
|
+
else _push(`<!---->`);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region app/components/scenario/auth-status.vue
|
|
94
|
+
var _sfc_setup$7 = auth_status_vue_vue_type_script_setup_true_lang_default.setup;
|
|
95
|
+
auth_status_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
96
|
+
const ssrContext = useSSRContext();
|
|
97
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/auth-status.vue");
|
|
98
|
+
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
99
|
+
};
|
|
100
|
+
var auth_status_default = Object.assign(auth_status_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioAuthStatus" });
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region app/components/scenario/test-run/history.vue?vue&type=script&setup=true&lang.ts
|
|
103
|
+
var PAGE_SIZE = 6;
|
|
104
|
+
var history_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
105
|
+
__name: "history",
|
|
106
|
+
__ssrInlineRender: true,
|
|
107
|
+
props: { runs: { default: () => [] } },
|
|
108
|
+
emits: ["open"],
|
|
109
|
+
setup(__props, { emit: __emit }) {
|
|
110
|
+
const emit = __emit;
|
|
111
|
+
const statusItems = [
|
|
112
|
+
{
|
|
113
|
+
label: "Todos",
|
|
114
|
+
value: "todos"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
label: "Sucesso",
|
|
118
|
+
value: "sucesso"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: "Falha",
|
|
122
|
+
value: "falha"
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
const search = ref("");
|
|
126
|
+
const status = ref("todos");
|
|
127
|
+
const page = ref(1);
|
|
128
|
+
function testedAt(run) {
|
|
129
|
+
return new Date(run.started_at).toLocaleString("pt-BR", {
|
|
130
|
+
dateStyle: "short",
|
|
131
|
+
timeStyle: "short"
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function took(run) {
|
|
135
|
+
return `${(run.duration_ms / 1e3).toLocaleString("pt-BR", { maximumFractionDigits: 1 })}s`;
|
|
136
|
+
}
|
|
137
|
+
/** O que a busca varre numa execução: data, branch, autor e o título do step que falhou. */
|
|
138
|
+
function searchable(run) {
|
|
139
|
+
return [
|
|
140
|
+
testedAt(run),
|
|
141
|
+
run.branch,
|
|
142
|
+
run.author,
|
|
143
|
+
...run.steps.filter((step) => step.status === "failed").map((step) => step.title)
|
|
144
|
+
].join(" ").toLowerCase();
|
|
145
|
+
}
|
|
146
|
+
const filtered = computed(() => __props.runs.filter((run) => {
|
|
147
|
+
return (status.value === "todos" || status.value === "sucesso" === run.passed) && searchable(run).includes(search.value.trim().toLowerCase());
|
|
148
|
+
}));
|
|
149
|
+
const paginated = computed(() => filtered.value.slice((page.value - 1) * PAGE_SIZE, page.value * PAGE_SIZE));
|
|
150
|
+
watch([search, status], () => {
|
|
151
|
+
page.value = 1;
|
|
152
|
+
});
|
|
153
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
154
|
+
const _component_BaseEmpty = empty_default;
|
|
155
|
+
const _component_UInput = _sfc_main$4;
|
|
156
|
+
const _component_USelect = _sfc_main$6;
|
|
157
|
+
const _component_UCard = _sfc_main$8;
|
|
158
|
+
const _component_UBadge = _sfc_main$2;
|
|
159
|
+
const _component_UPagination = _sfc_main$9;
|
|
160
|
+
_push(`<section${ssrRenderAttrs(_attrs)}>`);
|
|
161
|
+
if (__props.runs.length === 0) _push(ssrRenderComponent(_component_BaseEmpty, {
|
|
162
|
+
icon: "i-ic-round-play-circle-outline",
|
|
163
|
+
title: "Nenhum teste executado ainda",
|
|
164
|
+
description: "Rode o cenário em Testar. Cada execução fica registrada aqui com o resultado e o código que rodou.",
|
|
165
|
+
testid: "cenario-execucoes-vazio"
|
|
166
|
+
}, null, _parent));
|
|
167
|
+
else {
|
|
168
|
+
_push(`<!--[--><div class="mb-3 flex flex-col gap-2 sm:flex-row">`);
|
|
169
|
+
_push(ssrRenderComponent(_component_UInput, {
|
|
170
|
+
modelValue: unref(search),
|
|
171
|
+
"onUpdate:modelValue": ($event) => isRef(search) ? search.value = $event : null,
|
|
172
|
+
icon: "i-ic-round-search",
|
|
173
|
+
placeholder: "Buscar por data, branch, autor ou step que falhou",
|
|
174
|
+
class: "flex-1",
|
|
175
|
+
"data-testid": "execucoes-busca"
|
|
176
|
+
}, null, _parent));
|
|
177
|
+
_push(ssrRenderComponent(_component_USelect, {
|
|
178
|
+
modelValue: unref(status),
|
|
179
|
+
"onUpdate:modelValue": ($event) => isRef(status) ? status.value = $event : null,
|
|
180
|
+
items: statusItems,
|
|
181
|
+
class: "sm:w-40",
|
|
182
|
+
"data-testid": "execucoes-status"
|
|
183
|
+
}, null, _parent));
|
|
184
|
+
_push(`</div>`);
|
|
185
|
+
if (unref(filtered).length === 0) _push(ssrRenderComponent(_component_BaseEmpty, {
|
|
186
|
+
icon: "i-ic-round-search-off",
|
|
187
|
+
title: "Nenhuma execução encontrada",
|
|
188
|
+
description: "Nada no histórico casa com a busca e o status escolhidos. Limpe os filtros para ver as execuções de novo.",
|
|
189
|
+
testid: "cenario-execucoes-sem-resultado"
|
|
190
|
+
}, null, _parent));
|
|
191
|
+
else {
|
|
192
|
+
_push(`<div class="grid gap-3 sm:grid-cols-2"><!--[-->`);
|
|
193
|
+
ssrRenderList(unref(paginated), (run) => {
|
|
194
|
+
_push(ssrRenderComponent(_component_UCard, {
|
|
195
|
+
key: run.started_at,
|
|
196
|
+
class: "cursor-pointer transition-colors hover:bg-accented/75",
|
|
197
|
+
"data-testid": "cenario-execucao",
|
|
198
|
+
"data-status": run.passed ? "success" : "failed",
|
|
199
|
+
onClick: ($event) => emit("open", run)
|
|
200
|
+
}, {
|
|
201
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
202
|
+
if (_push) {
|
|
203
|
+
_push(`<div class="flex items-center justify-between gap-4"${_scopeId}><div class="min-w-0"${_scopeId}><p class="text-sm text-muted"${_scopeId}> Testado em </p><p class="truncate"${_scopeId}>${ssrInterpolate(testedAt(run))} <span class="text-muted"${_scopeId}>em ${ssrInterpolate(took(run))}</span></p></div>`);
|
|
204
|
+
_push(ssrRenderComponent(_component_UBadge, {
|
|
205
|
+
variant: "soft",
|
|
206
|
+
color: run.passed ? "success" : "error",
|
|
207
|
+
icon: run.passed ? "i-ic-round-check-circle" : "i-ic-round-error",
|
|
208
|
+
label: run.passed ? "Sucesso" : "Falha"
|
|
209
|
+
}, null, _parent, _scopeId));
|
|
210
|
+
_push(`</div>`);
|
|
211
|
+
} else return [createVNode("div", { class: "flex items-center justify-between gap-4" }, [createVNode("div", { class: "min-w-0" }, [createVNode("p", { class: "text-sm text-muted" }, " Testado em "), createVNode("p", { class: "truncate" }, [createTextVNode(toDisplayString(testedAt(run)) + " ", 1), createVNode("span", { class: "text-muted" }, "em " + toDisplayString(took(run)), 1)])]), createVNode(_component_UBadge, {
|
|
212
|
+
variant: "soft",
|
|
213
|
+
color: run.passed ? "success" : "error",
|
|
214
|
+
icon: run.passed ? "i-ic-round-check-circle" : "i-ic-round-error",
|
|
215
|
+
label: run.passed ? "Sucesso" : "Falha"
|
|
216
|
+
}, null, 8, [
|
|
217
|
+
"color",
|
|
218
|
+
"icon",
|
|
219
|
+
"label"
|
|
220
|
+
])])];
|
|
221
|
+
}),
|
|
222
|
+
_: 2
|
|
223
|
+
}, _parent));
|
|
224
|
+
});
|
|
225
|
+
_push(`<!--]--></div>`);
|
|
226
|
+
}
|
|
227
|
+
if (unref(filtered).length > PAGE_SIZE) {
|
|
228
|
+
_push(`<div class="mt-4 flex justify-center">`);
|
|
229
|
+
_push(ssrRenderComponent(_component_UPagination, {
|
|
230
|
+
page: unref(page),
|
|
231
|
+
"onUpdate:page": ($event) => isRef(page) ? page.value = $event : null,
|
|
232
|
+
variant: "soft",
|
|
233
|
+
total: unref(filtered).length,
|
|
234
|
+
"items-per-page": PAGE_SIZE,
|
|
235
|
+
"data-testid": "execucoes-paginacao"
|
|
236
|
+
}, null, _parent));
|
|
237
|
+
_push(`</div>`);
|
|
238
|
+
} else _push(`<!---->`);
|
|
239
|
+
_push(`<!--]-->`);
|
|
240
|
+
}
|
|
241
|
+
_push(`</section>`);
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region app/components/scenario/test-run/history.vue
|
|
247
|
+
var _sfc_setup$6 = history_vue_vue_type_script_setup_true_lang_default.setup;
|
|
248
|
+
history_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
249
|
+
const ssrContext = useSSRContext();
|
|
250
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/test-run/history.vue");
|
|
251
|
+
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
252
|
+
};
|
|
253
|
+
var history_default = Object.assign(history_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioTestRunHistory" });
|
|
254
|
+
//#endregion
|
|
66
255
|
//#region app/components/scenario/edit/modal.vue?vue&type=script&setup=true&lang.ts
|
|
67
|
-
var modal_vue_vue_type_script_setup_true_lang_default$
|
|
256
|
+
var modal_vue_vue_type_script_setup_true_lang_default$2 = /*@__PURE__*/ defineComponent({
|
|
68
257
|
__name: "modal",
|
|
69
258
|
__ssrInlineRender: true,
|
|
70
259
|
props: /*@__PURE__*/ mergeModels({
|
|
71
260
|
slug: {},
|
|
72
|
-
scenario: {}
|
|
261
|
+
scenario: {},
|
|
262
|
+
resumed: { default: null }
|
|
73
263
|
}, {
|
|
74
264
|
"open": {
|
|
75
265
|
type: Boolean,
|
|
@@ -81,12 +271,12 @@ var modal_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
81
271
|
setup(__props, { emit: __emit }) {
|
|
82
272
|
const open = useModel(__props, "open");
|
|
83
273
|
const emit = __emit;
|
|
84
|
-
const draft = ref(draftFromScenario(__props.scenario));
|
|
274
|
+
const draft = ref(__props.resumed?.draft ?? draftFromScenario(__props.scenario));
|
|
85
275
|
const saving = ref(false);
|
|
86
276
|
const error = ref(null);
|
|
87
277
|
watch(open, (isOpen) => {
|
|
88
278
|
if (isOpen) {
|
|
89
|
-
draft.value = draftFromScenario(__props.scenario);
|
|
279
|
+
draft.value = __props.resumed?.draft ?? draftFromScenario(__props.scenario);
|
|
90
280
|
error.value = null;
|
|
91
281
|
}
|
|
92
282
|
});
|
|
@@ -95,9 +285,12 @@ var modal_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
95
285
|
saving.value = true;
|
|
96
286
|
error.value = null;
|
|
97
287
|
try {
|
|
98
|
-
const updated = await $fetch$
|
|
288
|
+
const updated = await $fetch$1(`/api/projects/${__props.slug}/scenarios/${scenarioId.value}`, {
|
|
99
289
|
method: "PATCH",
|
|
100
|
-
body:
|
|
290
|
+
body: {
|
|
291
|
+
...draft.value,
|
|
292
|
+
events: __props.resumed?.events
|
|
293
|
+
}
|
|
101
294
|
});
|
|
102
295
|
open.value = false;
|
|
103
296
|
emit("updated", updated);
|
|
@@ -108,10 +301,10 @@ var modal_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
108
301
|
}
|
|
109
302
|
}
|
|
110
303
|
return (_ctx, _push, _parent, _attrs) => {
|
|
111
|
-
const _component_BaseModal = modal_default$
|
|
304
|
+
const _component_BaseModal = modal_default$4;
|
|
112
305
|
const _component_ScenarioReviewContexts = contexts_default;
|
|
113
|
-
const _component_UAlert = _sfc_main$
|
|
114
|
-
const _component_UButton = _sfc_main$
|
|
306
|
+
const _component_UAlert = _sfc_main$3;
|
|
307
|
+
const _component_UButton = _sfc_main$1;
|
|
115
308
|
_push(ssrRenderComponent(_component_BaseModal, mergeProps({
|
|
116
309
|
open: open.value,
|
|
117
310
|
"onUpdate:open": ($event) => open.value = $event,
|
|
@@ -183,13 +376,324 @@ var modal_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineCo
|
|
|
183
376
|
});
|
|
184
377
|
//#endregion
|
|
185
378
|
//#region app/components/scenario/edit/modal.vue
|
|
379
|
+
var _sfc_setup$5 = modal_vue_vue_type_script_setup_true_lang_default$2.setup;
|
|
380
|
+
modal_vue_vue_type_script_setup_true_lang_default$2.setup = (props, ctx) => {
|
|
381
|
+
const ssrContext = useSSRContext();
|
|
382
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/edit/modal.vue");
|
|
383
|
+
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
384
|
+
};
|
|
385
|
+
var modal_default$2 = Object.assign(modal_vue_vue_type_script_setup_true_lang_default$2, { __name: "ScenarioEditModal" });
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region app/components/scenario/suggestions/loading.vue?vue&type=script&setup=true&lang.ts
|
|
388
|
+
var loading_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
389
|
+
__name: "loading",
|
|
390
|
+
__ssrInlineRender: true,
|
|
391
|
+
setup(__props) {
|
|
392
|
+
const phrases = [
|
|
393
|
+
"Analisando os eventos gravados",
|
|
394
|
+
"Procurando seletores frágeis",
|
|
395
|
+
"Pensando em nomes de data-testid",
|
|
396
|
+
"Preparando as sugestões"
|
|
397
|
+
];
|
|
398
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
399
|
+
_push(ssrRenderComponent(phrases_default, mergeProps({
|
|
400
|
+
phrases,
|
|
401
|
+
"data-testid": "sugestoes-carregando"
|
|
402
|
+
}, _attrs), null, _parent));
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region app/components/scenario/suggestions/loading.vue
|
|
408
|
+
var _sfc_setup$4 = loading_vue_vue_type_script_setup_true_lang_default.setup;
|
|
409
|
+
loading_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
410
|
+
const ssrContext = useSSRContext();
|
|
411
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/suggestions/loading.vue");
|
|
412
|
+
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
413
|
+
};
|
|
414
|
+
var loading_default = Object.assign(loading_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioSuggestionsLoading" });
|
|
415
|
+
//#endregion
|
|
416
|
+
//#region app/components/scenario/suggestions/modal.vue?vue&type=script&setup=true&lang.ts
|
|
417
|
+
var modal_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ defineComponent({
|
|
418
|
+
__name: "modal",
|
|
419
|
+
__ssrInlineRender: true,
|
|
420
|
+
props: /*@__PURE__*/ mergeModels({
|
|
421
|
+
loading: {
|
|
422
|
+
type: Boolean,
|
|
423
|
+
default: false
|
|
424
|
+
},
|
|
425
|
+
suggestions: { default: () => [] },
|
|
426
|
+
error: { default: null }
|
|
427
|
+
}, {
|
|
428
|
+
"open": {
|
|
429
|
+
type: Boolean,
|
|
430
|
+
default: false
|
|
431
|
+
},
|
|
432
|
+
"openModifiers": {}
|
|
433
|
+
}),
|
|
434
|
+
emits: ["update:open"],
|
|
435
|
+
setup(__props) {
|
|
436
|
+
const open = useModel(__props, "open");
|
|
437
|
+
const copied = ref(null);
|
|
438
|
+
function copy(testId, index) {
|
|
439
|
+
(void 0).clipboard?.writeText(testId);
|
|
440
|
+
copied.value = index;
|
|
441
|
+
setTimeout(() => {
|
|
442
|
+
if (copied.value === index) copied.value = null;
|
|
443
|
+
}, 1500);
|
|
444
|
+
}
|
|
445
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
446
|
+
const _component_BaseModal = modal_default$4;
|
|
447
|
+
const _component_ScenarioSuggestionsLoading = loading_default;
|
|
448
|
+
const _component_UAlert = _sfc_main$3;
|
|
449
|
+
const _component_UCard = _sfc_main$8;
|
|
450
|
+
const _component_UIcon = _sfc_main$5;
|
|
451
|
+
const _component_UBadge = _sfc_main$2;
|
|
452
|
+
const _component_UTooltip = _sfc_main$7;
|
|
453
|
+
const _component_UButton = _sfc_main$1;
|
|
454
|
+
_push(ssrRenderComponent(_component_BaseModal, mergeProps({
|
|
455
|
+
open: open.value,
|
|
456
|
+
"onUpdate:open": ($event) => open.value = $event,
|
|
457
|
+
title: "Sugestões de seletores",
|
|
458
|
+
loading: __props.loading,
|
|
459
|
+
wide: ""
|
|
460
|
+
}, _attrs), {
|
|
461
|
+
body: withCtx((_, _push, _parent, _scopeId) => {
|
|
462
|
+
if (_push) {
|
|
463
|
+
if (__props.loading) _push(ssrRenderComponent(_component_ScenarioSuggestionsLoading, null, null, _parent, _scopeId));
|
|
464
|
+
else if (__props.error) _push(ssrRenderComponent(_component_UAlert, {
|
|
465
|
+
color: "error",
|
|
466
|
+
variant: "soft",
|
|
467
|
+
icon: "i-ic-round-error-outline",
|
|
468
|
+
title: "Não foi possível gerar sugestões",
|
|
469
|
+
description: __props.error
|
|
470
|
+
}, null, _parent, _scopeId));
|
|
471
|
+
else if (__props.suggestions.length === 0) _push(ssrRenderComponent(_component_UAlert, {
|
|
472
|
+
color: "success",
|
|
473
|
+
variant: "soft",
|
|
474
|
+
icon: "i-ic-round-check-circle",
|
|
475
|
+
title: "Nenhuma sugestão necessária",
|
|
476
|
+
description: "Todos os eventos já têm um data-testid.",
|
|
477
|
+
"data-testid": "sugestoes-vazio"
|
|
478
|
+
}, null, _parent, _scopeId));
|
|
479
|
+
else {
|
|
480
|
+
_push(`<div class="flex flex-col gap-3"${_scopeId}><!--[-->`);
|
|
481
|
+
ssrRenderList(__props.suggestions, (suggestion, i) => {
|
|
482
|
+
_push(ssrRenderComponent(_component_UCard, {
|
|
483
|
+
key: i,
|
|
484
|
+
"data-testid": "sugestao-card"
|
|
485
|
+
}, {
|
|
486
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
487
|
+
if (_push) {
|
|
488
|
+
_push(`<div class="flex gap-3"${_scopeId}><div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-primary/10"${_scopeId}>`);
|
|
489
|
+
_push(ssrRenderComponent(_component_UIcon, {
|
|
490
|
+
name: "i-ic-round-select-all",
|
|
491
|
+
class: "size-5 text-primary"
|
|
492
|
+
}, null, _parent, _scopeId));
|
|
493
|
+
_push(`</div><div class="min-w-0 flex-1"${_scopeId}><p class="text-sm font-semibold"${_scopeId}>${ssrInterpolate(suggestion.event)}</p><p class="text-xs text-dimmed mt-0.5"${_scopeId}>${ssrInterpolate(suggestion.reason)}</p><div class="flex flex-wrap items-center gap-2 mt-3"${_scopeId}>`);
|
|
494
|
+
_push(ssrRenderComponent(_component_UBadge, {
|
|
495
|
+
color: "error",
|
|
496
|
+
class: "font-mono line-through decoration-error/50",
|
|
497
|
+
size: "xl"
|
|
498
|
+
}, {
|
|
499
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
500
|
+
if (_push) _push(`${ssrInterpolate(suggestion.currentSelector)}`);
|
|
501
|
+
else return [createTextVNode(toDisplayString(suggestion.currentSelector), 1)];
|
|
502
|
+
}),
|
|
503
|
+
_: 2
|
|
504
|
+
}, _parent, _scopeId));
|
|
505
|
+
_push(ssrRenderComponent(_component_UIcon, {
|
|
506
|
+
name: "i-ic-round-keyboard-arrow-right",
|
|
507
|
+
class: "size-8 shrink-0 text-dimmed"
|
|
508
|
+
}, null, _parent, _scopeId));
|
|
509
|
+
_push(ssrRenderComponent(_component_UTooltip, {
|
|
510
|
+
text: unref(copied) === i ? "Copiado!" : "Clique para copiar",
|
|
511
|
+
"delay-duration": 0,
|
|
512
|
+
arrow: ""
|
|
513
|
+
}, {
|
|
514
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
515
|
+
if (_push) _push(ssrRenderComponent(_component_UButton, {
|
|
516
|
+
color: unref(copied) === i ? "success" : "primary",
|
|
517
|
+
variant: "soft",
|
|
518
|
+
"trailing-icon": unref(copied) === i ? "i-ic-round-check" : "i-ic-round-content-copy",
|
|
519
|
+
"data-testid": "sugestao-testid",
|
|
520
|
+
size: "lg",
|
|
521
|
+
onClick: ($event) => copy(suggestion.suggestedTestId, i)
|
|
522
|
+
}, {
|
|
523
|
+
default: withCtx((_, _push, _parent, _scopeId) => {
|
|
524
|
+
if (_push) _push(`<code class="font-mono"${_scopeId}>data-testid="${ssrInterpolate(suggestion.suggestedTestId)}"</code>`);
|
|
525
|
+
else return [createVNode("code", { class: "font-mono" }, "data-testid=\"" + toDisplayString(suggestion.suggestedTestId) + "\"", 1)];
|
|
526
|
+
}),
|
|
527
|
+
_: 2
|
|
528
|
+
}, _parent, _scopeId));
|
|
529
|
+
else return [createVNode(_component_UButton, {
|
|
530
|
+
color: unref(copied) === i ? "success" : "primary",
|
|
531
|
+
variant: "soft",
|
|
532
|
+
"trailing-icon": unref(copied) === i ? "i-ic-round-check" : "i-ic-round-content-copy",
|
|
533
|
+
"data-testid": "sugestao-testid",
|
|
534
|
+
size: "lg",
|
|
535
|
+
onClick: ($event) => copy(suggestion.suggestedTestId, i)
|
|
536
|
+
}, {
|
|
537
|
+
default: withCtx(() => [createVNode("code", { class: "font-mono" }, "data-testid=\"" + toDisplayString(suggestion.suggestedTestId) + "\"", 1)]),
|
|
538
|
+
_: 2
|
|
539
|
+
}, 1032, [
|
|
540
|
+
"color",
|
|
541
|
+
"trailing-icon",
|
|
542
|
+
"onClick"
|
|
543
|
+
])];
|
|
544
|
+
}),
|
|
545
|
+
_: 2
|
|
546
|
+
}, _parent, _scopeId));
|
|
547
|
+
_push(`</div></div></div>`);
|
|
548
|
+
} else return [createVNode("div", { class: "flex gap-3" }, [createVNode("div", { class: "flex size-9 shrink-0 items-center justify-center rounded-md bg-primary/10" }, [createVNode(_component_UIcon, {
|
|
549
|
+
name: "i-ic-round-select-all",
|
|
550
|
+
class: "size-5 text-primary"
|
|
551
|
+
})]), createVNode("div", { class: "min-w-0 flex-1" }, [
|
|
552
|
+
createVNode("p", { class: "text-sm font-semibold" }, toDisplayString(suggestion.event), 1),
|
|
553
|
+
createVNode("p", { class: "text-xs text-dimmed mt-0.5" }, toDisplayString(suggestion.reason), 1),
|
|
554
|
+
createVNode("div", { class: "flex flex-wrap items-center gap-2 mt-3" }, [
|
|
555
|
+
createVNode(_component_UBadge, {
|
|
556
|
+
color: "error",
|
|
557
|
+
class: "font-mono line-through decoration-error/50",
|
|
558
|
+
size: "xl"
|
|
559
|
+
}, {
|
|
560
|
+
default: withCtx(() => [createTextVNode(toDisplayString(suggestion.currentSelector), 1)]),
|
|
561
|
+
_: 2
|
|
562
|
+
}, 1024),
|
|
563
|
+
createVNode(_component_UIcon, {
|
|
564
|
+
name: "i-ic-round-keyboard-arrow-right",
|
|
565
|
+
class: "size-8 shrink-0 text-dimmed"
|
|
566
|
+
}),
|
|
567
|
+
createVNode(_component_UTooltip, {
|
|
568
|
+
text: unref(copied) === i ? "Copiado!" : "Clique para copiar",
|
|
569
|
+
"delay-duration": 0,
|
|
570
|
+
arrow: ""
|
|
571
|
+
}, {
|
|
572
|
+
default: withCtx(() => [createVNode(_component_UButton, {
|
|
573
|
+
color: unref(copied) === i ? "success" : "primary",
|
|
574
|
+
variant: "soft",
|
|
575
|
+
"trailing-icon": unref(copied) === i ? "i-ic-round-check" : "i-ic-round-content-copy",
|
|
576
|
+
"data-testid": "sugestao-testid",
|
|
577
|
+
size: "lg",
|
|
578
|
+
onClick: ($event) => copy(suggestion.suggestedTestId, i)
|
|
579
|
+
}, {
|
|
580
|
+
default: withCtx(() => [createVNode("code", { class: "font-mono" }, "data-testid=\"" + toDisplayString(suggestion.suggestedTestId) + "\"", 1)]),
|
|
581
|
+
_: 2
|
|
582
|
+
}, 1032, [
|
|
583
|
+
"color",
|
|
584
|
+
"trailing-icon",
|
|
585
|
+
"onClick"
|
|
586
|
+
])]),
|
|
587
|
+
_: 2
|
|
588
|
+
}, 1032, ["text"])
|
|
589
|
+
])
|
|
590
|
+
])])];
|
|
591
|
+
}),
|
|
592
|
+
_: 2
|
|
593
|
+
}, _parent, _scopeId));
|
|
594
|
+
});
|
|
595
|
+
_push(`<!--]--></div>`);
|
|
596
|
+
}
|
|
597
|
+
} else return [__props.loading ? (openBlock(), createBlock(_component_ScenarioSuggestionsLoading, { key: 0 })) : __props.error ? (openBlock(), createBlock(_component_UAlert, {
|
|
598
|
+
key: 1,
|
|
599
|
+
color: "error",
|
|
600
|
+
variant: "soft",
|
|
601
|
+
icon: "i-ic-round-error-outline",
|
|
602
|
+
title: "Não foi possível gerar sugestões",
|
|
603
|
+
description: __props.error
|
|
604
|
+
}, null, 8, ["description"])) : __props.suggestions.length === 0 ? (openBlock(), createBlock(_component_UAlert, {
|
|
605
|
+
key: 2,
|
|
606
|
+
color: "success",
|
|
607
|
+
variant: "soft",
|
|
608
|
+
icon: "i-ic-round-check-circle",
|
|
609
|
+
title: "Nenhuma sugestão necessária",
|
|
610
|
+
description: "Todos os eventos já têm um data-testid.",
|
|
611
|
+
"data-testid": "sugestoes-vazio"
|
|
612
|
+
})) : (openBlock(), createBlock("div", {
|
|
613
|
+
key: 3,
|
|
614
|
+
class: "flex flex-col gap-3"
|
|
615
|
+
}, [(openBlock(true), createBlock(Fragment, null, renderList(__props.suggestions, (suggestion, i) => {
|
|
616
|
+
return openBlock(), createBlock(_component_UCard, {
|
|
617
|
+
key: i,
|
|
618
|
+
"data-testid": "sugestao-card"
|
|
619
|
+
}, {
|
|
620
|
+
default: withCtx(() => [createVNode("div", { class: "flex gap-3" }, [createVNode("div", { class: "flex size-9 shrink-0 items-center justify-center rounded-md bg-primary/10" }, [createVNode(_component_UIcon, {
|
|
621
|
+
name: "i-ic-round-select-all",
|
|
622
|
+
class: "size-5 text-primary"
|
|
623
|
+
})]), createVNode("div", { class: "min-w-0 flex-1" }, [
|
|
624
|
+
createVNode("p", { class: "text-sm font-semibold" }, toDisplayString(suggestion.event), 1),
|
|
625
|
+
createVNode("p", { class: "text-xs text-dimmed mt-0.5" }, toDisplayString(suggestion.reason), 1),
|
|
626
|
+
createVNode("div", { class: "flex flex-wrap items-center gap-2 mt-3" }, [
|
|
627
|
+
createVNode(_component_UBadge, {
|
|
628
|
+
color: "error",
|
|
629
|
+
class: "font-mono line-through decoration-error/50",
|
|
630
|
+
size: "xl"
|
|
631
|
+
}, {
|
|
632
|
+
default: withCtx(() => [createTextVNode(toDisplayString(suggestion.currentSelector), 1)]),
|
|
633
|
+
_: 2
|
|
634
|
+
}, 1024),
|
|
635
|
+
createVNode(_component_UIcon, {
|
|
636
|
+
name: "i-ic-round-keyboard-arrow-right",
|
|
637
|
+
class: "size-8 shrink-0 text-dimmed"
|
|
638
|
+
}),
|
|
639
|
+
createVNode(_component_UTooltip, {
|
|
640
|
+
text: unref(copied) === i ? "Copiado!" : "Clique para copiar",
|
|
641
|
+
"delay-duration": 0,
|
|
642
|
+
arrow: ""
|
|
643
|
+
}, {
|
|
644
|
+
default: withCtx(() => [createVNode(_component_UButton, {
|
|
645
|
+
color: unref(copied) === i ? "success" : "primary",
|
|
646
|
+
variant: "soft",
|
|
647
|
+
"trailing-icon": unref(copied) === i ? "i-ic-round-check" : "i-ic-round-content-copy",
|
|
648
|
+
"data-testid": "sugestao-testid",
|
|
649
|
+
size: "lg",
|
|
650
|
+
onClick: ($event) => copy(suggestion.suggestedTestId, i)
|
|
651
|
+
}, {
|
|
652
|
+
default: withCtx(() => [createVNode("code", { class: "font-mono" }, "data-testid=\"" + toDisplayString(suggestion.suggestedTestId) + "\"", 1)]),
|
|
653
|
+
_: 2
|
|
654
|
+
}, 1032, [
|
|
655
|
+
"color",
|
|
656
|
+
"trailing-icon",
|
|
657
|
+
"onClick"
|
|
658
|
+
])]),
|
|
659
|
+
_: 2
|
|
660
|
+
}, 1032, ["text"])
|
|
661
|
+
])
|
|
662
|
+
])])]),
|
|
663
|
+
_: 2
|
|
664
|
+
}, 1024);
|
|
665
|
+
}), 128))]))];
|
|
666
|
+
}),
|
|
667
|
+
footer: withCtx((_, _push, _parent, _scopeId) => {
|
|
668
|
+
if (_push) _push(ssrRenderComponent(_component_UButton, {
|
|
669
|
+
label: "Fechar",
|
|
670
|
+
color: "neutral",
|
|
671
|
+
variant: "ghost",
|
|
672
|
+
"data-testid": "sugestoes-fechar",
|
|
673
|
+
onClick: ($event) => open.value = false
|
|
674
|
+
}, null, _parent, _scopeId));
|
|
675
|
+
else return [createVNode(_component_UButton, {
|
|
676
|
+
label: "Fechar",
|
|
677
|
+
color: "neutral",
|
|
678
|
+
variant: "ghost",
|
|
679
|
+
"data-testid": "sugestoes-fechar",
|
|
680
|
+
onClick: ($event) => open.value = false
|
|
681
|
+
}, null, 8, ["onClick"])];
|
|
682
|
+
}),
|
|
683
|
+
_: 1
|
|
684
|
+
}, _parent));
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region app/components/scenario/suggestions/modal.vue
|
|
186
690
|
var _sfc_setup$3 = modal_vue_vue_type_script_setup_true_lang_default$1.setup;
|
|
187
691
|
modal_vue_vue_type_script_setup_true_lang_default$1.setup = (props, ctx) => {
|
|
188
692
|
const ssrContext = useSSRContext();
|
|
189
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/
|
|
693
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/scenario/suggestions/modal.vue");
|
|
190
694
|
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
191
695
|
};
|
|
192
|
-
var modal_default$1 = Object.assign(modal_vue_vue_type_script_setup_true_lang_default$1, { __name: "
|
|
696
|
+
var modal_default$1 = Object.assign(modal_vue_vue_type_script_setup_true_lang_default$1, { __name: "ScenarioSuggestionsModal" });
|
|
193
697
|
//#endregion
|
|
194
698
|
//#region app/components/project/auth/credentials.vue?vue&type=script&setup=true&lang.ts
|
|
195
699
|
var credentials_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
@@ -220,7 +724,7 @@ var credentials_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
220
724
|
saving.value = true;
|
|
221
725
|
error.value = null;
|
|
222
726
|
try {
|
|
223
|
-
await $fetch$
|
|
727
|
+
await $fetch$1(`/api/projects/${__props.slug}/auth/credentials`, {
|
|
224
728
|
method: "POST",
|
|
225
729
|
body: {
|
|
226
730
|
username: username.value,
|
|
@@ -236,11 +740,11 @@ var credentials_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
236
740
|
}
|
|
237
741
|
}
|
|
238
742
|
return (_ctx, _push, _parent, _attrs) => {
|
|
239
|
-
const _component_BaseModal = modal_default$
|
|
240
|
-
const _component_UAlert = _sfc_main$
|
|
241
|
-
const _component_UFormField = _sfc_main$
|
|
242
|
-
const _component_UInput = _sfc_main$
|
|
243
|
-
const _component_UButton = _sfc_main$
|
|
743
|
+
const _component_BaseModal = modal_default$4;
|
|
744
|
+
const _component_UAlert = _sfc_main$3;
|
|
745
|
+
const _component_UFormField = _sfc_main$1$2;
|
|
746
|
+
const _component_UInput = _sfc_main$4;
|
|
747
|
+
const _component_UButton = _sfc_main$1;
|
|
244
748
|
_push(ssrRenderComponent(_component_BaseModal, mergeProps({
|
|
245
749
|
open: open.value,
|
|
246
750
|
"onUpdate:open": ($event) => open.value = $event,
|
|
@@ -418,11 +922,11 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
418
922
|
const emit = __emit;
|
|
419
923
|
const open = useModel(__props, "open");
|
|
420
924
|
return (_ctx, _push, _parent, _attrs) => {
|
|
421
|
-
const _component_BaseModal = modal_default$
|
|
925
|
+
const _component_BaseModal = modal_default$4;
|
|
422
926
|
const _component_BaseLoadingPhrases = phrases_default;
|
|
423
|
-
const _component_UAlert = _sfc_main$
|
|
927
|
+
const _component_UAlert = _sfc_main$3;
|
|
424
928
|
const _component_BaseCodefield = codefield_default;
|
|
425
|
-
const _component_UButton = _sfc_main$
|
|
929
|
+
const _component_UButton = _sfc_main$1;
|
|
426
930
|
_push(ssrRenderComponent(_component_BaseModal, mergeProps({
|
|
427
931
|
open: open.value,
|
|
428
932
|
"onUpdate:open": ($event) => open.value = $event,
|
|
@@ -543,6 +1047,19 @@ modal_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
|
|
543
1047
|
};
|
|
544
1048
|
var modal_default = Object.assign(modal_vue_vue_type_script_setup_true_lang_default, { __name: "ScenarioFixModal" });
|
|
545
1049
|
//#endregion
|
|
1050
|
+
//#region app/utils/recording-session.ts
|
|
1051
|
+
/** Os estados em que o projeto tem uma sessão gravada em disco. */
|
|
1052
|
+
var RECORDED = ["configured", "failing"];
|
|
1053
|
+
/**
|
|
1054
|
+
* O arquivo de sessão que a gravação carrega. Nada quando o projeto não gravou login, porque o
|
|
1055
|
+
* caminho existe no projeto de qualquer jeito e o gravador recusa arquivo que não está lá, e nada
|
|
1056
|
+
* para o cenário que roda fora da sessão.
|
|
1057
|
+
*/
|
|
1058
|
+
function sessionFor(project, isPublic = false) {
|
|
1059
|
+
if (isPublic || !RECORDED.includes(project.auth_status)) return void 0;
|
|
1060
|
+
return project.storage_state;
|
|
1061
|
+
}
|
|
1062
|
+
//#endregion
|
|
546
1063
|
//#region app/pages/projects/[projectSlug]/scenarios/[...scenario].vue?vue&type=script&setup=true&lang.ts
|
|
547
1064
|
var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
548
1065
|
__name: "[...scenario]",
|
|
@@ -565,7 +1082,7 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
565
1082
|
async function remove() {
|
|
566
1083
|
removing.value = true;
|
|
567
1084
|
try {
|
|
568
|
-
await $fetch$
|
|
1085
|
+
await $fetch$1(`/api/projects/${slug.value}/scenarios/${scenarioId.value}`, { method: "DELETE" });
|
|
569
1086
|
await navigateTo(`/projects/${slug.value}`);
|
|
570
1087
|
} finally {
|
|
571
1088
|
removing.value = false;
|
|
@@ -587,7 +1104,7 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
587
1104
|
suggestionsError.value = null;
|
|
588
1105
|
suggestions.value = [];
|
|
589
1106
|
try {
|
|
590
|
-
suggestions.value = await $fetch$
|
|
1107
|
+
suggestions.value = await $fetch$1(`/api/projects/${slug.value}/scenario-suggestions`, {
|
|
591
1108
|
method: "POST",
|
|
592
1109
|
body: { scenarioId: scenarioId.value }
|
|
593
1110
|
});
|
|
@@ -639,7 +1156,7 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
639
1156
|
fix.value = null;
|
|
640
1157
|
fixError.value = null;
|
|
641
1158
|
try {
|
|
642
|
-
fix.value = await $fetch$
|
|
1159
|
+
fix.value = await $fetch$1(`/api/projects/${slug.value}/scenario-fix`, {
|
|
643
1160
|
method: "POST",
|
|
644
1161
|
body: {
|
|
645
1162
|
scenarioId: scenarioId.value,
|
|
@@ -657,7 +1174,7 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
657
1174
|
if (!fix.value) return;
|
|
658
1175
|
applyingFix.value = true;
|
|
659
1176
|
try {
|
|
660
|
-
await $fetch$
|
|
1177
|
+
await $fetch$1(`/api/projects/${slug.value}/scenarios/${scenarioId.value}`, {
|
|
661
1178
|
method: "PATCH",
|
|
662
1179
|
body: {
|
|
663
1180
|
...draftFromScenario(scenario.value),
|
|
@@ -717,91 +1234,92 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
717
1234
|
const written = computed(() => !isAuth.value || scenario.value.playwright.trim().length > 0);
|
|
718
1235
|
const { state: webdriver, startRecording, stopRecording } = useWebdriver();
|
|
719
1236
|
const credentialsOpen = ref(false);
|
|
720
|
-
const
|
|
721
|
-
const authError = ref(null);
|
|
1237
|
+
const reviewOpen = ref(false);
|
|
722
1238
|
const authWarnings = ref([]);
|
|
723
1239
|
const dismissingAuth = ref(false);
|
|
724
1240
|
async function dismissAuth() {
|
|
725
1241
|
dismissingAuth.value = true;
|
|
726
1242
|
try {
|
|
727
|
-
await $fetch$
|
|
1243
|
+
await $fetch$1(`/api/projects/${slug.value}/auth/skip`, { method: "POST" });
|
|
728
1244
|
await refreshProject();
|
|
729
1245
|
} finally {
|
|
730
1246
|
dismissingAuth.value = false;
|
|
731
1247
|
}
|
|
732
1248
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
"Identificando os campos de usuário e senha",
|
|
736
|
-
"Escrevendo o fluxo de autenticação"
|
|
737
|
-
];
|
|
1249
|
+
/** Só a tela que pediu a gravação revisa o resultado; o gravador é um estado compartilhado. */
|
|
1250
|
+
const recordStarted = ref(false);
|
|
738
1251
|
/** Gravar o login abre no sistema sem sessão, porque é justamente o login que vamos capturar. */
|
|
739
1252
|
function recordLogin() {
|
|
740
|
-
authError.value = null;
|
|
741
1253
|
authWarnings.value = [];
|
|
1254
|
+
recordStarted.value = true;
|
|
742
1255
|
startRecording("auth", { url: project.value.base_url ?? void 0 });
|
|
743
1256
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
1257
|
+
/** Retomar do passo escolhido: o navegador refaz os anteriores e a gravação continua dali. */
|
|
1258
|
+
const isPublic = computed(() => scenario.value.tags.includes("@publico"));
|
|
1259
|
+
function resumeWith(events) {
|
|
1260
|
+
recordStarted.value = true;
|
|
1261
|
+
startRecording(isAuth.value ? "auth" : "scenario", {
|
|
1262
|
+
url: project.value.base_url ?? void 0,
|
|
1263
|
+
storageState: isAuth.value ? void 0 : sessionFor(project.value, isPublic.value),
|
|
1264
|
+
replay: events
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
function resumeFrom(index) {
|
|
1268
|
+
resumeWith(scenario.value.events.slice(0, index));
|
|
1269
|
+
}
|
|
1270
|
+
/** Gravar de novo do zero mantém o tipo do cenário, só descarta os passos que já existiam. */
|
|
1271
|
+
function rerecord() {
|
|
1272
|
+
return isAuth.value ? recordLogin() : resumeWith([]);
|
|
1273
|
+
}
|
|
1274
|
+
/** Enquanto a ferramenta refaz os passos, quem manda é a cortina na janela gravada. */
|
|
1275
|
+
const recordingLabel = computed(() => {
|
|
1276
|
+
if (webdriver.value.replayFailedStep) return "Aguardando você na janela";
|
|
1277
|
+
if (webdriver.value.replaying) return "Refazendo os passos";
|
|
1278
|
+
return "Parar gravação";
|
|
1279
|
+
});
|
|
1280
|
+
function openEdit() {
|
|
1281
|
+
editOpen.value = true;
|
|
1282
|
+
}
|
|
1283
|
+
/** Toda gravação que sai desta tela passa pela revisão antes de virar cenário ou autenticação. */
|
|
1284
|
+
watch(() => webdriver.value.videoSessionId, (sessionId) => {
|
|
1285
|
+
if (!sessionId || !recordStarted.value) return;
|
|
1286
|
+
recordStarted.value = false;
|
|
1287
|
+
reviewOpen.value = true;
|
|
1288
|
+
});
|
|
1289
|
+
/** O que a revisão gerou: a autenticação segue para as credenciais ou para o teste. */
|
|
1290
|
+
async function onReviewed(result) {
|
|
1291
|
+
if (!result) return;
|
|
1292
|
+
if (!isAuth.value) return onUpdated(result);
|
|
1293
|
+
const generated = result;
|
|
1294
|
+
authWarnings.value = generated.warnings ?? [];
|
|
1295
|
+
await refreshScenario();
|
|
1296
|
+
if (generated.credentialsNeeded) {
|
|
1297
|
+
credentialsOpen.value = true;
|
|
749
1298
|
return;
|
|
750
1299
|
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
const response = await $fetch$2(`/api/projects/${slug.value}/auth/record`, {
|
|
754
|
-
method: "POST",
|
|
755
|
-
body: {
|
|
756
|
-
baseUrl,
|
|
757
|
-
events: webdriver.value.events.map((event) => ({
|
|
758
|
-
type: event.type,
|
|
759
|
-
timestamp: event.timestamp,
|
|
760
|
-
url: event.url ?? null,
|
|
761
|
-
selectors: event.selectors ?? null,
|
|
762
|
-
label: event.label ?? null,
|
|
763
|
-
value: event.value ?? null,
|
|
764
|
-
inputType: event.inputType ?? null,
|
|
765
|
-
html: event.html ?? null
|
|
766
|
-
}))
|
|
767
|
-
}
|
|
768
|
-
});
|
|
769
|
-
authWarnings.value = response.warnings ?? [];
|
|
770
|
-
await refreshScenario();
|
|
771
|
-
if (response.credentialsNeeded) {
|
|
772
|
-
credentialsOpen.value = true;
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
runTest();
|
|
776
|
-
} catch (error) {
|
|
777
|
-
console.error("Falha ao gravar a autenticação:", error);
|
|
778
|
-
authError.value = "Não foi possível gerar a autenticação a partir da gravação. Tente novamente.";
|
|
779
|
-
} finally {
|
|
780
|
-
writingAuth.value = false;
|
|
781
|
-
}
|
|
782
|
-
});
|
|
1300
|
+
runTest();
|
|
1301
|
+
}
|
|
783
1302
|
return (_ctx, _push, _parent, _attrs) => {
|
|
784
1303
|
const _component_UContainer = _sfc_main;
|
|
785
1304
|
const _component_BaseButtonIcon = icon_default;
|
|
786
|
-
const _component_UBadge = _sfc_main$
|
|
1305
|
+
const _component_UBadge = _sfc_main$2;
|
|
787
1306
|
const _component_ScenarioAuthStatus = auth_status_default;
|
|
788
|
-
const _component_UTooltip = _sfc_main$
|
|
789
|
-
const _component_UButton = _sfc_main$
|
|
1307
|
+
const _component_UTooltip = _sfc_main$7;
|
|
1308
|
+
const _component_UButton = _sfc_main$1;
|
|
790
1309
|
const _component_ScenarioWarnings = warnings_default;
|
|
791
|
-
const _component_UAlert = _sfc_main$
|
|
1310
|
+
const _component_UAlert = _sfc_main$3;
|
|
792
1311
|
const _component_WebdriverSetup = setup_default;
|
|
793
|
-
const _component_UIcon = _sfc_main$
|
|
794
|
-
const _component_UTabs = _sfc_main$
|
|
1312
|
+
const _component_UIcon = _sfc_main$5;
|
|
1313
|
+
const _component_UTabs = _sfc_main$1$1;
|
|
795
1314
|
const _component_BaseEmpty = empty_default;
|
|
796
1315
|
const _component_ScenarioReviewTimeline = timeline_default;
|
|
797
1316
|
const _component_BaseCodefield = codefield_default;
|
|
798
1317
|
const _component_ScenarioTestRunHistory = history_default;
|
|
799
1318
|
const _component_BaseConfirm = confirm_default;
|
|
800
|
-
const _component_ScenarioEditModal = modal_default$
|
|
801
|
-
const
|
|
1319
|
+
const _component_ScenarioEditModal = modal_default$2;
|
|
1320
|
+
const _component_ScenarioReviewModal = modal_default$1$1;
|
|
1321
|
+
const _component_ScenarioSuggestionsModal = modal_default$1;
|
|
802
1322
|
const _component_ScenarioTestRunModal = modal_default$3;
|
|
803
|
-
const _component_BaseModal = modal_default$1$1;
|
|
804
|
-
const _component_BaseLoadingPhrases = phrases_default;
|
|
805
1323
|
const _component_ProjectAuthCredentials = credentials_default;
|
|
806
1324
|
const _component_ScenarioFixModal = modal_default;
|
|
807
1325
|
_push(ssrRenderComponent(_component_UContainer, mergeProps({
|
|
@@ -842,7 +1360,7 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
842
1360
|
color: "neutral",
|
|
843
1361
|
variant: "soft",
|
|
844
1362
|
"data-testid": "cenario-editar",
|
|
845
|
-
onClick:
|
|
1363
|
+
onClick: openEdit
|
|
846
1364
|
}, null, _parent, _scopeId));
|
|
847
1365
|
else _push(`<!---->`);
|
|
848
1366
|
if (!unref(isAuth)) _push(ssrRenderComponent(_component_UTooltip, {
|
|
@@ -883,11 +1401,12 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
883
1401
|
_: 1
|
|
884
1402
|
}, _parent, _scopeId));
|
|
885
1403
|
else _push(`<!---->`);
|
|
886
|
-
if (unref(
|
|
887
|
-
label:
|
|
1404
|
+
if (unref(webdriver).recording) _push(ssrRenderComponent(_component_UButton, {
|
|
1405
|
+
label: unref(recordingLabel),
|
|
888
1406
|
"trailing-icon": "i-ic-round-stop",
|
|
889
1407
|
color: "error",
|
|
890
|
-
|
|
1408
|
+
disabled: unref(webdriver).replaying,
|
|
1409
|
+
class: unref(webdriver).replayFailedStep ? "" : "animate-pulse",
|
|
891
1410
|
"data-testid": "cenario-parar",
|
|
892
1411
|
onClick: unref(stopRecording)
|
|
893
1412
|
}, null, _parent, _scopeId));
|
|
@@ -897,7 +1416,6 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
897
1416
|
color: "neutral",
|
|
898
1417
|
variant: "soft",
|
|
899
1418
|
disabled: !unref(webdriver).connected,
|
|
900
|
-
loading: unref(writingAuth),
|
|
901
1419
|
"data-testid": "auth-gravar",
|
|
902
1420
|
onClick: recordLogin
|
|
903
1421
|
}, null, _parent, _scopeId));
|
|
@@ -929,13 +1447,13 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
929
1447
|
slug: unref(slug),
|
|
930
1448
|
class: "mt-6"
|
|
931
1449
|
}, null, _parent, _scopeId));
|
|
932
|
-
if (unref(
|
|
1450
|
+
if (unref(webdriver).error) {
|
|
933
1451
|
_push(`<div class="mt-6 flex flex-col gap-3"${_scopeId}>`);
|
|
934
1452
|
_push(ssrRenderComponent(_component_UAlert, {
|
|
935
1453
|
color: "error",
|
|
936
1454
|
variant: "soft",
|
|
937
1455
|
"data-testid": "webdriver-erro",
|
|
938
|
-
description: unref(
|
|
1456
|
+
description: unref(webdriver).error
|
|
939
1457
|
}, null, _parent, _scopeId));
|
|
940
1458
|
if (unref(webdriver).error?.includes("Chrome")) _push(ssrRenderComponent(_component_WebdriverSetup, null, null, _parent, _scopeId));
|
|
941
1459
|
else _push(`<!---->`);
|
|
@@ -993,8 +1511,18 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
993
1511
|
}, null, _parent, _scopeId));
|
|
994
1512
|
else _push(ssrRenderComponent(_component_ScenarioReviewTimeline, {
|
|
995
1513
|
events: unref(scenario).events,
|
|
996
|
-
|
|
1514
|
+
resumable: unref(webdriver).connected && !unref(webdriver).recording,
|
|
1515
|
+
"data-testid": "cenario-eventos",
|
|
1516
|
+
onResume: resumeFrom
|
|
997
1517
|
}, null, _parent, _scopeId));
|
|
1518
|
+
if (unref(webdriver).error) _push(ssrRenderComponent(_component_UAlert, {
|
|
1519
|
+
color: "error",
|
|
1520
|
+
variant: "soft",
|
|
1521
|
+
description: unref(webdriver).error,
|
|
1522
|
+
class: "mt-4",
|
|
1523
|
+
"data-testid": "cenario-retomar-erro"
|
|
1524
|
+
}, null, _parent, _scopeId));
|
|
1525
|
+
else _push(`<!---->`);
|
|
998
1526
|
_push(`<!--]-->`);
|
|
999
1527
|
} else if (unref(tab) === "gherkin") _push(ssrRenderComponent(_component_BaseCodefield, {
|
|
1000
1528
|
"model-value": unref(scenario).gherkin,
|
|
@@ -1050,6 +1578,16 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1050
1578
|
scenario: unref(scenario),
|
|
1051
1579
|
onUpdated
|
|
1052
1580
|
}, null, _parent, _scopeId));
|
|
1581
|
+
_push(ssrRenderComponent(_component_ScenarioReviewModal, {
|
|
1582
|
+
open: unref(reviewOpen),
|
|
1583
|
+
"onUpdate:open": ($event) => isRef(reviewOpen) ? reviewOpen.value = $event : null,
|
|
1584
|
+
slug: unref(slug),
|
|
1585
|
+
scenario: unref(scenario),
|
|
1586
|
+
"is-public": unref(isPublic),
|
|
1587
|
+
onGenerated: onReviewed,
|
|
1588
|
+
onRerecord: rerecord,
|
|
1589
|
+
onResume: resumeWith
|
|
1590
|
+
}, null, _parent, _scopeId));
|
|
1053
1591
|
_push(ssrRenderComponent(_component_ScenarioSuggestionsModal, {
|
|
1054
1592
|
open: unref(suggestionsOpen),
|
|
1055
1593
|
"onUpdate:open": ($event) => isRef(suggestionsOpen) ? suggestionsOpen.value = $event : null,
|
|
@@ -1073,24 +1611,6 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1073
1611
|
output: unref(runOutput),
|
|
1074
1612
|
onFix: requestFix
|
|
1075
1613
|
}, null, _parent, _scopeId));
|
|
1076
|
-
_push(ssrRenderComponent(_component_BaseModal, {
|
|
1077
|
-
open: unref(writingAuth),
|
|
1078
|
-
"onUpdate:open": ($event) => isRef(writingAuth) ? writingAuth.value = $event : null,
|
|
1079
|
-
dismissable: false,
|
|
1080
|
-
loading: ""
|
|
1081
|
-
}, {
|
|
1082
|
-
body: withCtx((_, _push, _parent, _scopeId) => {
|
|
1083
|
-
if (_push) _push(ssrRenderComponent(_component_BaseLoadingPhrases, {
|
|
1084
|
-
phrases: AUTH_PHRASES,
|
|
1085
|
-
"data-testid": "auth-carregando"
|
|
1086
|
-
}, null, _parent, _scopeId));
|
|
1087
|
-
else return [createVNode(_component_BaseLoadingPhrases, {
|
|
1088
|
-
phrases: AUTH_PHRASES,
|
|
1089
|
-
"data-testid": "auth-carregando"
|
|
1090
|
-
})];
|
|
1091
|
-
}),
|
|
1092
|
-
_: 1
|
|
1093
|
-
}, _parent, _scopeId));
|
|
1094
1614
|
_push(ssrRenderComponent(_component_ProjectAuthCredentials, {
|
|
1095
1615
|
open: unref(credentialsOpen),
|
|
1096
1616
|
"onUpdate:open": ($event) => isRef(credentialsOpen) ? credentialsOpen.value = $event : null,
|
|
@@ -1153,8 +1673,8 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1153
1673
|
color: "neutral",
|
|
1154
1674
|
variant: "soft",
|
|
1155
1675
|
"data-testid": "cenario-editar",
|
|
1156
|
-
onClick:
|
|
1157
|
-
}
|
|
1676
|
+
onClick: openEdit
|
|
1677
|
+
})) : createCommentVNode("", true),
|
|
1158
1678
|
!unref(isAuth) ? (openBlock(), createBlock(_component_UTooltip, {
|
|
1159
1679
|
key: 2,
|
|
1160
1680
|
text: unref(AI_OFF_HINT),
|
|
@@ -1178,25 +1698,30 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1178
1698
|
])])]),
|
|
1179
1699
|
_: 1
|
|
1180
1700
|
}, 8, ["text", "disabled"])) : createCommentVNode("", true),
|
|
1181
|
-
unref(
|
|
1701
|
+
unref(webdriver).recording ? (openBlock(), createBlock(_component_UButton, {
|
|
1182
1702
|
key: 3,
|
|
1183
|
-
label:
|
|
1703
|
+
label: unref(recordingLabel),
|
|
1184
1704
|
"trailing-icon": "i-ic-round-stop",
|
|
1185
1705
|
color: "error",
|
|
1186
|
-
|
|
1706
|
+
disabled: unref(webdriver).replaying,
|
|
1707
|
+
class: unref(webdriver).replayFailedStep ? "" : "animate-pulse",
|
|
1187
1708
|
"data-testid": "cenario-parar",
|
|
1188
1709
|
onClick: unref(stopRecording)
|
|
1189
|
-
}, null, 8, [
|
|
1710
|
+
}, null, 8, [
|
|
1711
|
+
"label",
|
|
1712
|
+
"disabled",
|
|
1713
|
+
"class",
|
|
1714
|
+
"onClick"
|
|
1715
|
+
])) : unref(isAuth) && unref(written) ? (openBlock(), createBlock(_component_UButton, {
|
|
1190
1716
|
key: 4,
|
|
1191
1717
|
label: "Gravar novamente",
|
|
1192
1718
|
"trailing-icon": "i-ic-round-fiber-manual-record",
|
|
1193
1719
|
color: "neutral",
|
|
1194
1720
|
variant: "soft",
|
|
1195
1721
|
disabled: !unref(webdriver).connected,
|
|
1196
|
-
loading: unref(writingAuth),
|
|
1197
1722
|
"data-testid": "auth-gravar",
|
|
1198
1723
|
onClick: recordLogin
|
|
1199
|
-
}, null, 8, ["disabled"
|
|
1724
|
+
}, null, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1200
1725
|
unref(written) ? (openBlock(), createBlock(_component_UButton, {
|
|
1201
1726
|
key: 5,
|
|
1202
1727
|
label: "Testar",
|
|
@@ -1226,14 +1751,14 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1226
1751
|
slug: unref(slug),
|
|
1227
1752
|
class: "mt-6"
|
|
1228
1753
|
}, null, 8, ["warnings", "slug"]),
|
|
1229
|
-
unref(
|
|
1754
|
+
unref(webdriver).error ? (openBlock(), createBlock("div", {
|
|
1230
1755
|
key: 2,
|
|
1231
1756
|
class: "mt-6 flex flex-col gap-3"
|
|
1232
1757
|
}, [createVNode(_component_UAlert, {
|
|
1233
1758
|
color: "error",
|
|
1234
1759
|
variant: "soft",
|
|
1235
1760
|
"data-testid": "webdriver-erro",
|
|
1236
|
-
description: unref(
|
|
1761
|
+
description: unref(webdriver).error
|
|
1237
1762
|
}, null, 8, ["description"]), unref(webdriver).error?.includes("Chrome") ? (openBlock(), createBlock(_component_WebdriverSetup, { key: 0 })) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
1238
1763
|
!unref(written) ? (openBlock(), createBlock("div", {
|
|
1239
1764
|
key: 3,
|
|
@@ -1296,8 +1821,17 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1296
1821
|
})) : (openBlock(), createBlock(_component_ScenarioReviewTimeline, {
|
|
1297
1822
|
key: 1,
|
|
1298
1823
|
events: unref(scenario).events,
|
|
1299
|
-
|
|
1300
|
-
|
|
1824
|
+
resumable: unref(webdriver).connected && !unref(webdriver).recording,
|
|
1825
|
+
"data-testid": "cenario-eventos",
|
|
1826
|
+
onResume: resumeFrom
|
|
1827
|
+
}, null, 8, ["events", "resumable"])), unref(webdriver).error ? (openBlock(), createBlock(_component_UAlert, {
|
|
1828
|
+
key: 2,
|
|
1829
|
+
color: "error",
|
|
1830
|
+
variant: "soft",
|
|
1831
|
+
description: unref(webdriver).error,
|
|
1832
|
+
class: "mt-4",
|
|
1833
|
+
"data-testid": "cenario-retomar-erro"
|
|
1834
|
+
}, null, 8, ["description"])) : createCommentVNode("", true)], 64)) : unref(tab) === "gherkin" ? (openBlock(), createBlock(_component_BaseCodefield, {
|
|
1301
1835
|
key: 1,
|
|
1302
1836
|
"model-value": unref(scenario).gherkin,
|
|
1303
1837
|
language: "gherkin",
|
|
@@ -1353,6 +1887,22 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1353
1887
|
"slug",
|
|
1354
1888
|
"scenario"
|
|
1355
1889
|
]),
|
|
1890
|
+
createVNode(_component_ScenarioReviewModal, {
|
|
1891
|
+
open: unref(reviewOpen),
|
|
1892
|
+
"onUpdate:open": ($event) => isRef(reviewOpen) ? reviewOpen.value = $event : null,
|
|
1893
|
+
slug: unref(slug),
|
|
1894
|
+
scenario: unref(scenario),
|
|
1895
|
+
"is-public": unref(isPublic),
|
|
1896
|
+
onGenerated: onReviewed,
|
|
1897
|
+
onRerecord: rerecord,
|
|
1898
|
+
onResume: resumeWith
|
|
1899
|
+
}, null, 8, [
|
|
1900
|
+
"open",
|
|
1901
|
+
"onUpdate:open",
|
|
1902
|
+
"slug",
|
|
1903
|
+
"scenario",
|
|
1904
|
+
"is-public"
|
|
1905
|
+
]),
|
|
1356
1906
|
createVNode(_component_ScenarioSuggestionsModal, {
|
|
1357
1907
|
open: unref(suggestionsOpen),
|
|
1358
1908
|
"onUpdate:open": ($event) => isRef(suggestionsOpen) ? suggestionsOpen.value = $event : null,
|
|
@@ -1396,18 +1946,6 @@ var ____scenario__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
1396
1946
|
"playwright",
|
|
1397
1947
|
"output"
|
|
1398
1948
|
]),
|
|
1399
|
-
createVNode(_component_BaseModal, {
|
|
1400
|
-
open: unref(writingAuth),
|
|
1401
|
-
"onUpdate:open": ($event) => isRef(writingAuth) ? writingAuth.value = $event : null,
|
|
1402
|
-
dismissable: false,
|
|
1403
|
-
loading: ""
|
|
1404
|
-
}, {
|
|
1405
|
-
body: withCtx(() => [createVNode(_component_BaseLoadingPhrases, {
|
|
1406
|
-
phrases: AUTH_PHRASES,
|
|
1407
|
-
"data-testid": "auth-carregando"
|
|
1408
|
-
})]),
|
|
1409
|
-
_: 1
|
|
1410
|
-
}, 8, ["open", "onUpdate:open"]),
|
|
1411
1949
|
createVNode(_component_ProjectAuthCredentials, {
|
|
1412
1950
|
open: unref(credentialsOpen),
|
|
1413
1951
|
"onUpdate:open": ($event) => isRef(credentialsOpen) ? credentialsOpen.value = $event : null,
|
|
@@ -1453,4 +1991,4 @@ ____scenario__vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) =
|
|
|
1453
1991
|
var ____scenario__default = ____scenario__vue_vue_type_script_setup_true_lang_default;
|
|
1454
1992
|
|
|
1455
1993
|
export { ____scenario__default as default };
|
|
1456
|
-
//# sourceMappingURL=_...scenario_-
|
|
1994
|
+
//# sourceMappingURL=_...scenario_-qp56INdQ.mjs.map
|