Commit 489af119 authored by Mikaël Salson's avatar Mikaël Salson

server/tests/functional: .cell(s) cannot be used in such a context

cell or cells exists on TableRow but parent just returns an Element.
Therefore we find another way of having the same behaviour.
parent d2b3f605
......@@ -102,7 +102,7 @@ class TestPreProcess < ServerTest
list = $b.table(:id => "table")
list.wait_until(&:present?)
line = table.td(:text => "public").parent
checkbox = line.cells.last.checkbox
checkbox = line.checkbox
assert(checkbox.set? == false)
checkbox.click
......@@ -112,7 +112,7 @@ class TestPreProcess < ServerTest
list = $b.table(:id => "table")
list.wait_until(&:present?)
line = table.td(:text => "public").parent
checkbox = line.cells.last.checkbox
checkbox = line.checkbox
assert(checkbox.set?)
end
end
......@@ -46,7 +46,7 @@ class TestSample < ServerTest
def go_to_set_by_tag(tag)
table = go_to_patient_list
table.a(:text => tag).parent.parent.cells[2].click
table.a(:text => tag).parent.parent.td(:class => 'uid').click
Watir::Wait.until(timeout: 30) {$b.execute_script("return jQuery.active") == 0}
samples_table = $b.table(:id => "table")
samples_table.wait_until(&:present?)
......@@ -151,21 +151,21 @@ class TestSample < ServerTest
table = $b.table(:id => "table")
table.wait_until(&:present?)
patient_id = table.a(:text => "#set_assoc_0").parent.parent.cells[0].text
patient_id = table.a(:text => "#set_assoc_0").parent.parent.td(:class => 'uid').text
$b.a(:class => "button button_token run_token", :text => "runs").click
Watir::Wait.until(timeout: 30) {$b.execute_script("return jQuery.active") == 0}
table = $b.table(:id => "table")
table.wait_until(&:present?)
run_id = table.a(:text => "#set_assoc_0").parent.parent.cells[0].text
run_id = table.a(:text => "#set_assoc_0").parent.parent.td(:class => 'uid').text
$b.a(:class => "button button_token generic_token", :text => "sets").click
Watir::Wait.until(timeout: 30) {$b.execute_script("return jQuery.active") == 0}
table = $b.table(:id => "table")
table.wait_until(&:present?)
set_id = table.a(:text => "#set_assoc_0").parent.parent.cells[0].text
set_id = table.a(:text => "#set_assoc_0").parent.parent.td(:class => 'uid').text
samples_table = go_to_set_by_tag "#set_assoc_0"
$b.span(:class => "button2", :text => "+ add samples").click
......
......@@ -107,7 +107,7 @@ class TestSampleSet < ServerTest
table.wait_until(&:present?)
table = go_to_list
line = table.td(:class => "uid", :text => sample_set_id).parent
assert(line.cell(:index => 3).text == "#edited")
assert(line.td(:index => 3).text == "#edited")
end
def test_patient_delete
......
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