This commit is contained in:
Georgy Berezhnoy 2021-04-14 15:35:39 +03:00
parent 5f6447e261
commit 90acad6670
2 changed files with 10 additions and 1 deletions

View file

@ -354,7 +354,7 @@ export default class Tools extends Module {
* @param tool Block Tool
*/
private assignBlockTunesToBlockTool(tool: BlockTool): void {
if (tool.enabledInlineTools === false) {
if (tool.enabledBlockTunes === false) {
return;
}

View file

@ -103,6 +103,7 @@ describe('Tools module', () => {
class: class {} as any,
inlineToolbar: true,
},
blockToolWithoutSettings: class {} as any,
inlineTool: class {
public static isInline = true
@ -204,6 +205,14 @@ describe('Tools module', () => {
expect(Array.from(module.blockTools.values()).every(tool => tool.isBlock())).to.be.true;
});
it('Block Tools should contain default tunes if no settings is specified', () => {
const tool = module.blockTools.get('blockToolWithoutSettings');
expect(tool.tunes.has('deleteTune')).to.be.true;
expect(tool.tunes.has('moveUpTune')).to.be.true;
expect(tool.tunes.has('moveDownTune')).to.be.true;
});
it('Block Tools should contain default tunes', () => {
const tool = module.blockTools.get('blockTool');