Skip to content

Commit

Permalink
Merge pull request #380 from CBIIT/muzipovay2
Browse files Browse the repository at this point in the history
CHARMS - Fanconi CGB IIQ verification in Native View
  • Loading branch information
Mariachaudhry authored Jan 24, 2025
2 parents c519208 + ca957fc commit 08a562d
Show file tree
Hide file tree
Showing 5 changed files with 321 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Feature: RAS Consent Scenarios
And clicks on "Physical Activities Survey" to begin survey
And submits the Physical Activities Survey

@muzipovay2 @RAS_STUDY @CP2-4000 @selenium @RAS_Regression @Progression
@muzipovay2 @RAS_STUDY @CP2-4000 @selenium @RAS_Regression
Scenario: Completing Physical Activities Survey survey
Given test automation account "https://service-test.nci.nih.gov/nav_to.do?uri=sys_script_fix.do?sys_id=b8daf9fa872096107e87a8a60cbb3597" has been reset
Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage"
Expand Down
258 changes: 258 additions & 0 deletions src/test/java/CHARMS/pages/NativeViewCGBIIQPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

public class NativeViewCGBIIQPage {

/*****************************************************************
* *
* DEMOGRAPHICS TAB FIELDS *
* *
*****************************************************************/

/**
* Demographics tab
*/
Expand Down Expand Up @@ -97,6 +103,258 @@ public class NativeViewCGBIIQPage {
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.health_insurance']")
public WebElement doesTheParticipantHaveHealthInsuranceDropdown;

/********************************************************************
* *
* MEDICAL HISTORY TAB FIELDS *
* *
********************************************************************/

/**
* Medical History tab
*/
@FindBy(xpath = "//span[normalize-space()='Medical History']")
public WebElement medicalHistoryTab;

/**
* Participants birth timing dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.birth_timing']")
public WebElement birthTimingDropdown;

/**
* Participant birth weight (grams) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.birth_weight']")
public WebElement birthWeightInputField;

/**
* Birth weight unknown checkbox
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.birth_weight_unknown']")
public WebElement birthWeightUnknownCheckbox;

/**
* Participant birth length (cm) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.birth_length']")
public WebElement birthLengthInputField;

/**
* Birth length unknown checkbox
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.birth_length_unknown']")
public WebElement birthLengthUnknownCheckbox;

/**
* Participants head circumference at birth (cm) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.head_circumference_at_birth']")
public WebElement headCircumferenceAtBirthInputField;

/**
* Head circumference unknown checkbox
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.head_circumference_unknown']")
public WebElement headCircumferenceUnknownCheckbox;

/**
* Are participants bio parents blood-related dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.bio_parents_related']")
public WebElement bioParentsRelatedDropdown;

/**
* Is participant a twin or multiple birth? dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.twin_multiple_birth']")
public WebElement twinMultipleBirthDropdown;

/**
* Participant conceived using in vitro fertilization dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.in_vitro_fertilization']")
public WebElement inVitroFertilizationDropdown;

/**
* Has the participant been evaluated for genetic disease or syndrome? dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.genetic_evaluation']")
public WebElement hasBeenEvaluatedForGeneticDiseaseOrSyndromeEvaluationDropdown;

/**
* Do you have genetic test results you can upload dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.genetic_test_results']")
public WebElement doYouHaveGeneticTestResultsToUploadDropdown;

/**
* Has the participant been diagnosed with cancer and/or benign tumor? dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.participant_cancer']")
public WebElement participantDiagnosedWithCancerOrBenignTumorDropdown;

/**********************************************************************
* *
* PHYSICAL FINDINGS TAB FIELDS *
* *
*********************************************************************/

/**
* Physical Findings tab
*/
@FindBy(xpath = "//span[normalize-space()='Physical Findings']")
public WebElement physicalFindingsTab;

/**
* Current height (CM) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.current_height']")
public WebElement currentHeightInputField;

/**
* Current height unknown checkbox
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.current_height_unknown']")
public WebElement currentHeightUnknownCheckbox;

/**
* Weight at 18 years of age (kg) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.weight_at_18']")
public WebElement weightAt18InputField;

/**
* Reason weight at 18 unknown dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.reason_weight_at_18_unknown']")
public WebElement reasonWeightAt18UnknownDropdown;

/**
* Weight at 30 years of age (kg) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.weight_at_30']")
public WebElement weightAt30InputField;

/**
* Reason weight at 30 unknown dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.reason_weight_at_30_unknown']")
public WebElement reasonWeightAt30UnknownDropdown;

/**
* Age at highest weight input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.age_at_highest_weight']")
public WebElement ageAtHighestWeightInputField;

/**
* Current weight (kg) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.current_weight']")
public WebElement currentWeightInputField;

/**
* Current weight unknown checkbox
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.current_weight_unknown']")
public WebElement currentWeightUnknownCheckbox;

/**
* Weight at 40 years of age (kg) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.weight_at_40']")
public WebElement weightAt40InputField;

/**
* Reason weight at 40 unknown dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.reason_weight_at_40_unknown']")
public WebElement reasonWeightAt40UnknownDropdown;

/**
* Highest weight during lifetime? (excluding pregnancy) (kg) input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.most_participant_has_weighed']")
public WebElement highestWeightDuringLifetimeInputField;

/**
* Reason for highest weight unknown dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.reason_weight_at_highest_unknown']")
public WebElement reasonHighestWeightUnknownDropdown;

/*************************************************************************
* *
* REPRODUCTIVE HISTORY TAB FIELDS *
* *
*************************************************************************/

/**
* Reproductive History tab
*/
@FindBy(xpath = "//span[normalize-space()='Reproductive History']")
public WebElement reproductiveHistoryTab;

/**
* Have you had a menstrual period? Dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.menstrual_period']")
public WebElement haveYouHadAMenstrualPeriodDropdown;

/**
* Reason for no periods input field
*/
@FindBy(xpath = "//input[@id='sys_display.x_naci_family_coho_cgb_iiq.reason_for_no_periods']")
public WebElement reasonForNoPeriodsInputField;

/**
* Has the participant ever been pregnant dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.pregnant']")
public WebElement hasTheParticipantEverBeenPregnantDropdown;

/**
* Has participant tried to become pregnant for a year or more without success dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.pregnancy_success']")
public WebElement hasParticipantTriedToBecomePregnantForYearOrMoreWithoutSuccessDropdown;

/**
* Has the participant consulted a doctor because of difficulty getting pregnant? Dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.consulted_doctor']")
public WebElement hasParticipantConsultedADoctorBecauseOfDifficultyGettingPregnantDropdown;

/**
* Was the participant prescribed female hormones? Dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.female_hormones']")
public WebElement wasParticipantPrescribedFemaleHormonesDropdown;

/**
* Has participant taken pills, injections or implants for birth control dropdown
*/
@FindBy(xpath = "//select[@id='x_naci_family_coho_cgb_iiq.pills_injections_implants']")
public WebElement hasParticipantTakenPillsInjectionsImplantsForBirthControlDropdown;

/**
* Total Live Births input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.total_livebirths']")
public WebElement totalLiveBirthsInputField;

/**
* Total Miscarriages input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.total_miscarriages']")
public WebElement totalMiscarriagesInputField;

/**
* Total Stillbirths input field
*/
@FindBy(xpath = "//input[@id='x_naci_family_coho_cgb_iiq.total_stillbirths']")
public WebElement totalStillbirthsInputField;

public NativeViewCGBIIQPage() {
PageFactory.initElements(WebDriverUtils.webDriver, this);
}
Expand Down
Binary file modified src/test/java/CHARMS/resources/data.xlsx
Binary file not shown.
5 changes: 3 additions & 2 deletions src/test/java/CHARMS/steps/RAS_All_Steps.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import static APPS_COMMON.Pages.Selenium_Common_Locators.locateByCssSelector;
import static Hooks.Hooks.softAssert;
import static CHARMS.pages.MyRASHomePage.dynamicModuleLocator;
import static CHARMS.steps.RAS_Common_Methods.*;
Expand Down Expand Up @@ -310,8 +311,8 @@ public static void PI_completes_consent_and_verifies_in_Native_View(String sheet
CommonUtils.clickOnElement(nativeViewCHARMSParticipantConsentPage.rasStudyConsentSignAndCompleteButton);
CommonUtils.sleep(2000);
CucumberLogUtils.logScreenshot();
CommonUtils.waitForClickability(locateByXpath("//button[@title='Back']"));
CommonUtils.clickOnElement(locateByXpath("//button[@title='Back']"));
CommonUtils.waitForClickability(locateByCssSelector("button[aria-label='Back']"));
locateByCssSelector("button[aria-label='Back']").click();
CommonUtils.sleep(1000);
CucumberLogUtils.logScreenshot();
JavascriptUtils.scrollIntoView(nativeViewCHARMSParticipantDetailsPage.nativeViewPatientDetailsConsentsTab);
Expand Down
Loading

0 comments on commit 08a562d

Please sign in to comment.