Fix issue 726, move forward / move backward (#728)
This commit is contained in:
39
cypress/integration/ui/issues/issue-726.js
Normal file
39
cypress/integration/ui/issues/issue-726.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import {
|
||||
visitAndApproveStorage
|
||||
} from '../../../support/ui-test-helper.js'
|
||||
|
||||
// See https://github.com/SVG-Edit/svgedit/issues/726
|
||||
describe('Fix issue 726', function () {
|
||||
beforeEach(() => {
|
||||
visitAndApproveStorage()
|
||||
})
|
||||
|
||||
it('Send forward and send backward should move one layer at a time', function () {
|
||||
cy.get('#tool_rect')
|
||||
.click({ force: true })
|
||||
cy.get('#svgcontent')
|
||||
.trigger('mousedown', 250, 250, { force: true })
|
||||
.trigger('mousemove', 350, 350, { force: true })
|
||||
.trigger('mouseup', { force: true })
|
||||
cy.get('#tool_rect')
|
||||
.click({ force: true })
|
||||
cy.get('#svgcontent')
|
||||
.trigger('mousedown', 10, 0, { force: true })
|
||||
.trigger('mousemove', 100, 100, { force: true })
|
||||
.trigger('mouseup', { force: true })
|
||||
cy.get('#tool_rect')
|
||||
.click({ force: true })
|
||||
cy.get('#svgcontent')
|
||||
.trigger('mousedown', 10, 10, { force: true })
|
||||
.trigger('mousemove', 100, 100, { force: true })
|
||||
.trigger('mouseup', { force: true })
|
||||
cy.wait(300)
|
||||
cy.get('#svg_3')
|
||||
.rightclick(0, 0, { force: true })
|
||||
cy.get('a:contains("Send Backward")').click()
|
||||
cy.get('#svg_2').should(($div) => {
|
||||
const id = $div[0].previousElementSibling.id
|
||||
assert.equal(id, 'svg_3')
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user