mirror of
https://github.com/codex-team/editor.js
synced 2024-06-09 17:32:31 +02:00
fix tests
This commit is contained in:
parent
25d52b0d46
commit
9051ca7483
|
@ -217,7 +217,6 @@ export default class BlockEvents extends Module {
|
|||
return;
|
||||
}
|
||||
|
||||
this.Editor.BlockSelection.clearSelection();
|
||||
this.activateBlockSettings();
|
||||
}
|
||||
|
||||
|
@ -228,6 +227,10 @@ export default class BlockEvents extends Module {
|
|||
const currentBlock = this.Editor.BlockManager.currentBlock;
|
||||
const canOpenToolbox = currentBlock.isEmpty;
|
||||
|
||||
/**
|
||||
* @todo Handle case when slash pressed when several blocks are selected
|
||||
*/
|
||||
|
||||
/**
|
||||
* Toolbox will be opened only if Block is empty
|
||||
*/
|
||||
|
|
|
@ -433,7 +433,7 @@ export default class Caret extends Module {
|
|||
* @param {boolean} force - pass true to skip check for caret position
|
||||
*/
|
||||
public navigateNext(force = false): boolean {
|
||||
const { BlockManager, BlockSelection } = this.Editor;
|
||||
const { BlockManager } = this.Editor;
|
||||
const { currentBlock, nextBlock } = BlockManager;
|
||||
const { nextInput } = currentBlock;
|
||||
const isAtEnd = this.isAtEnd;
|
||||
|
|
|
@ -38,7 +38,7 @@ class SomePlugin {
|
|||
|
||||
describe('Flipper', () => {
|
||||
it('should prevent plugins event handlers from being called while keyboard navigation', () => {
|
||||
const TAB_KEY_CODE = 9;
|
||||
const SLASH_KEY_CODE = 191;
|
||||
const ARROW_DOWN_KEY_CODE = 40;
|
||||
const ENTER_KEY_CODE = 13;
|
||||
|
||||
|
@ -63,6 +63,7 @@ describe('Flipper', () => {
|
|||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('.cdx-some-plugin')
|
||||
.as('pluginInput')
|
||||
.focus()
|
||||
.type(sampleText)
|
||||
.wait(100);
|
||||
|
@ -71,7 +72,7 @@ describe('Flipper', () => {
|
|||
cy.get('[data-cy=editorjs]')
|
||||
.get('.cdx-some-plugin')
|
||||
// Open tunes menu
|
||||
.trigger('keydown', { keyCode: TAB_KEY_CODE })
|
||||
.trigger('keydown', { keyCode: SLASH_KEY_CODE, ctrlKey: true })
|
||||
// Navigate to delete button (the second button)
|
||||
.trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE })
|
||||
.trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE });
|
||||
|
|
Loading…
Reference in a new issue