svgedit/cypress/integration/ui/__snapshots__/scenario.js.snap

747 lines
15 KiB
Plaintext
Raw Normal View History

2020-09-12 23:32:13 +00:00
exports[`use various parts of svg-edit > check tool_source #0`] = `
2020-09-13 21:56:45 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
2020-10-16 22:51:22 +00:00
<g class="layer">
<title>Layer 1</title>
2020-09-13 21:56:45 +00:00
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
></rect>
</g>
2020-09-12 23:32:13 +00:00
</svg>
`;
exports[`use various parts of svg-edit > check tool_fhpath #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer" style="pointer-events:all">
<title style="pointer-events:inherit">Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
style="pointer-events:inherit"
fill-opacity="1"
stroke-opacity="1"
></rect>
</g>
</svg>
`;
2020-09-12 23:32:13 +00:00
exports[`use various parts of svg-edit > check tool_text #0`] = `
2020-09-13 21:56:45 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
2020-10-16 22:51:22 +00:00
<g class="layer">
<title>Layer 1</title>
2020-09-13 21:56:45 +00:00
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
2020-09-13 21:56:45 +00:00
></rect>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
</g>
</svg>
`;
exports[`use various parts of svg-edit > check tool_clone #0`] = `
2020-09-13 21:56:45 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
2020-10-16 22:51:22 +00:00
<g class="layer">
<title>Layer 1</title>
2020-09-13 21:56:45 +00:00
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
2020-09-13 21:56:45 +00:00
></rect>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
</g>
</svg>
`;
exports[`use various parts of svg-edit > check tool_italic #0`] = `
2020-09-13 21:56:45 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
2020-10-16 22:51:22 +00:00
<g class="layer">
<title>Layer 1</title>
2020-09-13 21:56:45 +00:00
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
2020-09-13 21:56:45 +00:00
></rect>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
2020-10-16 22:51:22 +00:00
font-=""
2020-09-13 21:56:45 +00:00
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
</g>
</svg>
`;
exports[`use various parts of svg-edit > check tool_bold #0`] = `
2020-09-13 21:56:45 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
2020-10-16 22:51:22 +00:00
<g class="layer">
<title>Layer 1</title>
2020-09-13 21:56:45 +00:00
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
2020-09-13 21:56:45 +00:00
></rect>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
2020-10-16 22:51:22 +00:00
font-=""
2020-09-13 21:56:45 +00:00
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-13 21:56:45 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-13 21:56:45 +00:00
</text>
</g>
2020-09-12 23:32:13 +00:00
</svg>
`;
2020-09-21 22:18:52 +00:00
exports[`use various parts of svg-edit > check change color #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
2020-10-16 22:51:22 +00:00
<g class="layer">
<title>Layer 1</title>
2020-09-21 22:18:52 +00:00
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-21 22:18:52 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
2020-10-16 22:51:22 +00:00
font-=""
2020-09-21 22:18:52 +00:00
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-21 22:18:52 +00:00
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-09-21 22:18:52 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
2020-09-21 22:18:52 +00:00
</text>
</g>
</svg>
`;
Refactor canvas in multiple pieces to increase maintainability (#446) * #refactor-canvas getJsonFromSvgElement and svgroot code moved to separate file * #refactor-canvas build files changes * #refactor-canvas addSVGElementsFromJson move to json file * #refactor-canvas selected element option function move separate file * #refactor-canvas moveUpDownSelected move to select-elem * ##refactor-canvas build file updated * #refactor-canvas moveSelectedElements move to selected-elem * #refactor-canvas cloneSelectedElements move to slected-elem * #refactor-canvas alignSelectedElements move to selected-elem * #refactor-canvas deleteSelectedElements move to selected-elem * #refactor-canvas copySelectedElements and groupSelectedElements move to selected-elem * #refactor-canvas pushGroupProperty, ungroupSelectedElement move to selected-elem * #refactor-canvas comment changes * #refactor-canvas UndoManager move to separate file * #refactor-canvas event file move to mouseMove, mouseUpEvent and dblClickEvent * #refactor-canvas mouseDown move to event * #refactor-canvas move to undo file * #refactor alignment changes and set function revert return * #refactor-canvas textaction move to separate file * #refactor-canvas paste-element function move to separate file * #refactor-canvas set and get method move to separate file * #refactor-canvas set and get function moved changes * #refactor clear file import and regaring function moved changes changes * #refactor-canvas svg related function move to separate file * #refactor-canvas setBackground methos move to elem-get-set file * #refactor-canvas getBsplinePoint method move to event file * #refactor-canvas export functions move to svg-exec * #refactor-canvas svg related function moved separate file * #refactor-canvas updateCanvas, cycleElement move to selected-elem file * #refactor-canvas removeUnusedDefElems move to svg-exec file * #refactor-canvas blur method move to separate file blur-event.js * #refactor-canvas selection related function move to separate file slection.js * #refactor-canvas convertGradients, mousewheelmove event bind function move to other files * #refactor-canvas extension function move to selection file * #refactor-canvas svg tag long string changes to es6 format * eslint fixes * eslint and test fixes * add netlify logo per their requirements * #refactor-canvas path file separate to path-method.js and path-actions.js * #refactor-canvas lint issue fixed * #refactor-canvas path.js file class and const move to path-method.js * #refactor-canvas eslint issue fixed. 'jsdoc/check-examples': 'off' already so removed eslint-disable jsdoc/check-examples * #refactor-canvas path class moved changes and copy-elem.js file cypress test issue fixed * #refactor-canvas UI - Clipboard paste element cypress issue fixed * #refactor-canvas cypress test cases issue fixed changes * #refactor-canvas cypress test cases issue fixed changes * #refactor-canvas cypress test case issue fixed * npm update and fix a few eslint new errors * fix snapshot and run tests * add star tool to cypress * #refactor-canvas shapelibrary, star, polygon and panning tool issue fixed * build * Update layer.js * revert proper declarations Authored-by OptimistikSAS
2020-11-11 10:38:45 +00:00
2021-05-09 17:29:45 +00:00
exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
2020-12-08 09:37:48 +00:00
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
2020-12-08 09:37:48 +00:00
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
2020-12-08 09:37:48 +00:00
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="start"
xml:space="preserve"
2020-12-08 09:37:48 +00:00
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
</text>
<text
2020-12-08 09:37:48 +00:00
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
2020-12-08 09:37:48 +00:00
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
2020-12-08 09:37:48 +00:00
>
2021-05-09 17:29:45 +00:00
AB
</text>
2020-12-08 09:37:48 +00:00
</g>
</svg>
`;
2021-05-09 17:29:45 +00:00
exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
2020-12-08 09:37:48 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
2020-12-08 09:37:48 +00:00
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
</text>
<text
2020-12-08 09:37:48 +00:00
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
2020-12-08 09:37:48 +00:00
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
2020-12-08 09:37:48 +00:00
>
2021-05-09 17:29:45 +00:00
AB
</text>
2020-12-08 09:37:48 +00:00
</g>
</svg>
`;
2021-05-09 17:29:45 +00:00
exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
</text>
</g>
</svg>
`;
2021-05-09 17:29:45 +00:00
exports[`use various parts of svg-edit > check tool_star #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
</text>
2021-05-09 17:29:45 +00:00
<polygon
cx="370"
cy="202"
id="svg_3"
shape="star"
point="5"
r="66.66666666666667"
radialshift="0"
2021-05-15 15:55:21 +00:00
r2="22.222222222222225"
2021-05-09 17:29:45 +00:00
orient="point"
fill="#ffff00"
2021-05-09 17:29:45 +00:00
strokecolor="#000000"
strokewidth="0"
2021-06-14 07:06:50 +00:00
starradiusmultiplier="3"
2021-05-15 15:55:21 +00:00
points="370,135.33333333333331 383.0618944953883,184.02184456944562 433.40376775301024,181.39886704167017 391.13458925100343,208.86704431944327 409.18568348616486,255.93446629166317 370,224.22222222222223 330.81431651383514,255.93446629166317 348.86541074899657,208.86704431944327 306.59623224698976,181.39886704167017 356.9381055046117,184.02184456944562 370,135.33333333333331 383.0618944953883,184.02184456944562 "
stroke="#000000"
stroke-width="0"
>
2021-05-09 17:29:45 +00:00
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</polygon>
</g>
</svg>
`;
2021-05-09 17:29:45 +00:00
exports[`use various parts of svg-edit > check tool_polygon #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
width="640"
height="480"
id="svgcontent"
overflow="visible"
x="640"
y="480"
viewBox="0 0 640 480"
>
<g class="layer">
<title>Layer 1</title>
<rect
id="rect"
fill="#FF0000"
height="70"
stroke="#000000"
stroke-width="5"
width="94"
x="69.5"
y="51.5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<text
fill="#ffff00"
stroke="#000000"
stroke-width="0"
x="116"
y="87"
id="svg_1"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="end"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
font-=""
font-weight="bold"
>
2021-05-09 17:29:45 +00:00
AB
</text>
<text
fill="#000000"
stroke="#000000"
stroke-width="0"
x="136"
y="107"
font-size="24"
2021-05-09 17:29:45 +00:00
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
stroke-opacity="1"
id="svg_2"
>
2021-05-09 17:29:45 +00:00
AB
</text>
2021-05-09 17:29:45 +00:00
<polygon
cx="370"
cy="202"
id="svg_3"
shape="star"
point="5"
r="66.66666666666667"
radialshift="0"
2021-05-15 15:55:21 +00:00
r2="22.222222222222225"
2021-05-09 17:29:45 +00:00
orient="point"
fill="#ffff00"
2021-05-09 17:29:45 +00:00
strokecolor="#000000"
strokewidth="0"
2021-06-14 07:06:50 +00:00
starradiusmultiplier="3"
2021-05-15 15:55:21 +00:00
points="370,135.33333333333331 383.0618944953883,184.02184456944562 433.40376775301024,181.39886704167017 391.13458925100343,208.86704431944327 409.18568348616486,255.93446629166317 370,224.22222222222223 330.81431651383514,255.93446629166317 348.86541074899657,208.86704431944327 306.59623224698976,181.39886704167017 356.9381055046117,184.02184456944562 370,135.33333333333331 383.0618944953883,184.02184456944562 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
stroke-opacity="1"
2021-05-09 17:29:45 +00:00
></polygon>
<polygon
cx="420"
cy="302"
id="svg_4"
shape="regularPoly"
sides="5"
orient="x"
edge="80"
fill="#ffff00"
strokecolor="#000000"
strokewidth="5"
points="488.0520646681632,302 441.02924448476534,366.7213595499958 364.94472318115305,342 364.94472318115305,262 441.02924448476534,237.27864045000422 488.0520646681632,302 "
stroke="#000000"
2021-05-09 17:29:45 +00:00
stroke-width="5"
>
2021-05-09 17:29:45 +00:00
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</polygon>
</g>
</svg>
`;