mirror of
https://github.com/codex-team/editor.js
synced 2026-03-14 22:55:47 +01:00
rm useless tests
This commit is contained in:
parent
e8302031c0
commit
014e44f9b1
1 changed files with 0 additions and 77 deletions
|
|
@ -192,83 +192,6 @@ describe('Editor Tools Api', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should not display tool in toolbox if the tool has single toolbox entry configured and it has title missing', () => {
|
||||
/**
|
||||
* Tool with one of the toolbox entries with icon missing
|
||||
*/
|
||||
class TestTool {
|
||||
/**
|
||||
* Returns toolbox config as list of entries one of which has missing icon
|
||||
*/
|
||||
public static get toolbox(): ToolboxConfig {
|
||||
return {
|
||||
icon: ICON,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
cy.createEditor({
|
||||
tools: {
|
||||
testTool: TestTool,
|
||||
},
|
||||
}).as('editorInstance');
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-block')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-toolbar__plus')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-popover__item[data-item-name=testTool]')
|
||||
.should('not.exist');
|
||||
});
|
||||
|
||||
it('should skip toolbox entries that have no title', () => {
|
||||
const skippedEntryTitle = 'Entry 2';
|
||||
|
||||
/**
|
||||
* Tool with one of the toolbox entries with icon missing
|
||||
*/
|
||||
class TestTool {
|
||||
/**
|
||||
* Returns toolbox config as list of entries one of which has missing icon
|
||||
*/
|
||||
public static get toolbox(): ToolboxConfig {
|
||||
return [
|
||||
{
|
||||
title: 'Entry 1',
|
||||
icon: ICON,
|
||||
},
|
||||
{
|
||||
icon: ICON,
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
cy.createEditor({
|
||||
tools: {
|
||||
testTool: TestTool,
|
||||
},
|
||||
}).as('editorInstance');
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-block')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-toolbar__plus')
|
||||
.click();
|
||||
|
||||
cy.get('[data-cy=editorjs]')
|
||||
.get('div.ce-popover__item[data-item-name=testTool]')
|
||||
.should('have.length', 1)
|
||||
.should('not.contain', skippedEntryTitle);
|
||||
});
|
||||
});
|
||||
|
||||
context('Tunes — renderSettings()', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue