Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / test / integration / integration_test_utils.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 # This file is used to define methods reusable by two or more integration tests
6 #
7
8 # check_checkboxes_state asserts that the page holds at least one
9 # checkbox matching 'selector', and that all matching checkboxes
10 # are in state 'checkbox_status' (i.e. checked if true, unchecked otherwise)
11 def assert_checkboxes_state(selector, checkbox_status, msg=nil)
12   assert page.has_selector?(selector)
13   page.all(selector).each do |checkbox|
14     assert(checkbox.checked? == checkbox_status, msg)
15   end
16 end