add tests for GraphOptionsFixFirstColumn

pull/10616/head
Iris Scholten 2018-03-23 17:42:39 -07:00
parent 51fc44d50f
commit 32ddfa7c0b
1 changed files with 18 additions and 0 deletions

View File

@ -26,5 +26,23 @@ describe('Dashboards.Components.GraphOptionsFixFirstColumn', () => {
expect(checkbox.exists()).toBe(true)
expect(checkbox.prop('type')).toBe('checkbox')
})
describe('if fixed is true', () => {
it('input is checked', () => {
const {wrapper} = setup()
const checkbox = wrapper.find('input')
expect(checkbox.prop('checked')).toBe(true)
})
})
describe('if fixed is false', () => {
it('input is not checked', () => {
const {wrapper} = setup({fixed: false})
const checkbox = wrapper.find('input')
expect(checkbox.prop('checked')).toBe(false)
})
})
})
})