1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require 'integration_helper'
7 class UserAgreementsTest < ActionDispatch::IntegrationTest
13 def continuebutton_selector
14 'input[type=submit][disabled][value=Continue]'
17 test "cannot click continue without ticking checkbox" do
18 visit page_with_token('inactive')
19 assert_selector continuebutton_selector
22 test "continue button is enabled after ticking checkbox" do
23 visit page_with_token('inactive')
24 assert_selector continuebutton_selector
25 find('input[type=checkbox]').click
26 assert_no_selector continuebutton_selector
27 assert_nil(find_button('Continue')[:disabled],
28 'Continue button did not become enabled')