From 2fbc07eabe39951bb95876ad2de19fb7469c50ca Mon Sep 17 00:00:00 2001 From: Yan Chen Date: Tue, 17 Oct 2023 18:56:18 +0000 Subject: [PATCH 1/3] FOIA-439: Add field to NIH form. --- .../default/webform.webform.hhs_nih_form.yml | 39 ++++++++++++++++++- config/default/webform_template.webform.yml | 2 +- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/config/default/webform.webform.hhs_nih_form.yml b/config/default/webform.webform.hhs_nih_form.yml index 25a1a2cb2..f4dd67313 100644 --- a/config/default/webform.webform.hhs_nih_form.yml +++ b/config/default/webform.webform.hhs_nih_form.yml @@ -14,7 +14,7 @@ id: hhs_nih_form title: 'HHS-NIH Form' description: '' category: '' -elements: | +elements: |- name_first: '#type': textfield '#title': 'First name' @@ -105,6 +105,43 @@ elements: | '#options': 'no': 'No' 'yes': 'Yes' + select_the_nih_institute: + '#type': select + '#title': 'Select the NIH institute' + '#help_title': 'Selection of the NIH institute' + '#help': 'You may find useful information on the NIH FOIA page that could assist you with your request. We encourage you to visit the NIH FOIA webpage for instructions on how to file a request. Alternatively, you can select the NIH institute that is most relevant to your inquiry from the drop-down menu below. This will help NIH process your request faster and more efficiently. If unsure, please select “Office of the Director”. Thank you for your interest in the NIH.' + '#options': + OD: 'Office of the Director ' + NCI: 'National Cancer Institute' + NEI: 'National Eye Institute ' + NHLBI: 'National Heart, Lung, and Blood Institute' + NHGRI: 'National Human Genome Research Institute' + NIA: 'National Institute on Aging' + NIAAA: 'National Institute on Alcohol Abuse and Alcoholism' + NIAID: 'National Institute of Allergy and Infectious Diseases' + NIAMS: 'National Institute of Arthritis and Musculoskeletal and Skin Diseases' + NIBIB: 'National Institute of Biomedical Imaging and Bioengineering' + NICHD: 'Eunice Kennedy Shriver National Institute of Child Health and Human Development' + NIDCD: 'National Institute on Deafness and Other Communication Disorders' + NIDCR: 'National Institute of Dental and Craniofacial Research' + NIDDK: 'National Institute of Diabetes and Digestive and Kidney Diseases' + NIDA: 'National Institute on Drug Abuse' + NIEHS: 'National Institute of Environmental Health Sciences' + NIGMS: 'National Institute of General Medical Sciences' + NIMH: 'National Institute of Mental Health' + NIMHD: 'National Institute on Minority Health and Health Disparities' + NINDS: 'National Institute of Neurological Disorders and Stroke' + NINR: 'National Institute of Nursing Research' + NLM: 'National Library of Medicine' + CC: 'NIH Clinical Center' + CIT: 'Center for Information Technology' + CSR: 'Center for Scientific Review' + FIC: 'Fogarty International Center' + NCATS: 'National Center for Advancing Translational Sciences' + NCCIH: 'National Center for Complementary and Integrative Health' + '#empty_option': '- None -' + '#empty_value': NONE + '#sort_options': true expedited_processing_explanation: '#type': textarea '#maxlength': 10000 diff --git a/config/default/webform_template.webform.yml b/config/default/webform_template.webform.yml index 83ad155ee..f206bdd24 100644 --- a/config/default/webform_template.webform.yml +++ b/config/default/webform_template.webform.yml @@ -72,7 +72,7 @@ hhs_cms_form: 1 hhs_fda_form: 1 hhs_hrsa_form: 1 hhs_ihs_form: 1 -hhs_nih_form: 1 +hhs_nih_form: 0 hhs_oash_form: 1 hhs_oig_form: 1 hhs_samhsa_form: 1 From 6046471c97dd3f6f8b35f310e763b0c623c17bc9 Mon Sep 17 00:00:00 2001 From: Yan Chen Date: Wed, 18 Oct 2023 13:43:27 +0000 Subject: [PATCH 2/3] FOIA-439: Add behat testing to verify NIH form. --- tests/behat/features/Administrator.feature | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/behat/features/Administrator.feature b/tests/behat/features/Administrator.feature index 3edcef44d..92c74c272 100644 --- a/tests/behat/features/Administrator.feature +++ b/tests/behat/features/Administrator.feature @@ -112,3 +112,15 @@ Feature: Agency Administrator role And I am on "/node/add/agency_component" Then I should see "Report Start Date" And I should see "Report Expiration Date" + + @api @javascript + Scenario: Verify NIH webform has Select the NIH institute drop down selection + Given users: + | name | mail | roles | + | Mini | mini@example.com | Administrator | + | Angus | angus@example.com | Agency Administrator | + When I am logged in as a user with the 'Agency Administrator' role + And I am at 'form/hhs-nih-form' + And I select "Office of the Director" from "Select the NIH institute" + And I wait 5 seconds + From 6ba5cdb88320e0b7fe38ee7e61af1e9472ac7ec5 Mon Sep 17 00:00:00 2001 From: Yan Chen Date: Tue, 24 Oct 2023 14:02:54 +0000 Subject: [PATCH 3/3] FOIA-439: Add field to NIH form remove 5 seconds line. --- tests/behat/features/Administrator.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/behat/features/Administrator.feature b/tests/behat/features/Administrator.feature index 92c74c272..5544bf1e5 100644 --- a/tests/behat/features/Administrator.feature +++ b/tests/behat/features/Administrator.feature @@ -122,5 +122,4 @@ Feature: Agency Administrator role When I am logged in as a user with the 'Agency Administrator' role And I am at 'form/hhs-nih-form' And I select "Office of the Director" from "Select the NIH institute" - And I wait 5 seconds