Class: SMARTAppLaunch::AppLaunchTest

Inherits:
Inferno::Test
  • Object
show all
Defined in:
lib/smart_app_launch/app_launch_test.rb

Instance Method Summary collapse

Instance Method Details

#default_launch_uriObject



13
14
15
# File 'lib/smart_app_launch/app_launch_test.rb', line 13

def default_launch_uri
  "#{Inferno::Application['base_url']}/custom/smart/launch"
end

#launch_uriObject



17
18
19
# File 'lib/smart_app_launch/app_launch_test.rb', line 17

def launch_uri
  config.options[:launch_uri].presence || default_launch_uri
end

#wait_messageObject



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/smart_app_launch/app_launch_test.rb', line 21

def wait_message
  return instance_exec(&config.options[:launch_message_proc]) if config.options[:launch_message_proc].present?

  %(
    ### #{self.class.parent&.parent&.title}

    Waiting for Inferno to be launched from the EHR.

    Tests will resume once Inferno receives a launch request at
    `#{launch_uri}` with an `iss` of `#{url}`.
  )
end