#603 rect and square cypress test cases added

master
agriyadev5 2021-08-24 20:01:28 +05:30
parent af33ae1db3
commit 66ee80ac0d
2 changed files with 53 additions and 16 deletions

View File

@ -101,7 +101,7 @@ exports[`use all parts of svg-edit > check tool_shape #0`] = `
</svg>
`;
exports[`use all parts of svg-edit > check mode_connect #0`] = `
exports[`use all parts of svg-edit > check tool_rect_square #0`] = `
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
@ -143,15 +143,22 @@ exports[`use all parts of svg-edit > check mode_connect #0`] = `
fill="#FF0000"
stroke="#000000"
stroke-width="5"
opacity="0.5"
style="pointer-events:inherit"
x="296"
y="136"
width="150"
height="120"
id="svg_3"
fill-opacity="1"
stroke-opacity="1"
></rect>
>
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</rect>
<rect
fill="#FF0000"
stroke="#000000"
@ -172,6 +179,26 @@ exports[`use all parts of svg-edit > check mode_connect #0`] = `
to="1"
></animate>
</rect>
<rect
fill="#FF0000"
stroke="#000000"
stroke-width="5"
opacity="0.5"
style="pointer-events:inherit"
x="216"
y="156"
width="100"
height="100"
id="svg_5"
>
<animate
attributeName="opacity"
begin="indefinite"
dur="0.2"
fill="freeze"
to="1"
></animate>
</rect>
</g>
</svg>
`;
@ -240,12 +267,25 @@ exports[`use all parts of svg-edit > check tool_image #0`] = `
fill-opacity="1"
stroke-opacity="1"
></rect>
<rect
fill="#FF0000"
stroke="#000000"
stroke-width="5"
style="pointer-events:inherit"
x="216"
y="156"
width="100"
height="100"
id="svg_5"
fill-opacity="1"
stroke-opacity="1"
></rect>
<image
x="296"
y="176"
width="20"
height="20"
id="svg_5"
id="svg_6"
opacity="0.5"
style="pointer-events:inherit"
xlink:href="./images/logo.svg"

View File

@ -49,7 +49,7 @@ describe('use all parts of svg-edit', function () {
.trigger('mouseup', { force: true });
cy.get('#svgcontent').toMatchSnapshot();
});
it('check mode_connect', function () {
it('check tool_rect_square', function () {
cy.get('#tool_rect').click({ force: true });
cy.get('#svgcontent')
.trigger('mousedown', 100, -60, { force: true })
@ -60,18 +60,15 @@ describe('use all parts of svg-edit', function () {
.trigger('mousedown', 250, -60, { force: true })
.trigger('mousemove', 430, 120, { force: true })
.trigger('mouseup', { force: true });
cy.get('#tool_select')
.click({ force: true });
cy.get('#mode_connect')
cy.get('#tool_fhrect')
.click({ force: true });
cy.get('#svgcontent')
.trigger('mousemove', 220, 80, { force: true })
.trigger('mousedown', 220, 80, { force: true })
.trigger('mouseup', 220, 80, { force: true });
cy.get('#svgcontent')
.trigger('mousemove', 410, 80, { force: true })
.trigger('mousedown', 410, 80, { force: true })
.trigger('mouseup', 410, 80, { force: true });
.trigger('mousedown', 20, 80, { force: true })
.trigger('mousemove', 120, 80, { force: true })
.trigger('mousemove', 120, 180, { force: true })
.trigger('mousemove', 20, 180, { force: true })
.trigger('mousemove', 20, 80, { force: true })
.trigger('mouseup', 20, 80, { force: true });
cy.get('#svgcontent').toMatchSnapshot();
});
it('check tool_image', function () {