Skip to content

Commit

Permalink
Updated Full EHR and SMART App attestation tests to use random id
Browse files Browse the repository at this point in the history
- Fixed typos in `lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb`
  • Loading branch information
degradification committed Oct 11, 2024
1 parent 9fe1bbf commit 54926aa
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -9,18 +10,18 @@ class DTRFullEHRStaticDinnerLaunchAttestationTest < Inferno::Test
description %(
Attest that DTR has been launched for a patient with data that will be used for prepopulation.
)
input :access_token

run do
random_id = SecureRandom.uuid
wait(
identifier: access_token,
identifier: random_id,
message: %(
I attest that DTR has been launched in the context of a patient with an official name, including
first and last.
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
[Click here](#{resume_pass_url}?token=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
[Click here](#{resume_fail_url}?token=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -9,20 +10,19 @@ class DTRFullEHRStaticDinnerPrepopulationAttestationTest < Inferno::Test
description %(
Validate that pre-population of patient name information occurs as expected.
)
input :access_token

run do
random_id = SecureRandom.uuid
wait(
identifier: access_token,
identifier: random_id,
message: %(
I attest that the DTR application pre-populates the following questions with the respective
value for the official name of the patient:
- Last Name
- First Name
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
[Click here](#{resume_pass_url}?token=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
[Click here](#{resume_fail_url}?token=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -9,17 +10,16 @@ class DTRFullEHRStaticDinnerPrepopulationOverrideAttestationTest < Inferno::Test
description %(
Validate that the user can edit a pre-populated item and replace it with another value.
)
input :access_token

run do
random_id = SecureRandom.uuid
wait(
identifier: access_token,
identifier: random_id,
message: %(
I attest that I have changed the prepopulated value in the First Name field to a new value.
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
[Click here](#{resume_pass_url}?token=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
[Click here](#{resume_fail_url}?token=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -10,19 +11,18 @@ class DTRFullEHRStaticDinnerRenderingAttestationTest < Inferno::Test
Validate that the rendering of the questionnaire includes only the "What would you like on..."
question appropriate for the dinner selection, if made.
)
input :access_token

run do
random_id = SecureRandom.uuid
wait(
identifier: access_token,
identifier: random_id,
message: %(
I attest that the client application does not display any "What would you like on..."
questions until I have selected a dinner choice and then only displays the
"What would you like on..." question relevant for the dinner request:
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
[Click here](#{resume_pass_url}?token=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
[Click here](#{resume_fail_url}?token=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -10,18 +11,17 @@ class DTRFullEHRStaticDinnerStoreAttestationTest < Inferno::Test
Attest that the questionnaire has been completed and the response has been persisted
and can be exported as a FHIR QuestionnaireResponse instance.
)
input :access_token

run do
random_id = SecureRandom.uuid
wait(
identifier: access_token,
identifier: random_id,
message: %(
I attest that the questionnaire has been completed and stored within the EHR for future
use and export as a FHIR QuestionnaireResponse instance.
[Click here](#{resume_pass_url}?token=#{access_token}) if the above statement is **true**.
[Click here](#{resume_pass_url}?token=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?token=#{access_token}) if the above statement is **false**.
[Click here](#{resume_fail_url}?token=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -9,19 +10,18 @@ class DTRSmartAppStaticDinnerPrepopulationAttestationTest < Inferno::Test
description %(
Validate that pre-population of patient name information occurs as expected.
)
input :client_id

run do
random_id = SecureRandom.uuid
wait(
identifier: client_id,
identifier: random_id,
message: %(
I attest that the client application pre-populates the following questions with the respective values:
- Last Name: Oster
- First Name: William
[Click here](#{resume_pass_url}?client_id=#{client_id}) if the above statement is **true**.
[Click here](#{resume_pass_url}?client_id=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?client_id=#{client_id}) if the above statement is **false**.
[Click here](#{resume_fail_url}?client_id=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -9,20 +10,20 @@ class DTRSmartAppStaticDinnerPrepopulationOverrideAttestationTest < Inferno::Tes
description %(
Validate that the user can edit a pre-populated item and replace it with another value.
)
input :client_id

run do
random_id = SecureRandom.uuid
wait(
identifier: client_id,
identifier: random_id,
message: %(
I attest that
1. The client pre-populated an answer for question 'Location'.
2. I have changed the answer to a different value.
[Click here](#{resume_pass_url}?client_id=#{client_id}) if the above statement is **true**.
[Click here](#{resume_pass_url}?client_id=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?client_id=#{client_id}) if the above statement is **false**.
[Click here](#{resume_fail_url}?client_id=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'securerandom'
require_relative '../../urls'

module DaVinciDTRTestKit
Expand All @@ -10,19 +11,18 @@ class DTRSmartAppStaticDinnerRenderingAttestationTest < Inferno::Test
Validate that the rendering of the questionnaire includes only the "What would you like on..."
question appropriate for the dinner selection, if made.
)
input :client_id

run do
random_id = SecureRandom.uuid
wait(
identifier: client_id,
identifier: random_id,
message: %(
I attest that the client application does not display any "What would you like on..."
questions until I have selected a dinner choice and then only displays the
"What would you like on..." question relevant for the dinner request:
[Click here](#{resume_pass_url}?client_id=#{client_id}) if the above statement is **true**.
[Click here](#{resume_pass_url}?client_id=#{random_id}) if the above statement is **true**.
[Click here](#{resume_fail_url}?client_id=#{client_id}) if the above statement is **false**.
[Click here](#{resume_fail_url}?client_id=#{random_id}) if the above statement is **false**.
)
)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class DTRQuestionnaireRenderingAttestationTest < Inferno::Test
id :dtr_questionnaire_rendering_attestation
title 'Check that the client renders the questionnaire (Attestation)'
description %(
Thist test provides the tester an opportunity to observe their client application following the receipt of the
questionnaire pacakage and attest that the application renders the questionnaire.
This test provides the tester an opportunity to observe their client application following the receipt of the
questionnaire package and attest that the application renders the questionnaire.
)
input :client_id

Expand Down

0 comments on commit 54926aa

Please sign in to comment.