now you can use directlt svgcanvas. see readme.md * configure workspaces * move svgcanvas to packages folder * move utils to common and paint to svgcanvas * make svgcanvas a dependency of svgedit * update deps * workspaces requires npm 7 at least so the ci needs a new node version * update github actions to V3 * update snapshots using custom svg exports * remove unmaintained cypress snapshot plugin * new github action to add coverage in PR * Update onpushandpullrequest.yml * svgcanvas v7.1.6
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
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({ force: true })
|
|
cy.get('#svg_source_textarea')
|
|
.type('{selectall}', { force: true })
|
|
.type(`<svg width="300" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
|
<g class="layer">
|
|
<title>Layer 1</title>
|
|
<g class="layer" id="svg_1">
|
|
<clipPath id="svg_2">
|
|
<rect height="150" id="svg_3" width="50" x="50" y="50"/>
|
|
</clipPath>
|
|
<rect clip-path="url(#svg_2)" fill="#0033b5" height="174.9" id="TANK1" width="78" x="77.5" y="29"/>
|
|
</g>
|
|
</g>
|
|
</svg>`, { parseSpecialCharSequences: false, force: true })
|
|
cy.get('#tool_source_save').click({ force: true })
|
|
cy.get('#TANK1')
|
|
.trigger('mousedown', { force: true })
|
|
.trigger('mousemove', 50, 0, { force: true })
|
|
.trigger('mouseup', { force: true })
|
|
cy.get('#tool_undo').click({ force: true })
|
|
})
|
|
})
|