mirror of
https://github.com/codex-team/editor.js
synced 2026-03-18 00:19:53 +01:00
Fix tests
This commit is contained in:
parent
ac05f80a1a
commit
6392cc1fff
5 changed files with 7 additions and 3 deletions
|
|
@ -91,6 +91,7 @@ export default class DeleteTune implements BlockTune {
|
|||
icon: $.svg('cross', 14, 14).outerHTML,
|
||||
label: this.api.i18n.t('Delete'),
|
||||
onClick: (item, e): void => this.handleClick(e),
|
||||
name: 'delete',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ export default class MoveDownTune implements BlockTune {
|
|||
icon: $.svg('arrow-down', 14, 14).outerHTML,
|
||||
label: this.api.i18n.t('Move down'),
|
||||
onClick: (item): void => this.handleClick(),
|
||||
name: 'move-down',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ export default class MoveUpTune implements BlockTune {
|
|||
icon: $.svg('arrow-up', 14, 14).outerHTML,
|
||||
label: this.api.i18n.t('Move up'),
|
||||
onClick: (item, e): void => this.handleClick(e),
|
||||
name: 'move-up',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -665,7 +665,8 @@ export default class Block extends EventsDispatcher<BlockEvents> {
|
|||
*
|
||||
*/
|
||||
public getTunesItems(): PopoverItem[] {
|
||||
return Array.from(this.defaultTunesInstances.values()).map(tune => tune.blockSettings)
|
||||
return Array.from(this.defaultTunesInstances.values())
|
||||
.map(tune => tune.blockSettings)
|
||||
.filter(item => !!item);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ describe('onChange callback', () => {
|
|||
.click();
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-settings__button--delete')
|
||||
.get('div[data-item-name=delete]')
|
||||
.click()
|
||||
.click();
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ describe('onChange callback', () => {
|
|||
.click();
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-tune-move-up')
|
||||
.get('div[data-item-name=move-up]')
|
||||
.click();
|
||||
|
||||
cy.get('@onChange').should('be.calledWithMatch', EditorJSApiMock, Cypress.sinon.match({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue