testomatio-editor-blocks 0.4.12 → 0.4.14
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/package/editor/snippetAutocomplete.d.ts +1 -0
- package/package/editor/snippetAutocomplete.js +4 -4
- package/package/styles.css +5 -3
- package/package.json +1 -1
- package/src/App.tsx +3 -0
- package/src/editor/snippetAutocomplete.test.ts +1 -0
- package/src/editor/snippetAutocomplete.ts +3 -2
- package/src/editor/styles.css +5 -3
|
@@ -65,7 +65,7 @@ function normalizeSnippetSuggestions(snippets) {
|
|
|
65
65
|
return parseSnippetsFromJsonApi(snippets);
|
|
66
66
|
}
|
|
67
67
|
function normalizeJsonApiResource(resource) {
|
|
68
|
-
var _a, _b, _c;
|
|
68
|
+
var _a, _b, _c, _d;
|
|
69
69
|
if (!resource)
|
|
70
70
|
return null;
|
|
71
71
|
const attrs = resource.attributes;
|
|
@@ -76,10 +76,10 @@ function normalizeJsonApiResource(resource) {
|
|
|
76
76
|
return {
|
|
77
77
|
id: String(id),
|
|
78
78
|
title: String(title),
|
|
79
|
-
body: (_b = attrs === null || attrs === void 0 ? void 0 : attrs.body) !== null && _b !== void 0 ? _b : null,
|
|
80
|
-
description: (
|
|
79
|
+
body: (_c = (_b = attrs === null || attrs === void 0 ? void 0 : attrs.body) !== null && _b !== void 0 ? _b : attrs === null || attrs === void 0 ? void 0 : attrs.description) !== null && _c !== void 0 ? _c : null,
|
|
80
|
+
description: (_d = attrs === null || attrs === void 0 ? void 0 : attrs.description) !== null && _d !== void 0 ? _d : null,
|
|
81
81
|
usageCount: coerceNumber(attrs === null || attrs === void 0 ? void 0 : attrs["usage-count"]),
|
|
82
|
-
isSnippet: true,
|
|
82
|
+
isSnippet: (attrs === null || attrs === void 0 ? void 0 : attrs["is-snippet"]) === true,
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function isSnippetSuggestionArray(value) {
|
package/package/styles.css
CHANGED
|
@@ -502,7 +502,7 @@ html.dark .bn-step-image-preview__content {
|
|
|
502
502
|
top: auto;
|
|
503
503
|
bottom: calc(100% + 6px);
|
|
504
504
|
left: 50%;
|
|
505
|
-
transform: translateX(-50%)
|
|
505
|
+
transform: translateX(-50%);
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.bn-teststep__horizontal-fields {
|
|
@@ -660,11 +660,13 @@ html.dark .bn-step-image-preview__content {
|
|
|
660
660
|
outline: none;
|
|
661
661
|
background: transparent;
|
|
662
662
|
font-family: inherit;
|
|
663
|
-
font-size: 14px;
|
|
663
|
+
font-size: 14px !important;
|
|
664
664
|
font-weight: 500;
|
|
665
|
-
line-height: normal;
|
|
665
|
+
line-height: normal !important;
|
|
666
666
|
color: var(--text-primary);
|
|
667
667
|
width: 100%;
|
|
668
|
+
height: auto;
|
|
669
|
+
display: inline !important;
|
|
668
670
|
padding: 0;
|
|
669
671
|
}
|
|
670
672
|
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -254,6 +254,7 @@ const DEMO_SNIPPET_FIXTURES: SnippetJsonApiDocument = {
|
|
|
254
254
|
body: "Open /login\nWait for form to render\nEnsure no console errors",
|
|
255
255
|
description: "Navigate to login and wait for readiness",
|
|
256
256
|
"usage-count": 12,
|
|
257
|
+
"is-snippet": true,
|
|
257
258
|
},
|
|
258
259
|
},
|
|
259
260
|
{
|
|
@@ -264,6 +265,7 @@ const DEMO_SNIPPET_FIXTURES: SnippetJsonApiDocument = {
|
|
|
264
265
|
body: "Type email\nType password\nClick Sign In",
|
|
265
266
|
description: "Reusable credentials filler",
|
|
266
267
|
"usage-count": 9,
|
|
268
|
+
"is-snippet": true,
|
|
267
269
|
},
|
|
268
270
|
},
|
|
269
271
|
{
|
|
@@ -274,6 +276,7 @@ const DEMO_SNIPPET_FIXTURES: SnippetJsonApiDocument = {
|
|
|
274
276
|
body: "Assert toast visible\nWait 3s\nAssert toast removed",
|
|
275
277
|
description: "Shared assertion for ephemeral notifications",
|
|
276
278
|
"usage-count": 7,
|
|
279
|
+
"is-snippet": true,
|
|
277
280
|
},
|
|
278
281
|
},
|
|
279
282
|
],
|
|
@@ -14,6 +14,7 @@ export type SnippetJsonApiAttributes = {
|
|
|
14
14
|
body?: string | null;
|
|
15
15
|
description?: string | null;
|
|
16
16
|
"usage-count"?: number | string | null;
|
|
17
|
+
"is-snippet"?: boolean | null;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export type SnippetJsonApiResource = {
|
|
@@ -115,10 +116,10 @@ function normalizeJsonApiResource(resource: SnippetJsonApiResource | null | unde
|
|
|
115
116
|
return {
|
|
116
117
|
id: String(id),
|
|
117
118
|
title: String(title),
|
|
118
|
-
body: attrs?.body ?? null,
|
|
119
|
+
body: attrs?.body ?? attrs?.description ?? null,
|
|
119
120
|
description: attrs?.description ?? null,
|
|
120
121
|
usageCount: coerceNumber(attrs?.["usage-count"]),
|
|
121
|
-
isSnippet: true,
|
|
122
|
+
isSnippet: attrs?.["is-snippet"] === true,
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
125
|
|
package/src/editor/styles.css
CHANGED
|
@@ -502,7 +502,7 @@ html.dark .bn-step-image-preview__content {
|
|
|
502
502
|
top: auto;
|
|
503
503
|
bottom: calc(100% + 6px);
|
|
504
504
|
left: 50%;
|
|
505
|
-
transform: translateX(-50%)
|
|
505
|
+
transform: translateX(-50%);
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.bn-teststep__horizontal-fields {
|
|
@@ -660,11 +660,13 @@ html.dark .bn-step-image-preview__content {
|
|
|
660
660
|
outline: none;
|
|
661
661
|
background: transparent;
|
|
662
662
|
font-family: inherit;
|
|
663
|
-
font-size: 14px;
|
|
663
|
+
font-size: 14px !important;
|
|
664
664
|
font-weight: 500;
|
|
665
|
-
line-height: normal;
|
|
665
|
+
line-height: normal !important;
|
|
666
666
|
color: var(--text-primary);
|
|
667
667
|
width: 100%;
|
|
668
|
+
height: auto;
|
|
669
|
+
display: inline !important;
|
|
668
670
|
padding: 0;
|
|
669
671
|
}
|
|
670
672
|
|