File size: 867 Bytes
271613e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | describe('settings', function () {
let tool = eruda.get('settings')
let $tool = $('.eruda-settings')
let cfg = eruda.Settings.createCfg('test')
cfg.set({
testSwitch: false,
testSelect: '1',
testRange: 1,
testColor: '#fff',
})
beforeEach(function () {
tool.clear()
})
it('switch', function () {
let text = 'Test Switch'
tool.switch(cfg, 'testSwitch', text)
})
it('separator', function () {
tool.separator()
})
it('select', function () {
let text = 'Test Select'
tool.select(cfg, 'testSelect', text, ['1', '2', '3'])
})
it('range', function () {
let text = 'Test Range'
tool.range(cfg, 'testRange', text, { min: 0, max: 1, step: 0.1 })
})
it('remove', function () {
let text = 'Test Switch'
tool.switch(cfg, 'testSwitch', text)
tool.remove(cfg, 'testSwitch')
})
})
|