Class: Booth::Testing::Support::Shortcuts::CreateAndOnboard

Inherits:
Object
  • Object
show all
Includes:
Calls, Capybara::DSL
Defined in:
lib/booth/testing/support/shortcuts/create_and_onboard.rb

Overview

Create a Credential and use an Onboarding link to login.

Instance Method Summary collapse

Instance Method Details

#callObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/booth/testing/support/shortcuts/create_and_onboard.rb', line 17

def call
  Visit.call(routing_namespace:,
             controller: :onboardings,
             action: :show,
             params: { id: onboarding.secret_key })

  AssertPartial.call(namespace: :userland, controller: :onboardings, step: :redeem)

  click_on :submit

  AssertLoggedIn.call(scope:, credential:)

  nil
end