Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
466f9d97
Commit
466f9d97
authored
Feb 07, 2019
by
flothoni
Browse files
test_model.js; a test on color getted for selected clones, from model view
link to
#3689
parent
f49cb3a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/test/QUnit/testFiles/model_test.js
View file @
466f9d97
...
...
@@ -447,3 +447,42 @@ QUnit.test("findGermlineFromGene", function(assert) {
});
QUnit
.
test
(
"
tag / color
"
,
function
(
assert
)
{
var
m
=
new
Model
();
m
.
parseJsonData
(
json_data
)
var
c1
=
new
Clone
(
json_clone1
,
m
,
0
)
var
c2
=
new
Clone
(
json_clone2
,
m
,
1
)
var
c3
=
new
Clone
(
json_clone3
,
m
,
2
)
var
c4
=
new
Clone
(
json_clone4
,
m
,
3
)
var
c5
=
new
Clone
(
json_clone5
,
m
,
4
)
var
c6
=
new
Clone
(
json_clone6
,
m
,
4
)
m
.
initClones
()
assert
.
equal
(
m
.
getColorSelectedClone
(),
false
,
"
Color of selected clones (empty selection) is correct
"
)
// select 2 clones without tag
m
.
select
(
0
)
m
.
select
(
1
)
assert
.
equal
(
m
.
getColorSelectedClone
(),
""
,
"
Color of selected clones (without tags) is correct
"
)
// Change tag of clones
assert
.
equal
(
c1
.
getTag
(),
8
,
"
getTag() >> default tag : 8
"
);
c1
.
changeTag
(
5
)
c2
.
changeTag
(
5
)
c1
.
updateColor
()
c2
.
updateColor
()
assert
.
equal
(
c1
.
getTag
(),
5
,
"
changeTag() >> tag : 5
"
);
// tag 8 color: ''
// tag 5 color: #2aa198
assert
.
equal
(
m
.
getColorSelectedClone
(),
"
#2aa198
"
,
"
Color of selected clones (same tag) is correct
"
)
// select another clone, without tag
m
.
select
(
2
)
assert
.
equal
(
m
.
getColorSelectedClone
(),
""
,
"
Color of selected clones (mix of clones) is false
"
)
});
\ No newline at end of file
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