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



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

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

#launch_uriObject



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

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

#wait_messageObject



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

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