1 require 'integration_helper'
3 class UserAgreementsTest < ActionDispatch::IntegrationTest
9 def continuebutton_selector
10 'input[type=submit][disabled][value=Continue]'
13 test "cannot click continue without ticking checkbox" do
14 visit page_with_token('inactive')
15 assert_selector continuebutton_selector
18 test "continue button is enabled after ticking checkbox" do
19 visit page_with_token('inactive')
20 assert_selector continuebutton_selector
21 find('input[type=checkbox]').click
22 assert_no_selector continuebutton_selector
23 assert_nil(find_button('Continue')[:disabled],
24 'Continue button did not become enabled')