Commit e4e5b2cc authored by flothoni's avatar flothoni

server/test_sample.rb; add some tests on samples table footer

Link to #3827
parent 1144ff68
Pipeline #131992 canceled with stages
in 11 minutes and 59 seconds
......@@ -281,5 +281,18 @@ class TestSample < ServerTest
lines[0].wait_until(&:present?)
l = lines[0]
assert(l.td(:text => "QUEUED").present? || l.td(:text => "ASSIGNED").present? || l.td(:text => "COMPLETED").present?)
footer = table.tfoot.rows
assert ( footer.length == 1 ), 'footer have correct number of lines'
f = footer[0]
number_sample = f.td(:id => "footer_number_samples")
assert ( number_sample.text == "1 sample(s)" ), 'footer have correct number of sample show'
assert ( f.td(:id => "footer_run_icon").exist? ), 'footer have a run icon'
# change config to "---"
$b.select_list(:id => "choose_config").select("0")
assert ( not f.td(:id => "footer_run_icon").exist? ), "footer don't have a run icon if no config selected"
end
end
......@@ -66,7 +66,7 @@
</tr>
</thead>
<tfoot class="db_fixed_footer">
<tr><td class="column_200">{{ =str(len(query)) }} samples </td>
<tr><td class="column_200" id="footer_number_samples">{{ =str(len(query)) }} sample(s) </td>
<td class="column_100"> </td>
<td> </td>
<td> </td>
......@@ -83,7 +83,7 @@
<td class="column5"></td>
<td class="column5"></td>
<td class="column5"></td>
<td class="column5">
<td class="column5" id="footer_run_icon">
{{if config_id > 0 and auth.can_use_config(config_id) :}}
{{if auth.can_process_sample_set(request.vars['id']) and (config_id > 0 and auth.can_use_config(config_id)) :}}
<span class="pointer"
......
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