diff --git a/cypress/integration/ui/issues/issue-423.js b/cypress/integration/ui/issues/issue-423.js new file mode 100644 index 00000000..dfb9d442 --- /dev/null +++ b/cypress/integration/ui/issues/issue-423.js @@ -0,0 +1,33 @@ +import { + visitAndApproveStorage +} from '../../../support/ui-test-helper.js'; + +// See https://github.com/SVG-Edit/svgedit/issues/423 +describe('Fix issue 423', function () { + beforeEach(() => { + visitAndApproveStorage(); + }); + + it('should not throw when undoing the move', function () { + cy.get('#tool_source').click(); + cy.get('#svg_source_textarea') + .type('{selectall}') + .type(` + + Layer 1 + + + + + + + + `, {parseSpecialCharSequences: false}); + cy.get('#tool_source_save').click(); + cy.get('#TANK1') + .trigger('mousedown', {force: true}) + .trigger('mousemove', 50, 0, {force: true}) + .trigger('mouseup', {force: true}); + cy.get('#tool_undo').click(); + }); +});