Commit 059c1a42 authored by flothoni's avatar flothoni

test_list.rb; update test with new behavior

Link to #4222
parent c3d3d861
Pipeline #130624 passed with stages
in 13 minutes and 58 seconds
......@@ -27,32 +27,58 @@ class TestList < BrowserTest
# tester la presence du lock
assert ( $lock.attribute_value("class") == "icon-lock-1 list_lock_on"), "lock start in good state (locked)"
assert ( $lock.attribute_value("title") == "Release sort as '-' on sample diag"), "lock title start by showing 'release xxx'"
# print $lock.attribute_value("title") # Release sort as '-' on sample diag
# change order by 'size'
$b.select(:id => 'list_sort_select').click
$b.send_keys :arrow_down
$b.send_keys :enter
$b.update_icon.wait_while(&:present?)
assert ( $lock.attribute_value("title") == "Release sort as 'size' on sample diag"), "lock title start by showing 'release xxx'"
# tester l'ordre des clones
l0 = $listClone.div(index: 0)
assert ( l0.id == "listElem_0" ), "opening; correct id of the first element"
$b.div(:id => "left-container").click # get out of the select list
end
def test_01_xxx
# Change sample (-> fu1); order should still the same
$b.send_keys :arrow_right
$b.update_icon.wait_while(&:present?)
# list should show '-' as sort option
# todo !!!
l0 = $listClone.div(index: 0)
assert ( l0.id == "listElem_0" ), "opening; correct id of the first element"
assert ( $lock.attribute_value("title") == "Release sort as 'size' on sample diag"), "lock title still showsame message"
$b.screenshot.save 'screenshot.png'
end
def test_02_xxx
# Lock off
$lock.click
assert ( $lock.attribute_value("class") == "icon-lock-open list_lock_off"), "lock in good state after click (unlocked)"
assert ( $lock.attribute_value("title") == "Freeze list as 'size' on sample fu1"), "lock title show correct effet if click in icon (freeze, size, fu1)"
# Clone order should have changed (automatic sort)
# print "\n"+$lock.attribute_value("title")+"\n"
assert ( $lock.attribute_value("title") == "Freeze list as '-' on sample fu1"), "lock title show correct effet if click in icon (freeze, size, fu1)"
# Clone order should NOT have changed (as sort is now '-')
l0 = $listClone.div(index: 0)
assert ( l0.id == "listElem_0" ), "opening; correct id of the first element"
# change order by 'size'
$b.select(:id => 'list_sort_select').click
$b.send_keys :arrow_down
$b.send_keys :enter
$b.update_icon.wait_while(&:present?)
# Clone order should have changed (sort 'size')
l0 = $listClone.div(index: 0)
assert ( l0.id == "listElem_5" ), "opening; correct id of the first element (clone other)"
$lock.click # remove lock
l0 = $listClone.div(index: 0)
assert ( l0.id == "listElem_5" ), "opening; correct id of the first element (clone other)"
$b.div(:id => "left-container").click # get out of the select list
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