Commit 04a10603 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/4375-pouvoir-cacher-les-clones-de-distribution' into 'dev'

Resolve "Pouvoir cacher les clones de distribution"

Closes #4375

See merge request !755
parents 8423b53f a106383e
Pipeline #159734 passed with stages
in 11 minutes and 47 seconds
......@@ -1820,6 +1820,10 @@ table.log textarea {
.tagColor8 {
background: #839496;
}
.tagColor9 {
background: #bdbdbd;
margin-left: 7px;
}
.inactiveTag {
background-image: linear-gradient(45deg, transparent -25%, #000000 100%, #000000 100%, transparent 0%);
}
......
......@@ -1821,6 +1821,10 @@ table.log textarea {
.tagColor8 {
background: #657b83;
}
.tagColor9 {
background: #bdbdbd;
margin-left: 7px;
}
.inactiveTag {
background-image: linear-gradient(45deg, transparent -25%, #ffffff 100%, #ffffff 100%, transparent 0%);
}
......
......@@ -14,6 +14,7 @@
@tagColor5 : #2aa198;
@tagColor6 : #d33682;
@tagColor7 : #859900;
@tagColor9 : #bdbdbd;
@runTokenColor : #ffdde0;
@patientTokenColor : #eed0ff;
......@@ -2059,6 +2060,10 @@ flex-grow : 1;
.tagColor8{
background : @default;
}
.tagColor9{
background : @tagColor9;
margin-left: 7px;
}
.inactiveTag{
background-image : linear-gradient(45deg, transparent -25%, @background 100%, @background 100%, transparent 0%)
}
......
......@@ -1024,7 +1024,9 @@ Clone.prototype = {
},
getTag: function () {
if (this.tag) {
if (this.hasSizeDistrib()) {
return this.m.distrib_tag;
} else if (this.tag) {
return this.tag;
} else {
return this.m.default_tag;
......@@ -1659,7 +1661,7 @@ Clone.prototype = {
return;
}
if (this.m.tag[this.getTag()].display || this.hasSizeDistrib()) {
if (this.m.tag[this.getTag()].display){
this.active = true;
}
else {
......@@ -1668,7 +1670,8 @@ Clone.prototype = {
},
disable: function () {
if (!this.hasSizeConstant()) return
if (!this.hasSizeConstant() && !this.hasSizeDistrib()) return
if (this.hasSizeDistrib() && this.m.tag[this.getTag()].display) return
this.active = false;
},
......
......@@ -506,6 +506,7 @@ Info.prototype = {
spantag.onclick = span_onclick;
span2.appendChild(spantag);
}
break;
case 'productive':
span0.appendChild(document.createTextNode('not productive '));
......
......@@ -262,10 +262,12 @@ Model.prototype = {
{"color" : "#2aa198", "name" : "custom 1", "display" : true},
{"color" : "#d33682", "name" : "custom 2", "display" : true},
{"color" : "#859900", "name" : "custom 3", "display" : true},
{"color" : "", "name" : "-/-", "display" : true}
{"color" : "", "name" : "-/-", "display" : true},
{"color" : "#bdbdbd", "name" : "smaller clones", "display" : true}
]
this.default_tag=8;
this.distrib_tag=9;
for (var i = 0; i < this.view.length; i++) {
this.view[i].reset();
......
# coding: utf-8
load 'vidjil_browser.rb'
load 'browser_test.rb'
#browser test suite
class TestGraph < BrowserTest
def setup
super
if not defined? $b
set_browser("/tools/tests/data/fused_multiple.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
# Make upload menu appear to test the application with this menu too
$b.execute_script("$('#upload_summary')[0].style.display='block';")
end
end
def after_tests
end
##############
### CLONES ###
##############
# id 0 --> biggest clone, IGHV1, IGHJ1, _average_read_length==162
# id 15/16 --> other clone (TRD, IGH)
# id 18 --> lenSeqAverage/_average_read_length == 162
# id 27 --> lenCDR3 (undefined), represent all clones
# id 29 --> seg5; seg3 (IGHV1; IGHJ1)
### Issue 4375; hide distrib clone by tag
def test_00_hide_distrib_clones_with_tagspan
### exist in list
# first, distrib clones are visible, in opened preset 0 or 4
assert ( $b.clone_in_list('0').exists?), ">> real clone exist in list"
assert ( $b.clone_in_list('29').style == "display: block;"), ">> seg5/seg3 distrib clone exist in list"
assert ( $b.clone_in_list('18').style == "display: none;"), ">> lenSeqAverage distrib clone DON'T show in list"
## hide distrib clone by tag switch
$b.info_colorBy.span(:id => "fastTag9").click
$b.update_icon.wait_while(&:present?)
assert ( $b.clone_in_list('0').exists?), ">> real clone still presnet in list"
assert ( $b.clone_in_list('29').style == "display: none;"), ">> seg5/seg3 distrib clone are NO MORE present in list"
## change in another preset with distributions clones
$b.send_keys 4
$b.update_icon.wait_while(&:present?)
assert ( $b.clone_in_list('18').style == "display: none;"), ">> lenSeqAverage distrib clone is NOT present in list"
## Remove filter
$b.send_keys 0
$b.info_colorBy.span(:id => "fastTag9").click
$b.update_icon.wait_while(&:present?)
assert ( $b.clone_in_list('29').style == "display: block;"), ">> seg5/seg3 distrib clone is present in list"
end
# Not really a test
def test_zz_close
close_everything
end
end
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