testomatio-editor-blocks 0.4.46 → 0.4.48

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.
@@ -10,11 +10,15 @@ const baseProps = {
10
10
  describe("markdownToBlocks", () => {
11
11
  it("parses test steps and test cases", () => {
12
12
  const markdown = [
13
+ "### Steps",
14
+ "",
13
15
  "* Open the Login page.",
14
16
  " *Expected*: The Login page loads successfully.",
15
17
  ].join("\n");
16
18
 
17
- expect(markdownToBlocks(markdown)).toEqual([
19
+ const blocks = markdownToBlocks(markdown);
20
+ const stepBlocks = blocks.filter((b) => b.type === "testStep");
21
+ expect(stepBlocks).toEqual([
18
22
  {
19
23
  type: "testStep",
20
24
  props: {
@@ -30,12 +34,16 @@ describe("markdownToBlocks", () => {
30
34
 
31
35
  it("parses snippet markdown into snippet blocks", () => {
32
36
  const markdown = [
37
+ "### Steps",
38
+ "",
33
39
  "<!-- begin snippet #501 -->",
34
40
  "Run the seeder",
35
41
  "<!-- end snippet #501 -->",
36
42
  ].join("\n");
37
43
 
38
- expect(markdownToBlocks(markdown)).toEqual([
44
+ const blocks = markdownToBlocks(markdown);
45
+ const snippetBlocks = blocks.filter((b) => b.type === "snippet");
46
+ expect(snippetBlocks).toEqual([
39
47
  {
40
48
  type: "snippet",
41
49
  props: {
@@ -51,6 +59,8 @@ describe("markdownToBlocks", () => {
51
59
 
52
60
  it("parses snippet bodies and ignores nested snippet markers", () => {
53
61
  const markdown = [
62
+ "### Steps",
63
+ "",
54
64
  "<!-- begin snippet #888 -->",
55
65
  "Prep DB",
56
66
  "<!-- begin snippet #ignored -->",
@@ -59,7 +69,9 @@ describe("markdownToBlocks", () => {
59
69
  "<!-- end snippet #888 -->",
60
70
  ].join("\n");
61
71
 
62
- expect(markdownToBlocks(markdown)).toEqual([
72
+ const blocks = markdownToBlocks(markdown);
73
+ const snippetBlocks = blocks.filter((b) => b.type === "snippet");
74
+ expect(snippetBlocks).toEqual([
63
75
  {
64
76
  type: "snippet",
65
77
  props: {
@@ -942,6 +942,11 @@ html.dark .bn-step-image-preview__content {
942
942
  background: var(--step-bg-button-hover);
943
943
  }
944
944
 
945
+ .bn-step-toolbar__button--active {
946
+ background: var(--step-bg-button-hover);
947
+ color: var(--step-input-border-focus);
948
+ }
949
+
945
950
  [data-tooltip] {
946
951
  position: relative;
947
952
  }
@@ -1074,8 +1079,7 @@ html.dark .bn-step-image-preview__content {
1074
1079
  }
1075
1080
 
1076
1081
  .bn-step-editor .overtype-wrapper .overtype-preview strong.step-preview-bold {
1077
- -webkit-text-stroke: 0.5px currentColor;
1078
- font-weight: inherit !important;
1082
+ font-weight: 600 !important;
1079
1083
  color: inherit !important;
1080
1084
  }
1081
1085
 
@@ -1085,9 +1089,10 @@ html.dark .bn-step-image-preview__content {
1085
1089
  }
1086
1090
 
1087
1091
  .bn-step-editor .overtype-wrapper .overtype-preview code.step-preview-code {
1088
- background-color: rgba(135, 131, 120, 0.15) !important;
1092
+ background-color: transparent !important;
1089
1093
  border-radius: 3px !important;
1090
- color: inherit !important;
1094
+ font-family: "Fira Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
1095
+ color: rgb(146, 64, 14) !important;
1091
1096
  }
1092
1097
 
1093
1098
  .bn-step-custom-caret {
@@ -1334,6 +1339,11 @@ html.dark .bn-step-image-preview__content {
1334
1339
  pointer-events: none;
1335
1340
  }
1336
1341
 
1342
+ .bn-suggestion-menu .mantine-Badge-label {
1343
+ text-transform: none;
1344
+ font-size: var(--badge-fz-sm);
1345
+ }
1346
+
1337
1347
  .bn-suggestion-icon {
1338
1348
  display: inline-flex;
1339
1349
  align-items: center;
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ export {
4
4
  type CustomBlock,
5
5
  type CustomEditor,
6
6
  } from "./editor/customSchema";
7
- export { stepBlock, canInsertStepOrSnippet, isStepsHeading, addStepsBlock } from "./editor/blocks/step";
7
+ export { stepBlock, canInsertStepOrSnippet, isStepsHeading, addStepsBlock, addSnippetBlock } from "./editor/blocks/step";
8
8
  export { snippetBlock } from "./editor/blocks/snippet";
9
9
  export { markdownToHtml, htmlToMarkdown } from "./editor/blocks/markdown";
10
10