1 # This file is used to define methods reusable by two or more integration tests
4 # check_checkboxes_state asserts that the page holds at least one
5 # checkbox matching 'selector', and that all matching checkboxes
6 # are in state 'checkbox_status' (i.e. checked if true, unchecked otherwise)
7 def assert_checkboxes_state(selector, checkbox_status, msg=nil)
8 assert page.has_selector?(selector)
9 page.all(selector).each do |checkbox|
10 assert(checkbox.checked? == checkbox_status, msg)