Commit 71b5d84b authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

Fixed tests

parent 3cdbed52
......@@ -20,7 +20,7 @@ describe('DataBox', () => {
const Component = Vue.extend(DataBox)
const propsData = {dataType: 'numeric', header: ''}
const vm = new Component({propsData}).$mount()
expect(vm.$el.querySelectorAll('.data-entry-container').length).toBe(3)
expect(vm.$el.querySelectorAll('.fjs-data-entry-header').length).toBe(3)
})
it('only renders checkboxes for data with correct type', () => {
......@@ -31,7 +31,7 @@ describe('DataBox', () => {
const Component = Vue.extend(DataBox)
const propsData = {dataType: 'numeric', header: ''}
const vm = new Component({propsData}).$mount()
expect(vm.$el.querySelectorAll('.data-entry-container').length).toBe(1)
expect(vm.$el.querySelectorAll('.fjs-data-entry-header').length).toBe(1)
})
it('checkboxes are linked to data', () => {
......@@ -43,8 +43,8 @@ describe('DataBox', () => {
const propsData = {dataType: 'numeric', header: ''}
const data = {selectedIDs: ['A']}
const vm = new Component({propsData, data}).$mount()
expect(vm.$el.querySelectorAll('.data-entry-container').length).toBe(2)
expect(vm.$el.querySelector('#data-check-A').checked).toBeTruthy()
expect(vm.$el.querySelector('#data-check-B').checked).toBeFalsy()
expect(vm.$el.querySelectorAll('.fjs-data-entry-header').length).toBe(2)
expect(vm.$el.querySelector(`#fjs-checkbox-A-${vm._uid}`).checked).toBeTruthy()
expect(vm.$el.querySelector(`#fjs-checkbox-B-${vm._uid}`).checked).toBeFalsy()
})
})
import requestHandling from '../src/components/mixins/request-handling'
import requestHandling from '../src/components/methods/request-handling'
import RequestManager from '../src/services/request-manager'
import store from '../src/store/store'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment