-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FI-3463: DTR Light EHR: test supported payer endpoint #42
base: main
Are you sure you want to change the base?
FI-3463: DTR Light EHR: test supported payer endpoint #42
Conversation
-Updated route definition -TODO: Fix endpoint configuration
-Added test for supported payer
-TODO: Ensure the endpoint can be while unit testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the url
input from the suite level to the specific groups that require it, so that it is not required for the supported enpoint group.
id :dtr_light_ehr_supported_payer_endpoint | ||
title 'Client can retrieve payers from supported payer endpoint' | ||
description %( | ||
Inferno, will wait for a request to return the payer details from the supported endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a description of what this test checks. something like, 'This test verifies that the app can successfully access the supported payer endpoint via a GET request, including an Accept
header set to application/json
'.
module DaVinciDTRTestKit | ||
class DTRLightEhrSupportedEndpointsGroup < Inferno::TestGroup | ||
id :dtr_light_ehr_supported_endpoints | ||
title 'DTR Supported Endpoints' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title 'DTR Supported Endpoints' | |
title 'Supported Endpoints' |
group do | ||
title 'DTR Light EHR Supported Endpoints' | ||
description %(This test group tests system for their conformance to | ||
the supported endpoint capabilities as defined by the DaVinci Documentation | ||
Templates and Rules (DTR) v2.0.1 Implementation Guide Light DTR EHR | ||
Capability Statement. | ||
|
||
) | ||
|
||
group from: :dtr_light_ehr_supported_endpoints | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don’t need to nest group from: :dtr_light_ehr_supported_endpoints
within another group. You can simply use group from: :dtr_light_ehr_supported_endpoints
directly. Update the dtr_light_ehr_supported_endpoints_group.rb
file with this description.
@@ -0,0 +1,45 @@ | |||
require_relative '../mock_payer' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, since no functionality from that module is being used here.
module DaVinciDTRTestKit | ||
module MockPayer | ||
class LightEHRSupportedPayerEndpoint < Inferno::DSL::SuiteEndpoint | ||
include MockPayer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this as well
def update_result | ||
results_repo.update_result(result.id, 'pass') unless test.config.options[:accepts_multiple_requests] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify this logic so that it fails if the Accept
header is not application/json
and passes otherwise.
@@ -0,0 +1,65 @@ | |||
require_relative '../request_helper' | |||
|
|||
RSpec.describe DaVinciDTRTestKit::DTRLightEhrSupportedEndpointsGroup do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write spec for the Test directly instead of the group.
-TODO: Address the endpoint configuration for spec file
Description
This ticket adds a test for DTR Light EHR requirement 102 to the DTR Light EHR suite. This defines an endpoint, which Inferno can respond to requests and return conformant information.
Important Changes
lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_endpoints_group.rb
lib/davinci_dtr_test_kit/client_groups/light_ehr/dtr_light_ehr_supported_payer_endpoint_test.rb
lib/davinci_dtr_test_kit/dtr_light_ehr_suite.rb
lib/davinci_dtr_test_kit/dtr_light_ehr_suite.rb
lib/davinci_dtr_test_kit/endpoints/mock_payer/light_ehr_supported_payer_endpoint.rb
application/json
spec/davinci_dtr_test_kit/dtr_light_ehr_supported_payer_endpoint_test_spec.rb
lib/davinci_dtr_test_kit/tags.rb
lib/davinci_dtr_test_kit/urls.rb
Testing Recommendations
Make sure all unit tests pass including the ones that were added to this pull request, and the application runs as expected. Run the Light EHR tests to test both expected successes and expected failures. Run the SMART App Test Suite tests to test both expected success and expected failures.
Checklists
Submitter:
Final Merger