Skip to content

Commit

Permalink
Merge pull request #265 from CBIIT/jains18
Browse files Browse the repository at this point in the history
CHARMS-FA reset script modification and FA survey Medical History continued module automation completed
  • Loading branch information
Mariachaudhry authored Sep 9, 2024
2 parents 082ad9c + 1d7683b commit 1c97f2d
Show file tree
Hide file tree
Showing 9 changed files with 971 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Author: @SonikaJain
Feature: Medical History section of the Fanconi Survey on the Fanconi Longitudinal Cohort Study Portal
Description:This feature file contains submissions and assertion scenarios for the Medical History Continued section of the Fanconi Survey by the proband or the legal guardian (Proxy)

@jains @MedicalHistory @CP2-3178 @CP2-3133 @playwright @In-Progress
Scenario: Participant fills and submit the Medical History Continued section for scenario 1
Given a Participant is on the Fanconi Study login page and logs with user credentials via Okta
And fills the Medical History Continued section for scenario 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ServiceNow.CHARMS.FanconiSurvey.playwright.Pages;
package ServiceNow.CHARMS.FanconiSurvey.Playwright.Pages;

public class FanconiSurveyLoginPage {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ServiceNow.CHARMS.FanconiSurvey.playwright.Steps;
package ServiceNow.CHARMS.FanconiSurvey.Playwright.Steps;

import ServiceNow.CHARMS.FanconiSurvey.playwright.StepsImplementation.FanconiSurveyStepsImpl;
import ServiceNow.CHARMS.FanconiSurvey.Playwright.StepsImplementation.FanconiSurveyStepsImpl;
import io.cucumber.java.en.Given;

public class FanconiSurveyBackgroundInformationSteps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ServiceNow.CHARMS.FanconiSurvey.playwright.Steps;
package ServiceNow.CHARMS.FanconiSurvey.Playwright.Steps;

import ServiceNow.CHARMS.FanconiSurvey.playwright.StepsImplementation.FanconiSurveyStepsImpl;
import ServiceNow.CHARMS.FanconiSurvey.Playwright.StepsImplementation.FanconiSurveyStepsImpl;
import io.cucumber.java.en.Given;

public class FanconiSurveyDemographicsSteps {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package ServiceNow.CHARMS.FanconiSurvey.Playwright.Steps;

import ServiceNow.CHARMS.FanconiSurvey.Playwright.StepsImplementation.FanconiSurveyStepsImpl;
import io.cucumber.java.en.Given;

public class FanconiSurveyMedicalHistoryContinuedSteps {

@Given("fills the Medical History Continued section for scenario 1")
public void fills_the_medical_history_section_continued_for_scenario_1() {
FanconiSurveyStepsImpl.medicalHistoryContinuedSectionScenario1();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ServiceNow.CHARMS.FanconiSurvey.playwright.Steps;
package ServiceNow.CHARMS.FanconiSurvey.Playwright.Steps;

import ServiceNow.CHARMS.FanconiSurvey.playwright.StepsImplementation.FanconiSurveyStepsImpl;
import ServiceNow.CHARMS.FanconiSurvey.Playwright.StepsImplementation.FanconiSurveyStepsImpl;
import io.cucumber.java.en.Given;

public class FanconiSurveyMedicalHistorySteps {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 1
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario1
Then clicks the submit button
Expand All @@ -19,7 +19,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 2
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario2
Then clicks the submit button
Expand All @@ -28,7 +28,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 3
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario3
Then clicks the submit button
Expand All @@ -37,7 +37,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 4
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario4
Then clicks the submit button
Expand All @@ -46,7 +46,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 5
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario5
Then clicks the submit button
Expand All @@ -55,7 +55,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 6
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario6
Then clicks the submit button
Expand All @@ -64,7 +64,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 7
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario7
Then clicks the submit button
Expand All @@ -73,7 +73,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proband for scenario 8
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario8
Then clicks the submit button
Expand All @@ -91,7 +91,7 @@ Feature: Fanconi Eligibility Questionnaire-Screener on the Fanconi Longitudinal
Scenario: Participant fills the Fanconi screener by the Proxy for scenario 10
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 "charmsras1@yahoo.com" and password "RASTest2022$$"
And logs in Fanconi page via Okta with username "charmsras2@yahoo.com" and password "RASTest2023$$"
And clicks the Fanconi Eligibility Questionnaire widget
Then fills the Fanconi Eligibility Questionnaire form for scenario10
Then clicks the submit button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package ServiceNow.CHARMS.StepsImplementation;

import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import ServiceNow.CHARMS.NativeView.Pages.CHARMSParticipantDetailsPage;
import ServiceNow.CHARMS.Utils.CharmsUtil;
import appsCommon.PageInitializers.PageInitializer;
import appsCommon.Pages.NativeView_SideDoor_Dashboard_Page;
import com.nci.automation.utils.LocalConfUtils;
import com.nci.automation.xceptions.TestingException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.asserts.SoftAssert;
import com.nci.automation.utils.MiscUtils;
import com.nci.automation.web.CommonUtils;
import com.nci.automation.web.EnvUtils;
import com.nci.automation.web.JavascriptUtils;
import com.nci.automation.web.WebDriverUtils;
import ServiceNow.CHARMS.NativeView.Pages.CHARMSParticipantDetailsPage;
import ServiceNow.CHARMS.Utils.CharmsUtil;
import appsCommon.PageInitializers.PageInitializer;
import com.nci.automation.xceptions.TestingException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.asserts.SoftAssert;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class FanconiEligibilityQuestionnaireStepsImpl extends PageInitializer {
String referralValue;
Expand All @@ -33,11 +33,11 @@ public class FanconiEligibilityQuestionnaireStepsImpl extends PageInitializer {
public void resetTestAccountSignIn() throws TestingException {
if (LocalConfUtils.getProperty("env").equals("test")) {
WebDriverUtils.webDriver.get(
"https://service-test.nci.nih.gov/now/nav/ui/classic/params/target/sys_script_fix.do%3Fsys_id%3D796a23158708d6d07e87a8a60cbb35b8%26sysparm_view%3D%26sysparm_domain%3Dnull%26sysparm_domain_scope%3Dnull");
"https://service-test.nci.nih.gov/now/nav/ui/classic/params/target/sys_script_fix.do%3Fsys_id%3Db1cf5c0087d0d610ad46326d3fbb3507%26sysparm_record_target%3Dsys_script_fix%26sysparm_record_row%3D2%26sysparm_record_rows%3D1263%26sysparm_record_list%3DORDERBYDESCsys_updated_on");
MiscUtils.sleep(2000);
} else if (LocalConfUtils.getProperty("env").equals("dev2")) {
WebDriverUtils.webDriver.get(
"https://service-dev2.nci.nih.gov/now/nav/ui/classic/params/target/sys_script_fix.do%3Fsys_id%3Dcde8001587f64a107e87a8a60cbb3598%26sysparm_record_target%3Dsys_script_fix%26sysparm_record_row%3D1%26sysparm_record_rows%3D1173%26sysparm_record_list%3DORDERBYDESCsys_updated_on");
"https://service-dev2.nci.nih.gov/now/nav/ui/classic/params/target/sys_script_fix.do%3Fsys_id%3Db1cf5c0087d0d610ad46326d3fbb3507%26sysparm_record_target%3Dsys_script_fix%26sysparm_record_row%3D2%26sysparm_record_rows%3D1263%26sysparm_record_list%3DORDERBYDESCsys_updated_on");
MiscUtils.sleep(2000);
}
}
Expand All @@ -50,9 +50,12 @@ public void resetTestAccount() {
MiscUtils.sleep(100);
CommonUtils.switchToFrame(NativeView_SideDoor_Dashboard_Page.nativeViewiFrame);
CommonUtils.waitForVisibility(testAccountResetPage.nativeViewRunFixScriptButton);
MiscUtils.sleep(500);
testAccountResetPage.nativeViewRunFixScriptButton.click();
MiscUtils.sleep(500);
CommonUtils.waitForVisibility(testAccountResetPage.nativeViewProceedInBackgroundButton);
testAccountResetPage.nativeViewProceedInBackgroundButton.click();
MiscUtils.sleep(500);
CommonUtils.waitForVisibility(testAccountResetPage.nativeViewCloseButton);
testAccountResetPage.nativeViewCloseButton.click();
MiscUtils.sleep(300);
Expand Down

0 comments on commit 1c97f2d

Please sign in to comment.