Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractal.js
Commits
71b5d84b
Commit
71b5d84b
authored
Jun 07, 2017
by
Sascha Herzinger
Browse files
Fixed tests
parent
3cdbed52
Changes
2
Show whitespace changes
Inline
Side-by-side
test/data-box-test.js
View file @
71b5d84b
...
...
@@ -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-
contain
er
'
).
length
).
toBe
(
3
)
expect
(
vm
.
$el
.
querySelectorAll
(
'
.
fjs-
data-entry-
head
er
'
).
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-
contain
er
'
).
length
).
toBe
(
1
)
expect
(
vm
.
$el
.
querySelectorAll
(
'
.
fjs-
data-entry-
head
er
'
).
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-
contain
er
'
).
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-
head
er
'
).
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
()
})
})
test/request-handling-test.js
View file @
71b5d84b
import
requestHandling
from
'
../src/components/m
ixin
s/request-handling
'
import
requestHandling
from
'
../src/components/m
ethod
s/request-handling
'
import
RequestManager
from
'
../src/services/request-manager
'
import
store
from
'
../src/store/store
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment