Class: Booth::Test::Userland::Logins::MissingOnboarding

Inherits:
Object
  • Object
show all
Includes:
MethodObject, Helpers
Defined in:
lib/booth/test/userland/logins/missing_onboarding.rb

Instance Method Summary collapse

Methods included from Helpers

#assert_logged_in, #assert_logged_out, #assert_userland_partial, #create_virtual_authenticator, #extract_otp_secret_key_and_generate_code, #setup_virtual_authenticator_environment, #soft_reset_session

Methods included from MethodObject

included

Instance Method Details

#callObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/booth/test/userland/logins/missing_onboarding.rb', line 13

def call
  ::Booth::Models::Credential.create!(
    username: 'alice',
    password: 'qwrasfyxv',
    scope:,
    mode: :first_time,
    allowed_modes: [:username_and_password]
  )

  page.visit 

  assert_userland_partial controller: :login, step: :enter_username

  page.fill_in :username, with: 'alice'
  page.click_on :submit

  assert_userland_partial controller: :login, step: :needs_onboarding
end