mirror of
https://github.com/codex-team/editor.js
synced 2024-05-18 22:36:47 +02:00
3272efc3f7
* update eslint + autofix * a bunch of eslint fixes * some spelling & eslint fixes * fix some eslint errors and spells * Update __module.ts * a bunch of eslint fixes in tests * Update cypress.yml * Update cypress.yml * fix cypress docker image name * fixes for tests * more tests fixed * rm rule ignore * rm another ignored rule * Update .eslintrc
36 lines
811 B
TypeScript
36 lines
811 B
TypeScript
import * as _ from '../../../src/components/utils';
|
|
|
|
describe('Blocks selection', () => {
|
|
beforeEach(function () {
|
|
cy.createEditor({}).as('editorInstance');
|
|
});
|
|
|
|
afterEach(function () {
|
|
if (this.editorInstance) {
|
|
this.editorInstance.destroy();
|
|
}
|
|
});
|
|
|
|
it('should remove block selection on click', () => {
|
|
cy.get('[data-cy=editorjs]')
|
|
.find('div.ce-block')
|
|
.click()
|
|
.type('First block{enter}');
|
|
|
|
cy.get('[data-cy=editorjs')
|
|
.find('div.ce-block')
|
|
.next()
|
|
.type('Second block')
|
|
.type('{movetostart}')
|
|
.trigger('keydown', {
|
|
shiftKey: true,
|
|
keyCode: _.keyCodes.UP,
|
|
});
|
|
|
|
cy.get('[data-cy=editorjs')
|
|
.click()
|
|
.find('div.ce-block')
|
|
.should('not.have.class', '.ce-block--selected');
|
|
});
|
|
});
|