Skip to content

Commit

Permalink
Merge pull request #278 from CBIIT/chaudhryma
Browse files Browse the repository at this point in the history
Platform Business APP - Travel Request automation
  • Loading branch information
Mariachaudhry authored Sep 26, 2024
2 parents 2eb8ece + 5433f8f commit 34ba643
Show file tree
Hide file tree
Showing 18 changed files with 250 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ServiceNow.PlatformBusinessApps.ETracking.Constants.EtrackAssetsRecords_NativeView_Constants;
import ServiceNow.PlatformBusinessApps.SEER.Constants.SEERNativeView_Constants;
import appsCommon.Pages.NativeView_SideDoor_Dashboard_Page;
import appsCommon.Utils.ServiceNow_Common_Methods;
import appsCommon.Utils.ServiceNow_Login_Methods;
import appsCommon.PageInitializers.PageInitializer;
Expand All @@ -19,6 +20,7 @@ public class EtrackAssetsRecords_NativeViewStepImplimentation extends PageInitia
public static void aEtrackingUserOpensAnAssetRecord() {
ServiceNow_Login_Methods.nativeViewSideDoorLogin();
ServiceNow_Common_Methods.impersonateAnyUser("Jeffrey Alderdice");
CommonUtils.waitForVisibility(NativeView_SideDoor_Dashboard_Page.filterNavigatorTextBox);
ServiceNow_Common_Methods.filterNavigatorSearch("Assets");
CucumberLogUtils.logScreenshot();
etrackAssetsRecords_NativeViewPage.nVEtrackAssetsNewButton.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static void returningOfSubmissionToProgramStaff(String submissionName) {
.sendKeys(ReturningSubmissions_Constants.RETURN_TO_PROGRAM_STUFF_MESSAGE);
nerdCrsKnowledgeDatabaseSubmissionsPage.confirmRETURNtoStaffPopUpWindowYesButton.click();
nerdCrsKnowledgeDatabaseSubmissionsPage.popUpOKbutton.click();
MiscUtils.sleep(1000);
MiscUtils.sleep(3000);
CommonUtils.assertTrue(nerdDynamicXpaths.returnedToStaffMemberText(submissionName).getText()
.contentEquals(ReturningSubmissions_Constants.RETURNED_TO_STUFF_MEMBER_TEXT));
JavascriptUtils.drawBlueBorder(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
Expand Down Expand Up @@ -276,8 +276,6 @@ public static void checkingEmailWasNotReceived(String docPlanningContact) {
ServiceNow_Common_Methods.logOutOfNativeView();
ServiceNow_Login_Methods.nativeViewSideDoorLogin();
MiscUtils.sleep(2000);
ServiceNow_Common_Methods.filterNavigatorSearch("Emails");
MiscUtils.sleep(2000);
WebDriverUtils.webDriver.get(ReturningSubmissions_Constants.NATIVE_VIEW_EMAILS_UNDER_SYSTEM_LOGS_URL);
MiscUtils.sleep(3000);
CommonUtils.switchToFrame(NativeView_SideDoor_Dashboard_Page.nativeViewiFrame);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ public static void doc_planning_contact_returning_the_top_accomplishments_submis
CucumberLogUtils.logScreenshot();
nerdCrsKnowledgeDatabaseSubmissionsPage.confirmRETURNtoStaffPopUpWindowYesButton.click();
nerdCrsKnowledgeDatabaseSubmissionsPage.popUpOKbutton.click();
MiscUtils.sleep(1000);
MiscUtils.sleep(3000);
CommonUtils.waitForVisibility(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
CommonUtils.scrollIntoView(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
CommonUtils.assertTrue(nerdDynamicXpaths.returnedToStaffMemberText(submissionName).getText().contentEquals(ReturningSubmissions_Constants.RETURNED_TO_STUFF_MEMBER_TEXT));
JavascriptUtils.drawBlueBorder(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
Expand Down Expand Up @@ -286,8 +287,7 @@ public static void doc_planning_contact_returning_the_other_accomplishments_subm
CucumberLogUtils.logScreenshot();
nerdCrsKnowledgeDatabaseSubmissionsPage.confirmRETURNtoStaffPopUpWindowYesButton.click();
nerdCrsKnowledgeDatabaseSubmissionsPage.popUpOKbutton.click();
MiscUtils.sleep(1000);
CommonUtils.scrollIntoView(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(3000);
CommonUtils.assertTrue(nerdDynamicXpaths.returnedToStaffMemberText(submissionName).getText().contentEquals(ReturningSubmissions_Constants.RETURNED_TO_STUFF_MEMBER_TEXT));
JavascriptUtils.drawBlueBorder(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
CucumberLogUtils.logScreenshot();
Expand Down Expand Up @@ -387,8 +387,7 @@ public static void doc_planning_contact_returning_the_collaborations_submission_
CucumberLogUtils.logScreenshot();
nerdCrsKnowledgeDatabaseSubmissionsPage.confirmRETURNtoStaffPopUpWindowYesButton.click();
nerdCrsKnowledgeDatabaseSubmissionsPage.popUpOKbutton.click();
MiscUtils.sleep(1000);
CommonUtils.scrollIntoView(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(3000);
CommonUtils.assertTrue(nerdDynamicXpaths.returnedToStaffMemberText(submissionName).getText().contentEquals(ReturningSubmissions_Constants.RETURNED_TO_STUFF_MEMBER_TEXT));
JavascriptUtils.drawBlueBorder(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(2000);
Expand Down Expand Up @@ -525,8 +524,7 @@ public static void doc_planning_contact_returning_the_covid19_activities_submiss
CucumberLogUtils.logScreenshot();
nerdCrsKnowledgeDatabaseSubmissionsPage.confirmRETURNtoStaffPopUpWindowYesButton.click();
nerdCrsKnowledgeDatabaseSubmissionsPage.popUpOKbutton.click();
MiscUtils.sleep(2000);
CommonUtils.scrollIntoView(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(3000);
CommonUtils.assertTrue(nerdDynamicXpaths.returnedToStaffMemberText(submissionName).getText().contentEquals(ReturningSubmissions_Constants.RETURNED_TO_STUFF_MEMBER_TEXT));
JavascriptUtils.drawBlueBorder(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(2000);
Expand Down Expand Up @@ -665,8 +663,7 @@ public static void doc_planning_contact_returning_the_ad_hoc_data_call_submissio
CucumberLogUtils.logScreenshot();
nerdCrsKnowledgeDatabaseSubmissionsPage.confirmRETURNtoStaffPopUpWindowYesButton.click();
nerdCrsKnowledgeDatabaseSubmissionsPage.popUpOKbutton.click();
MiscUtils.sleep(2000);
CommonUtils.scrollIntoView(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(3000);
CommonUtils.assertTrue(nerdDynamicXpaths.returnedToStaffMemberText(submissionName).getText().contentEquals(ReturningSubmissions_Constants.RETURNED_TO_STUFF_MEMBER_TEXT));
JavascriptUtils.drawBlueBorder(nerdDynamicXpaths.returnedToStaffMemberText(submissionName));
MiscUtils.sleep(2000);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html",
"json:target/cucumber.json", "rerun:target/failed.txt",
"pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}
, features = {"src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features" , "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Selenium/Features" }
, glue = {"ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.playwright.Steps", "ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.Selenium.Steps", "Hooks"}
, features = "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features"
, glue = {"ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.playwright.Steps", "Hooks"}
, tags = "@Progression"
, dryRun = false
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html",
"json:target/cucumber.json", "rerun:target/failed.txt",
"pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}
, features = {"src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features", "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Selenium/Features"}
, glue = {"ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.playwright.Steps", "ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.Selenium.Steps", "Hooks"}
, features = "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features"
, glue = {"ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.playwright.Steps", "Hooks"}
, tags = "@Regression"
, dryRun = false
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html",
"json:target/cucumber.json", "rerun:target/failed.txt",
"pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}
, features = {"src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features" , "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Selenium/Features" }
, glue = {"ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.playwright.Steps", "ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.Selenium.Steps", "Hooks"}
, features = "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features"
, glue = {"ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.playwright.Steps", "Hooks"}
, tags = "@Smoke"
, dryRun = false
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,12 @@ public class Travel_Request_Portal_Form_Constants {
/* NATIVE VIEW LINK */
public static final String NATIVE_VIEW_LINK = "Native View";

/* TRAVEL PLANNING SYSTEM RITM NUMBER */
public static final String TRAVEL_PLANNING_SYSTEM_RITM_NUMBER = "NCI-RITM0509434";

/* OPEN RECORD BUTTON */
public static final String OPEN_RECORD_BUTTON = "Open Record";

/* VARIABLES TAB */
public static final String VARIABLES_TAB = "Variables";

/* ENTERED DATE */
public static final String ENTERED_DATE = "07/10/2024";

/* TRAVEL QUESTION ONE */
public static final String TRAVEL_QUESTION_ONE = "Do you have a defined role at the meeting/conference or intended for professional development?";

Expand All @@ -78,5 +72,5 @@ public class Travel_Request_Portal_Form_Constants {
public static final String TRAVEL_QUESTION_THREE = "Does your travel meet travel deadlines and administrative deadlines (training requirements, passport/visa requirements)?";

/* TRAVEL QUESTION FOUR */
public static final String TRAVEL_QUESTION_FOUR = "Do you travel to a Level 3 or 4 travel advisory location?";
public static final String TRAVEL_QUESTION_FOUR = "Is your travel destination to a level 3 or 4 location?";
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,15 @@ Feature: SNOWTRAVEL Native View Form Scenarios
Scenario: Test Create Travel Request Application Module
Given I am an authenticated DOC CGH Travel Request User
When I search "Travel Planning System", in the filter navigator,
Then I will see Modules created for the "Travel Requests", "Assigned to Me", "Assigned to My Group",and "My Approvals" underneath Travel Planning System Application
Then I will see Modules created for the "Travel Requests", "Assigned to Me", "Assigned to My Group",and "My Approvals" underneath Travel Planning System Application

@SNOWTRAVEL-104 @Chaudhryma @Regression @playwright
Scenario: Test Create Assignment Groups
Given that I am logged into ServiceNow Native View
When I search for Group under System Security
And I search for "NCI CGH - Travel Request Branch Directors" group Name
And I verify the associated users "Dimetria Branch", "Kalina Duncan" and "Mark Parascandola" are listed under the Group Members tab
When I go back to Groups and search for "NCI CGH - Travel Request Travel Planners" group Name
And I verify that the associated users "Brian Davis", "Dimetria Branch", "Jennifer Bridges" , "Karen Grady", "Raven Coit" and "Susan Giuliani" are listed under the Group Members tab
When I go back again and search for "NCI CGH - Travel Request Proxy users" group Name
Then I verify that the associated users "Dimetria Branch", "Kalina Duncan" and "Mark Parascandola" should be listed under the Group Members tab
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: SNOWTRAVEL Portal Form Scenarios
And I click "CBIIT Business Services",
Then I will see the current form "Travel Request" updated to "Travel Planning System"

@SNOWTRAVEL-130 @Chaudhryma @Smoke @Regression @playwright
@SNOWTRAVEL-121 @SNOWTRAVEL-130 @Chaudhryma @Smoke @Regression @playwright
Scenario: Test Travel Start Date and Travel End Date Field Additions
Given I am an authenticated DOC CGH Travel Request User
When I navigate to the Trip Information section of the form,
Expand All @@ -26,21 +26,17 @@ Feature: SNOWTRAVEL Portal Form Scenarios
And the first question "Do you have a defined role at the meeting/conference or intended for professional development?" is optional
And the second question "Does your travel align with your group's Strategic Plan and Staff role/duties?" is optional
And the third question "Does your travel meet travel deadlines and administrative deadlines (training requirements, passport/visa requirements)?" is optional
And I verify that the fourth question "Do you travel to a Level 3 or 4 travel advisory location?" is also optional
And I verify that the fourth question "Is your travel destination to a level 3 or 4 location?" is also optional

@SNOWTRAVEL-125 @Chaudhryma @Smoke @Regression @playwright
Scenario: Test 2: CGH Field Enhancements on Travel Request Form
Given I am an authenticated DOC CGH Travel Request User
When I am on the "Travel Planning System" form
Then I will not see the following help text language under the field "Destination Type" under the "Event" section:"Local needs to be submitted 2 weeks before event date."

@SNOWTRAVEL-125 @Chaudhryma @playwright @IN-Progress
@SNOWTRAVEL-125 @Chaudhryma @Regression @playwright
Scenario: Test 3: CGH Field Enhancements on Travel Request Form
Given I am an authenticated DOC CGH Travel Request User
When I am on the "Travel Planning System" form
Then I will not see the Header on the form "Travel Cash Advance",
And the following fields under "Travel Cash Advance" section will be removed:
"""
Cash (Direct Deposit) Advance Requested
Reason for Cash Advance
"""
And the following fields "Cash (Direct Deposit) Advance Requested" and "Reason for Cash Advance" under Travel Cash Advance section will be removed
Loading

0 comments on commit 34ba643

Please sign in to comment.