From 54926aacce867dea9edfc4a663c2477c64cbaeac Mon Sep 17 00:00:00 2001 From: degradification Date: Thu, 10 Oct 2024 21:58:43 -0400 Subject: [PATCH] Updated Full EHR and SMART App attestation tests to use random id - Fixed typos in `lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb` --- .../dtr_full_ehr_launch_attestation_test.rb | 9 +++++---- .../dtr_full_ehr_prepopulation_attestation_test.rb | 10 +++++----- ...full_ehr_prepopulation_override_attestation_test.rb | 10 +++++----- ...ehr_rendering_enabled_questions_attestation_test.rb | 10 +++++----- .../dtr_full_ehr_store_attestation_test.rb | 10 +++++----- .../dtr_smart_app_prepopulation_attestation_test.rb | 10 +++++----- ...mart_app_prepopulation_override_attestation_test.rb | 9 +++++---- ...app_rendering_enabled_questions_attestation_test.rb | 10 +++++----- .../dtr_questionnaire_rendering_attestation_test.rb | 4 ++-- 9 files changed, 42 insertions(+), 40 deletions(-) diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_launch_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_launch_attestation_test.rb index 41953fd..cbf4907 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_launch_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_launch_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_attestation_test.rb index 9ef3c8c..fbe07a2 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_override_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_override_attestation_test.rb index 8cfc227..d04ed62 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_override_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_prepopulation_override_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_rendering_enabled_questions_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_rendering_enabled_questions_attestation_test.rb index df48ada..e85eb79 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_rendering_enabled_questions_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_rendering_enabled_questions_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_store_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_store_attestation_test.rb index 8574aa7..b622776 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_store_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_full_ehr_store_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_attestation_test.rb index 99092c6..786ec5e 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_override_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_override_attestation_test.rb index 17befdd..67d7324 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_override_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_prepopulation_override_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_rendering_enabled_questions_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_rendering_enabled_questions_attestation_test.rb index 56dba66..9fa12a8 100644 --- a/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_rendering_enabled_questions_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/dinner_static/dtr_smart_app_rendering_enabled_questions_attestation_test.rb @@ -1,3 +1,4 @@ +require 'securerandom' require_relative '../../urls' module DaVinciDTRTestKit @@ -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 diff --git a/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb b/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb index df323b9..b00d890 100644 --- a/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb +++ b/lib/davinci_dtr_test_kit/client_groups/resp_assist_device/dtr_questionnaire_rendering_attestation_test.rb @@ -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