Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Muzipova committed Jan 24, 2025
1 parent d16369b commit 2903312
Show file tree
Hide file tree
Showing 9 changed files with 332 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CHARMS - RAS Regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Run specific runner class
run: mvn -B -q -Dtest="CHARMS.runners.Run_CHARMS_RAS_Regression_Test" test
run: mvn -B -q -Dtest="CHARMS.runners.Run_CHARMS_RAS_Regression_Test" -Dcucumber.filter.tags="@RAS_Regression1" test
continue-on-error: true

- name: Generate timestamp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Feature: Fanconi end-to-end flow on the Fanconi Longitudinal Cohort Study Portal
Description: This feature file contains scenarios which submit Fanconi Screeners, Consent Flows, and IIQ Forms. Then, data is verified in Native View.

@FanconiSubmission @selenium @Fanconi_Regression
@FanconiSubmission @selenium @Fanconi_Regression @Progression
Scenario Outline: This scenario submits the IIQ form and verifies the data in Native View.
Given run the Fanconi reset script to reset the accounts
# Given run the Fanconi reset script to reset the accounts
Given a Participant is on the Fanconi Study login page
And logs in Fanconi page via Okta with username "<Email>" and password "<Password>"
And clicks the Fanconi Eligibility Questionnaire widget
Expand All @@ -17,5 +17,5 @@ Feature: Fanconi end-to-end flow on the Fanconi Longitudinal Cohort Study Portal
And the participant submits a Individual Information Questionnaire for excel sheet "<IIQScenario>"
Then Study Team member logs in to Native View and verifies fields in participant's CGB IIQ record
Examples:
| Email | Password | ConsentCollectionMethod | IIQScenario |
| sj.fanconitester1@yopmail.com | Test123$$ | iMed | IIQScenario1 |
| Email | Password | ConsentCollectionMethod | IIQScenario |
| charmsras3@yahoo.com | RASTest2023$$ | iMed | IIQScenario1 |
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: RAS Consent Scenarios
Description: This feature file contains scenarios which verify data in myRas portal and Native View Participant Details/Consent Record.

@muzipovay2 @RAS_STUDY @CP2-3603 @CP2-3637 @CP2-3680 @CP2-3825 @CP2-3640 @CP2-3805 @CP2-3935 @selenium @RAS_Regression
@muzipovay2 @RAS_STUDY @CP2-3603 @CP2-3637 @CP2-3680 @CP2-3825 @CP2-3640 @CP2-3805 @CP2-3935 @selenium @RAS_Regression1
Scenario Outline: Verifying e-consent workflow, and then verifying that a Download Study Consent widget shows on portal and when clicked downloads the most recent Consent Record
Given test automation account "<AccountResetScriptURL>" has been reset
Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage"
Expand All @@ -17,8 +17,8 @@ Feature: RAS Consent Scenarios
And logs in via Okta with username "<Email>" and password "<Password>"
And "Download Study Consent" text shows on participant portal and when clicked downloads "Consent Record"
Examples:
| Email | Password | ScreenerScenario | ConsentStatus | ConsentType | ResponseType | AccountResetScriptURL |
| consent_participant@yopmail.com | Charms123$ | screenerScenarioAdult | Complete | Adult | CHARMS e-consent | https://service-test.nci.nih.gov/nav_to.do?uri=sys_script_fix.do?sys_id=b8daf9fa872096107e87a8a60cbb3597 |
| Email | Password | ScreenerScenario | ConsentStatus | ConsentType | ResponseType | AccountResetScriptURL |
| ras_progression@yopmail.com | Charms123$ | screenerScenarioAdult | Complete | Adult | CHARMS e-consent | https://service-test.nci.nih.gov/nav_to.do?uri=sys_script_fix.do?sys_id=0e9497c587161ad0ad46326d3fbb35c7 |

@muzipovay2 @RAS_STUDY @CP2-3603 @CP2-3680 @selenium @RAS_Regression
Scenario Outline: Verifying consent workflows for an adult participant, and then verifying that a Download Study Consent widget shows on portal and when clicked downloads the most recent Consent Record
Expand Down 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.
Binary file added src/test/java/CHARMS/resources/~$RASScenario1.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"},
features = {"src/test/java/CHARMS/features/RASAccountReset", "src/test/java/CHARMS/features/rasopathyStudy"},
glue = {"CHARMS.steps", "Hooks"},
tags = "@RAS_Regression",
tags = "@RAS_Regression1 or @Ras_Regression2",
dryRun = false
)
public class Run_CHARMS_RAS_Regression_Test extends AbstractTestNGCucumberTests{
Expand Down
8 changes: 5 additions & 3 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,8 @@
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,9 +312,9 @@ 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.sleep(1000);
CommonUtils.waitForClickability(locateByCssSelector("button[aria-label='Back']"));
locateByCssSelector("button[aria-label='Back']").click();
CommonUtils.sleep(5000);
CucumberLogUtils.logScreenshot();
JavascriptUtils.scrollIntoView(nativeViewCHARMSParticipantDetailsPage.nativeViewPatientDetailsConsentsTab);
CommonUtils.clickOnElement(nativeViewCHARMSParticipantDetailsPage.nativeViewPatientDetailsConsentsTab);
Expand Down
Loading

0 comments on commit 2903312

Please sign in to comment.