diff --git a/cypress/integration/ui/__snapshots__/scenario.js.snap b/cypress/integration/ui/__snapshots__/scenario.js.snap index 76a4fdc4..f3ed7473 100644 --- a/cypress/integration/ui/__snapshots__/scenario.js.snap +++ b/cypress/integration/ui/__snapshots__/scenario.js.snap @@ -9,10 +9,6 @@ exports[`use various parts of svg-edit > check tool_fhpath #0`] = ` x="640" y="480" viewBox="0 0 640 480" - fill="black" - fill-opacity="1" - stroke="none" - stroke-opacity="1" > Layer 1 @@ -71,10 +67,6 @@ exports[`use various parts of svg-edit > check tool_text #0`] = ` x="640" y="480" viewBox="0 0 640 480" - fill="black" - fill-opacity="1" - stroke="none" - stroke-opacity="1" > Layer 1 @@ -91,32 +83,212 @@ exports[`use various parts of svg-edit > check tool_text #0`] = ` > + fill-opacity="1" + stroke-opacity="1" + > + A + + + +`; + +exports[`use various parts of svg-edit > check tool_clone #0`] = ` + + + Layer 1 + - 12 + A + + + A + + + +`; + +exports[`use various parts of svg-edit > check tool_italic #0`] = ` + + + Layer 1 + + + A + + + A + + + +`; + +exports[`use various parts of svg-edit > check tool_bold #0`] = ` + + + Layer 1 + + + A + + + A diff --git a/cypress/integration/ui/scenario.js b/cypress/integration/ui/scenario.js index 1d13a845..b2ca2d1a 100644 --- a/cypress/integration/ui/scenario.js +++ b/cypress/integration/ui/scenario.js @@ -20,24 +20,43 @@ describe('use various parts of svg-edit', function () { cy.get('#tool_source_save').click(); cy.get('#svgcontent').toMatchSnapshot(); }); - + /* it('check tool_fhpath', function () { cy.get('#tool_fhpath') .click({force: true}); - cy.get('#svgcontent') - .trigger('mousedown', 'center') - .trigger('mousemove', {clientX: 200, clientY: 200, bubbles: true, cancelable: true}) - .trigger('mousemove', {clientX: 20, clientY: 20, bubbles: true, cancelable: true}) + cy.get('#rect') + .trigger('mousemove', 200, 200, {force: true}) + .trigger('mousedown', 200, 200, {force: true}) + .trigger('mousemove', 20, 20, {force: true}) .trigger('mouseup', {force: true}); cy.get('#svgcontent').toMatchSnapshot(); }); +*/ it('check tool_text', function () { cy.get('#tool_text') .click({force: true}); - cy.get('#svgcontent') - .trigger('mousedown', 'center'); + cy.get('#rect') + .trigger('mousedown', 'center', {force: true}) + .trigger('mouseup', {force: true}); // svgedit use the #text text field to capture the text - cy.get('#text').type('1234', {force: true}); + // cy.get('#text').type('1234', {force: true}); + cy.get('#text').type('A', {force: true}); + cy.get('#svgcontent').toMatchSnapshot(); + }); + + it('check tool_clone', function () { + cy.get('#tool_clone') + .click({force: true}); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_italic', function () { + cy.get('#tool_italic') + .click({force: true}); + cy.get('#svgcontent').toMatchSnapshot(); + }); + it('check tool_bold', function () { + cy.get('#tool_bold') + .click({force: true}); cy.get('#svgcontent').toMatchSnapshot(); }); });