svgedit/cypress/integration/ui/tool-selection.js

21 lines
577 B
JavaScript
Raw Normal View History

import {
visitAndApproveStorage
} from '../../support/ui-test-helper.js';
describe('UI - Tool selection', function () {
beforeEach(() => {
visitAndApproveStorage();
});
it('should set rectangle selection by click', function () {
2020-10-16 21:22:31 +00:00
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.get('#tools_rect_show')
.trigger('mousedown', {force: true})
2020-10-16 21:22:31 +00:00
.wait(100) // this delay seems necessary
.trigger('mouseup', {force: true})
.should((button) => {
expect(button).to.have.class('tool_button_current');
});
});
});