Skip to content

Commit

Permalink
fix(editor): Schema unit test stub fontawesome icon (#4840)
Browse files Browse the repository at this point in the history
  • Loading branch information
cstuncsik authored Dec 7, 2022
1 parent b7a18c5 commit 1e4ca1f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 97 deletions.
3 changes: 2 additions & 1 deletion packages/editor-ui/src/components/RunDataSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { STORES } from "@/constants";

describe('RunDataJsonSchema.vue', () => {
it('renders json schema properly', () => {
const {container} = render(RunDataJsonSchema, {
const { container } = render(RunDataJsonSchema, {
pinia: createTestingPinia({
initialState: {
[STORES.SETTINGS]: {
Expand All @@ -19,6 +19,7 @@ describe('RunDataJsonSchema.vue', () => {
},
},
}),
stubs: ['font-awesome-icon'],
props: {
mappingEnabled: true,
distanceFromActive: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,10 @@ exports[`RunDataJsonSchema.vue > renders json schema properly 1`] = `
data-target="mappable"
data-value="{{ $json[\\"name\\"] }}"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-font fa-w-14 fa-sm"
data-icon="font"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
class=""
d="M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"
fill="currentColor"
/>
</svg>
<font-awesome-icon-stub
icon="font"
size="sm"
/>
<!---->
<span
class=""
Expand Down Expand Up @@ -94,22 +82,10 @@ exports[`RunDataJsonSchema.vue > renders json schema properly 1`] = `
data-target="mappable"
data-value="{{ $json[\\"age\\"] }}"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-hashtag fa-w-14 fa-sm"
data-icon="hashtag"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
class=""
d="M440.667 182.109l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l14.623-81.891C377.123 38.754 371.468 32 363.997 32h-40.632a12 12 0 0 0-11.813 9.891L296.175 128H197.54l14.623-81.891C213.477 38.754 207.822 32 200.35 32h-40.632a12 12 0 0 0-11.813 9.891L132.528 128H53.432a12 12 0 0 0-11.813 9.891l-7.143 40C33.163 185.246 38.818 192 46.289 192h74.81L98.242 320H19.146a12 12 0 0 0-11.813 9.891l-7.143 40C-1.123 377.246 4.532 384 12.003 384h74.81L72.19 465.891C70.877 473.246 76.532 480 84.003 480h40.632a12 12 0 0 0 11.813-9.891L151.826 384h98.634l-14.623 81.891C234.523 473.246 240.178 480 247.65 480h40.632a12 12 0 0 0 11.813-9.891L315.472 384h79.096a12 12 0 0 0 11.813-9.891l7.143-40c1.313-7.355-4.342-14.109-11.813-14.109h-74.81l22.857-128h79.096a12 12 0 0 0 11.813-9.891zM261.889 320h-98.634l22.857-128h98.634l-22.857 128z"
fill="currentColor"
/>
</svg>
<font-awesome-icon-stub
icon="hashtag"
size="sm"
/>
<!---->
<span
class=""
Expand Down Expand Up @@ -147,22 +123,10 @@ exports[`RunDataJsonSchema.vue > renders json schema properly 1`] = `
data-target="mappable"
data-value="{{ $json[\\"hobbies\\"] }}"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-list fa-w-16 fa-sm"
data-icon="list"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
class=""
d="M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"
fill="currentColor"
/>
</svg>
<font-awesome-icon-stub
icon="list"
size="sm"
/>
<!---->
<span
class=""
Expand All @@ -181,22 +145,9 @@ exports[`RunDataJsonSchema.vue > renders json schema properly 1`] = `
class="_toggle_eg159_20"
for="array-0-2"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-angle-up fa-w-10"
data-icon="angle-up"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 320 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
class=""
d="M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"
fill="currentColor"
/>
</svg>
<font-awesome-icon-stub
icon="angle-up"
/>
</label>
<div
class="_sub_eg159_14"
Expand All @@ -217,22 +168,10 @@ exports[`RunDataJsonSchema.vue > renders json schema properly 1`] = `
data-target="mappable"
data-value="{{ $json[\\"hobbies\\"][0] }}"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-font fa-w-14 fa-sm"
data-icon="font"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
class=""
d="M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"
fill="currentColor"
/>
</svg>
<font-awesome-icon-stub
icon="font"
size="sm"
/>
<span>
hobbies
</span>
Expand Down Expand Up @@ -272,22 +211,10 @@ exports[`RunDataJsonSchema.vue > renders json schema properly 1`] = `
data-target="mappable"
data-value="{{ $json[\\"hobbies\\"][1] }}"
>
<svg
aria-hidden="true"
class="svg-inline--fa fa-font fa-w-14 fa-sm"
data-icon="font"
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
class=""
d="M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"
fill="currentColor"
/>
</svg>
<font-awesome-icon-stub
icon="font"
size="sm"
/>
<span>
hobbies
</span>
Expand Down

0 comments on commit 1e4ca1f

Please sign in to comment.