Commit cbefa41a authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch 'hotfix-s/4232-missing-informations' into 'dev'

Resolve "Il manque de nombreuses informations sur la page d'un sample set sur la branche dev"

Closes #4232

See merge request !642
parents 0ea6a11f 52346f01
Pipeline #135294 passed with stages
in 11 minutes and 7 seconds
class SampleSetList():
'''
Deals with a list of a type of sample set (either patient, run or set).
This class is used to load all the required information for such a list.
'''
def __init__(self, type, page=None, step=None, tags=None):
self.type = type
......@@ -43,17 +48,17 @@ class SampleSetList():
key = row[type]
else:
key = row
self.elements[key.sample_set_id] = key
self.elements[key.sample_set_id].file_count = 0
self.elements[key.sample_set_id].size = 0
self.elements[key.sample_set_id].conf_list = []
self.elements[key.sample_set_id].conf_id_list = [-1]
self.elements[key.sample_set_id].most_used_conf = ""
self.elements[key.sample_set_id].groups = ""
self.elements[key.sample_set_id].group_list = []
self.elements[key.id] = key
self.elements[key.id].file_count = 0
self.elements[key.id].size = 0
self.elements[key.id].conf_list = []
self.elements[key.id].conf_id_list = [-1]
self.elements[key.id].most_used_conf = ""
self.elements[key.id].groups = ""
self.elements[key.id].group_list = []
#self.elements[key.id].has_permission = auth.can_modify_sample_set(key.sample_set_id)
self.elements[key.sample_set_id].has_permission = auth.can_modify_subset(type, key.id)
self.elements[key.sample_set_id].anon_allowed = auth.can_view_info(type, key.id)
self.elements[key.id].has_permission = auth.can_modify_subset(type, key.id)
self.elements[key.id].anon_allowed = auth.can_view_info(type, key.id)
self.element_ids = self.elements.keys()
......
......@@ -96,6 +96,27 @@ class TestSample < ServerTest
lines = table.tbody.rows
assert(lines.count == count + $num_additional_files + 1)
# Then search for #test4 in the patient list and check that
# the number of files is correct
table = go_to_patient_list
filter = $b.text_field(:id => "db_filter_input")
filter.wait_until(&:present?)
filter.set('#test4')
filter.fire_event('onchange')
Watir::Wait.until(timeout: 30) {$b.execute_script("return jQuery.active") == 0}
table = $b.table(:id => 'table')
lines = table.tbody.rows
assert(lines.count == 1)
nb_files = count + $num_additional_files + 1
nb_files_cell = lines[0].cell(:index => 7)
assert (nb_files_cell.text.include? nb_files.to_s+" ("), "Nb files cell contains "+nb_files_cell.text+" instead of "+nb_files.to_s+" expected"
# Check that we also have the "default + extra reads" config
results_cell = lines[0].cell(:index => 4)
assert (results_cell.text.include? "default + extract reads"), "Results cell contains "+results_cell.text
end
def test_edit
......
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