update tests
This commit is contained in:
@@ -331,68 +331,6 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_rotation #0`] = `
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_ellipse_change_blur #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>
|
||||
<circle
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
style="pointer-events:inherit"
|
||||
cx="150"
|
||||
cy="150"
|
||||
r="111.80339887498948"
|
||||
id="svg_1"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
></circle>
|
||||
<ellipse
|
||||
fill="#ffff00"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
cx="299"
|
||||
cy="169"
|
||||
rx="60"
|
||||
ry="50"
|
||||
id="svg_2"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
opacity="0.5"
|
||||
></ellipse>
|
||||
<ellipse
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
cx="114"
|
||||
cy="189"
|
||||
rx="55"
|
||||
ry="25"
|
||||
id="svg_3"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
transform="rotate(25 114 189)"
|
||||
filter="url(#svg_3_blur)"
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_ellipse_change_cx_cy_coordinate #0`] = `
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -448,8 +386,8 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_cx_cy_coordinate
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_3_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -510,8 +448,8 @@ exports[`use all parts of svg-edit > check tool_ellipse_change_rx_ry_radius #0`]
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_3_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -572,8 +510,8 @@ exports[`use all parts of svg-edit > check tool_ellipse_bring_to_back #0`] = `
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_3_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -634,8 +572,8 @@ exports[`use all parts of svg-edit > check tool_ellipse_bring_to_front #0`] = `
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_3_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -708,6 +646,68 @@ exports[`use all parts of svg-edit > check tool_ellipse_clone #0`] = `
|
||||
id="svg_4"
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_ellipse_change_blur #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>
|
||||
<circle
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
style="pointer-events:inherit"
|
||||
cx="150"
|
||||
cy="150"
|
||||
r="111.80339887498948"
|
||||
id="svg_1"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
></circle>
|
||||
<ellipse
|
||||
fill="#ffff00"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
cx="299"
|
||||
cy="169"
|
||||
rx="60"
|
||||
ry="50"
|
||||
id="svg_2"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
opacity="0.5"
|
||||
></ellipse>
|
||||
<ellipse
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
cx="114"
|
||||
cy="189"
|
||||
rx="55"
|
||||
ry="25"
|
||||
id="svg_3"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
transform="rotate(25 114 189)"
|
||||
filter="url(#svg_3_blur)"
|
||||
></ellipse>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_3_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
|
||||
@@ -280,69 +280,6 @@ exports[`use all parts of svg-edit > check tool_rect_change_rotation #0`] = `
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_rect_change_blur #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
|
||||
fill="#ffff00"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
x="150"
|
||||
y="150"
|
||||
width="100"
|
||||
height="50"
|
||||
id="svg_1"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
transform="rotate(25 200 175)"
|
||||
filter="url(#svg_1_blur)"
|
||||
></rect>
|
||||
<rect
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
style="pointer-events:inherit"
|
||||
x="350"
|
||||
y="230"
|
||||
width="120"
|
||||
height="100"
|
||||
id="svg_2"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
></rect>
|
||||
<rect
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
style="pointer-events:inherit"
|
||||
x="225"
|
||||
y="300"
|
||||
width="50"
|
||||
height="50"
|
||||
id="svg_3"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_rect_change_opacity #0`] = `
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -400,8 +337,8 @@ exports[`use all parts of svg-edit > check tool_rect_change_opacity #0`] = `
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -463,8 +400,8 @@ exports[`use all parts of svg-edit > check tool_fhrect_change_x_y_coordinate #0`
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -526,8 +463,8 @@ exports[`use all parts of svg-edit > check tool_fhrect_change_width_height #0`]
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -600,8 +537,8 @@ exports[`use all parts of svg-edit > check tool_square_clone #0`] = `
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -674,8 +611,8 @@ exports[`use all parts of svg-edit > check tool_square_bring_to_back #0`] = `
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -748,8 +685,8 @@ exports[`use all parts of svg-edit > check tool_square_bring_to_front #0`] = `
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -824,8 +761,8 @@ exports[`use all parts of svg-edit > check tool_square_change_corner_radius #0`]
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -898,8 +835,8 @@ exports[`use all parts of svg-edit > check tool_rect_change_to_path #0`] = `
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -944,6 +881,69 @@ exports[`use all parts of svg-edit > check tool_rect_delete #0`] = `
|
||||
ry="25"
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_rect_change_blur #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
|
||||
fill="#ffff00"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
x="150"
|
||||
y="150"
|
||||
width="100"
|
||||
height="50"
|
||||
id="svg_1"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
transform="rotate(25 200 175)"
|
||||
filter="url(#svg_1_blur)"
|
||||
></rect>
|
||||
<rect
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
style="pointer-events:inherit"
|
||||
x="350"
|
||||
y="230"
|
||||
width="120"
|
||||
height="100"
|
||||
id="svg_2"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
></rect>
|
||||
<rect
|
||||
fill="#FF0000"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
style="pointer-events:inherit"
|
||||
x="225"
|
||||
y="300"
|
||||
width="50"
|
||||
height="50"
|
||||
id="svg_3"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
></rect>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
|
||||
@@ -84,44 +84,6 @@ exports[`use all parts of svg-edit > check tool_line_change_rotation #0`] = `
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_line_change_blur #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>
|
||||
<line
|
||||
fill="none"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
x1="200"
|
||||
y1="200"
|
||||
x2="450"
|
||||
y2="450"
|
||||
id="svg_1_id"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
class="svg_1_class"
|
||||
transform="rotate(25 325 325)"
|
||||
filter="url(#svg_1_id_blur)"
|
||||
></line>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_id_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_line_change_opacity #0`] = `
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -154,8 +116,8 @@ exports[`use all parts of svg-edit > check tool_line_change_opacity #0`] = `
|
||||
></line>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_id_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_id_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -177,8 +139,8 @@ exports[`use all parts of svg-edit > check tool_line_delete #0`] = `
|
||||
<title style="pointer-events:inherit">Layer 1</title>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_id_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_id_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -245,8 +207,8 @@ exports[`use all parts of svg-edit > check tool_line_clone #0`] = `
|
||||
</line>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_id_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
<filter id="svg_1_id_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
@@ -303,6 +265,44 @@ exports[`use all parts of svg-edit > check tool_fhrect_change_x_y_coordinate #0`
|
||||
></animate>
|
||||
</line>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_id_blur">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="1"></feGaussianBlur>
|
||||
</filter>
|
||||
</defs>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
exports[`use all parts of svg-edit > check tool_line_change_blur #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>
|
||||
<line
|
||||
fill="none"
|
||||
stroke="#000000"
|
||||
stroke-width="5"
|
||||
x1="200"
|
||||
y1="200"
|
||||
x2="450"
|
||||
y2="450"
|
||||
id="svg_1_id"
|
||||
fill-opacity="1"
|
||||
stroke-opacity="1"
|
||||
class="svg_1_class"
|
||||
transform="rotate(25 325 325)"
|
||||
filter="url(#svg_1_id_blur)"
|
||||
></line>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="svg_1_id_blur" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5"></feGaussianBlur>
|
||||
|
||||
@@ -113,17 +113,6 @@ describe('utilities', function () {
|
||||
assert.equal(toXml('\'<&>"'), ''<&>"');
|
||||
});
|
||||
|
||||
it('Test svgedit.utilities.fromXml() function', function () {
|
||||
const { fromXml } = utilities;
|
||||
|
||||
assert.equal(fromXml('a'), 'a');
|
||||
assert.equal(fromXml('ABC_'), 'ABC_');
|
||||
assert.equal(fromXml('PB&J'), 'PB&J');
|
||||
assert.equal(fromXml('2 < 5'), '2 < 5');
|
||||
assert.equal(fromXml('5 > 2'), '5 > 2');
|
||||
assert.equal(fromXml('<&>'), '<&>');
|
||||
});
|
||||
|
||||
it('Test svgedit.utilities.encode64() function', function () {
|
||||
const { encode64 } = utilities;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user