From fa9852a43543605d14cafdb11f78e3ee303c81e3 Mon Sep 17 00:00:00 2001 From: jfh Date: Sat, 7 Nov 2020 22:43:04 +0100 Subject: [PATCH] add star tool to cypress --- .../ui/__snapshots__/scenario.js.snap | 90 +++++++++++++++++++ cypress/integration/ui/scenario.js | 9 ++ 2 files changed, 99 insertions(+) diff --git a/cypress/integration/ui/__snapshots__/scenario.js.snap b/cypress/integration/ui/__snapshots__/scenario.js.snap index 21aa0bf8..e86c99c6 100644 --- a/cypress/integration/ui/__snapshots__/scenario.js.snap +++ b/cypress/integration/ui/__snapshots__/scenario.js.snap @@ -355,3 +355,93 @@ exports[`use various parts of svg-edit > check change color #0`] = ` `; + +exports[`use various parts of svg-edit > check tool_start #0`] = ` + + + Layer 1 + + + B + + + B + + + + + + +`; diff --git a/cypress/integration/ui/scenario.js b/cypress/integration/ui/scenario.js index 47bd5f2a..65b95d75 100644 --- a/cypress/integration/ui/scenario.js +++ b/cypress/integration/ui/scenario.js @@ -70,4 +70,13 @@ describe('use various parts of svg-edit', function () { .click({force: true}); testSnapshot(); }); + it('check tool_start', function () { + cy.get('#tool_star') + .click({force: true}); + cy.get('#svgcontent') + .trigger('mousedown', {which: 1, pageX: 600, pageY: 150, force: true}) + .trigger('mousemove', {which: 1, pageX: 600, pageY: 170, force: true}) + .trigger('mouseup', {force: true}); + cy.get('#svgcontent').toMatchSnapshot(); + }); });