test: 关闭tooltips显示

This commit is contained in:
rsl140 2021-01-18 11:42:21 +08:00
parent 1c6d08c1c4
commit ec08e1270b
1 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import dispatchEvent from '../../helpers/mock-dispatch-event'
import $ from '../../../src/utils/dom-core'
let editor: Editor
let editor2: Editor
describe('tooltip menu', () => {
test('初始化编辑器', () => {
@ -35,3 +36,12 @@ describe('tooltip menu', () => {
}, 300)
})
})
describe('tooltip配置', () => {
test('关闭显示tooltip', () => {
editor2 = createEditor(document, 'div2', '', { showMenuTooltips: false })
expect(editor2.txt).not.toBeNull()
const tooltipMenuEl = $(editor2.$toolbarElem).find('.w-e-menu-tooltip')
expect(tooltipMenuEl.length).toBe(0)
})
})