From 5e6ddab2655e39d77d37839b93c645c79ec04d2c Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Wed, 7 Aug 2024 16:33:41 -0400 Subject: [PATCH 1/6] moved outdated tests --- .../SSJ/selenium/Features/DEPRECATED TESTS.feature | 10 +++++++++- .../Features/Unauthenticated Applicant.feature | 8 -------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature index 75f818132..1329e690c 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature @@ -67,4 +67,12 @@ Feature: DEPRECATED TESTS And User can verify the description of "EQUAL OPPORTUNITY EMPLOYMENT" statement And User can verify the description of "STANDARDS OF CONDUCT/FINANCIAL DISCLOSURE" statement And User can verify the description of "FOREIGN EDUCATION" statement - Then User can verify the description of "REASONABLE ACCOMODATION" statement \ No newline at end of file + Then User can verify the description of "REASONABLE ACCOMODATION" statement + + @SSJ-298 + Scenario: Okta error registration + And User clicks on Login Dropdown + And User clicks "Not Registered" option + Then User is redirected to Okta registration page + And User enters all the registration details + Then User can verify that Okta account was not created \ No newline at end of file diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature index 6dbf51bd6..94c39bfcc 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature @@ -21,14 +21,6 @@ Feature: Unauthenticated applicant Scenarios And User clicks "Employee/Contractor Only" option Then User is redirected to NIH Login Page - @Regression @Nekrashevich @SSJ-298 @selenium - Scenario: Okta error registration - And User clicks on Login Dropdown - And User clicks "Not Registered" option - Then User is redirected to Okta registration page - And User enters all the registration details - Then User can verify that Okta account was not created - @Regression @Nekrashevich @SSJ-27 @selenium Scenario: Okta registration error And User clicks on Login Dropdown From 1950a581d9bb55df449c3205a7dd151925aabcb1 Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Tue, 20 Aug 2024 17:45:31 -0400 Subject: [PATCH 2/6] .. --- src/main/resources/conf/env/sandbox.xml | 42 ++++ .../Features/Applicant Profile.feature | 190 +++++++++--------- .../SSJ/playwright/Pages/User_Table_Page.java | 2 +- .../Steps/ApplicantProfileSteps.java | 12 +- .../ApplicantProfileStepsImpl.java | 21 +- .../Playwright_NativeView_Dashboard_Page.java | 5 +- .../Playwright_ServiceNow_Common_Methods.java | 5 +- 7 files changed, 165 insertions(+), 112 deletions(-) diff --git a/src/main/resources/conf/env/sandbox.xml b/src/main/resources/conf/env/sandbox.xml index 6780af388..b461ca4bc 100644 --- a/src/main/resources/conf/env/sandbox.xml +++ b/src/main/resources/conf/env/sandbox.xml @@ -235,5 +235,47 @@ + + + https://service-sandbox.nci.nih.gov/side_door.do + + + regular + + + + + + + + + + + + + + + + + https://service-sandbox.nci.nih.gov/nih-ssj.do + + + + regular + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature index 5838d68a5..278375883 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature @@ -43,7 +43,7 @@ Feature: Applicant Profile Scenarios | SSJTest | Marianna | Mollick | mollickja@nih.gov | 7018211343 | 2123323454 | Masters | Yes | 11 Kolls | 6 | Sausalito | CA | USA | 97712 | | SSJTest | Elena | Andrew | andrewkl@nih.gov | 8233212333 | 2202122234 | Bachelors | Yes | 11 Bells | 39 | Sacramento | CA | USA | 95512 | - @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @SSJ-712 @JUAREZDS @Regression @playwright + @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @SSJ-712 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario Outline: Verifying the Save application functionality Given a test account "" is reset before executing a test When User is on SSJ Landing page and user is "Maria Chaudhry" - PW @@ -86,7 +86,7 @@ Feature: Applicant Profile Scenarios | firstName | middleName | lastName | email | phone | businessPhone | highestEducation | US Citizenship | address | aptNumber | city | state | country | zip | | SSJTest | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | Masters | Yes | 7 Mills | 12378 | Reston | VA | USA | 20453 | - @alenan @SSJ-712 @Bug_Open @JUAREZDS @In_Progress @playwright @Smoke + @alenan @SSJ-712 @Bug_Open @JUAREZDS @In_Progress @playwright @Smoke @outdated Scenario: Edit Demographics of Profile Given a test account "SSJTest" is reset before executing a test When User is on SSJ Landing page and user is "Maria Chaudhry" - PW @@ -102,7 +102,7 @@ Feature: Applicant Profile Scenarios And User chooses not to share demographic details - PW Then User saves the updated section - PW - @US_APPTRACK-342 @TC_APPTRACK-385 @JUAREZDS @Regression @playwright + @US_APPTRACK-342 @TC_APPTRACK-385 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario Outline: Verifying applicant is able to see "Your Applications" tab and page content after applying to a Vacancy # Given an Okta user "" is on the SSJ home page and logs in - PLEASE LEAVE THIS HERE! NEED TO CONNECT WITH OKTA TEAM When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW @@ -121,7 +121,7 @@ Feature: Applicant Profile Scenarios And clicks "Save" And clicks Save for Mandatory Statements And selects "David Rampulla" for Committee Member with chair role - And selects "Jay Kurani" for Committee Member with Executive Secretary role + And selects "Jason Levine" for Committee Member with Executive Secretary role And clicks "Save" And clicks Save for Email Templates Then user is able to see the Review and Finalize section with the vacancy information submitted @@ -141,7 +141,7 @@ Feature: Applicant Profile Scenarios And verifies Personnel Action Tracking Solution (PATS) Initiator is "Holly Gemar-Griffith" And verifies Mandatory Statements "Equal Opportunity Employment", "Standards of Conduct/Financial Disclosure", "Foreign Education", and "Reasonable Accomodation" are displayed And verifies Committee Member "David Rampulla" is displayed with role "Chair" - And verifies Committee Member "Jay Kurani" is displayed with role "Executive Secretary (non-voting)" + And verifies Committee Member "Jason Levine" is displayed with role "Executive Secretary (non-voting)" And verifies Email Templates "Application saved", "Application submitted confirmation", "Applicant Reference Request", "Applicant Reference Received", "Applicant Reference Received - Applicant" And clicks "Save and Finalize" And clicks "OK" @@ -212,8 +212,8 @@ Feature: Applicant Profile Scenarios And user verifies basic information "", "", "", "", "", "", "", and "" And user verifies address information "
", "", "", "", "" And user verifies demographics information "Yes", "Male", "Hispanic or Latino", "American Indian or Alaska Native, Asian, Black or African-American, Native Hawaiian or other Pacific Islander, White", and "None of the conditions listed above apply to me." - And user verifies references one information "", "", "", "", "", "", "", "" - And user verifies references two information "", "", "", "", "", "", "", "" + And user verifies references one information "", "", "", "", "", "", "" + And user verifies references two information "", "", "", "", "", "", "" And if either a Cover Letter, Qualification Statement, Curriculum Vitae (CV), or Vision Statement (or all) were uploaded then documents are displayed in the Application Documents section And clicks "Submit Application" And clicks "Ok" @@ -229,12 +229,12 @@ Feature: Applicant Profile Scenarios | SSJTest | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | Masters | Yes | 7 Mills | 12378 | Reston | VA | USA | 20453 | Fred | Trout | Laste | referenceOne@test.com | 7036875816 | Supervisor/Manager | PROJECT MANAGER | TESTING ORGANIZATION FIELD FOR REFERENCE ONE | John | Steven | Vakhutko | referenceTwo@test.com | 7036875816 | Co-worker | TEST AUTOMATION LEAD | TESTING ORGANIZATION FIELD FOR REFERENCE TWO | - @US_APPTRACK-342 @TC_APPTRACK-385 @JUAREZDS @Regression @playwright + @US_APPTRACK-342 @TC_APPTRACK-385 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario: Verifying applicant does not see "Your Applications" tab if applicant has not applied to a Vacancy Given a user who has not applied to a Vacancy before is on the SSJ home page Then Your Applications tab should NOT be displayed - @TC_APPTRACK-145 @JUAREZDS @Regression @playwright + @TC_APPTRACK-145 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario: Verifying Vacancy details When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And clicks on "Vacancy Dashboard" - PW @@ -252,7 +252,7 @@ Feature: Applicant Profile Scenarios And clicks "Save" And clicks Save for Mandatory Statements And selects "David Rampulla" for Committee Member with chair role - And selects "Jay Kurani" for Committee Member with Executive Secretary role + And selects "Jason Levine" for Committee Member with Executive Secretary role And clicks "Save" And clicks Save for Email Templates Then user is able to see the Review and Finalize section with the vacancy information submitted @@ -270,7 +270,7 @@ Feature: Applicant Profile Scenarios And verifies Application Documents text "APPLICATION DOCUMENTS" And verifies required documents with required references needed to apply to this test Vacancy - @TC_APPTRACK-144 @JUAREZDS @Regression @playwright + @TC_APPTRACK-144 @JUAREZDS @Regression @playwright @in-prog @Progression Scenario: Applying for vacancy as unauthenticated applicant Given an unauthenticated applicant is on the SSJ homepage "SSJPortalView" And verifies that the drop drown text is "Login" @@ -287,7 +287,7 @@ Would you like to log in now or go back to the home page? And clicks "Log in" and is redirected to the Okta Login Portal And verifies that the PIV CAC card button text is "Sign in with PIV / CAC card" - @TC_APPTRACK-128 @JUAREZDS @Regression @playwright + @TC_APPTRACK-128 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario Outline: Verification of the Save application functionality Given a test account "SSJTest" is reset before executing a test And a test vacancy "DIEGO TEST" is reset before creating a vacancy @@ -307,7 +307,7 @@ Would you like to log in now or go back to the home page? And clicks "Save" And clicks Save for Mandatory Statements And selects "David Rampulla" for Committee Member with chair role - And selects "Jay Kurani" for Committee Member with Executive Secretary role + And selects "Jason Levine" for Committee Member with Executive Secretary role And clicks "Save" And clicks Save for Email Templates And user is able to see the Review and Finalize section with the vacancy information submitted @@ -374,7 +374,7 @@ Would you like to log in now or go back to the home page? And clicks "Save" And clicks Save for Mandatory Statements And selects "David Rampulla" for Committee Member with chair role - And selects "Jay Kurani" for Committee Member with Executive Secretary role + And selects "Jason Levine" for Committee Member with Executive Secretary role And clicks "Save" And clicks Save for Email Templates And user is able to see the Review and Finalize section with the vacancy information submitted @@ -429,87 +429,87 @@ Would you like to log in now or go back to the home page? And User clicks on Save Application button And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" And user navigates to Your Applications tab - Then verifies that the application became a draft "Draft" - And clicks Edit vacancy "DIEGO TEST" - And uploads cover letter if cover letter option is displayed - And uploads qualification statement if qualification statement is displayed - And uploads a Curriculum Vitae if Curriculum Vitae option is displayed - And uploads a Vision Statement if Vision Statement option is displayed - And clicks "Next" - And user is on the "References" page - Then if reference one is required then user enters Reference One first name "" - And enters Reference One middle name "" - And enters Reference One last name "" - And enters Reference One email address "" - And enters Reference One phone number "" - And selects Reference One relationship as "" - And enters Reference One position title "" - And enters Reference One organization name "" - Then if reference two is required then user enters Reference Two first name "" - And enters Reference Two middle name "" - And enters Reference Two last name "" - And enters Reference Two email address "" - And enters Reference Two phone number "" - And enters Reference Two position title "" - And enters Reference Two organization name "" - And clicks " Save Application" - And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" - And user navigates to Your Applications tab - And clicks on Vacancy Title "DIEGO TEST" - And uploads cover letter if cover letter option is displayed - And uploads qualification statement if qualification statement is displayed - And uploads a Curriculum Vitae if Curriculum Vitae option is displayed - And uploads a Vision Statement if Vision Statement option is displayed - And clicks "Next" - And verifies that Reference One "", "", "", "", "", "", "" is updated - And verifies tha Reference Two "", "", "", "", "", "", "" is updated - And clicks " Save Application" - And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" - And user navigates to Your Applications tab - And clicks on Remove button - And "Confirm" that the draft was removed - And verifies that the draft is no longer showing under Your Application tab - And navigates to the "Home" tab to be able to apply to a vacancy after creating a profile - And clicks on Vacancy Title "DIEGO TEST" - And clicks "Apply" - Then user is on the "Application Documents" page - And uploads cover letter if cover letter option is displayed - And uploads qualification statement if qualification statement is displayed - And uploads a Curriculum Vitae if Curriculum Vitae option is displayed - And uploads a Vision Statement if Vision Statement option is displayed - And clicks "Next" - Then user is on the "References" page - Then if reference one is required then user enters Reference One first name "" - And enters Reference One middle name "" - And enters Reference One last name "" - And enters Reference One email address "" - And enters Reference One phone number "" - And selects Reference One relationship as "" - And enters Reference One position title "" - And enters Reference One organization name "" - Then if reference two is required then user enters Reference Two first name "" - And enters Reference Two middle name "" - And enters Reference Two last name "" - And enters Reference Two email address "" - And enters Reference Two phone number "" - And enters Reference Two position title "" - And enters Reference Two organization name "" - And clicks "Next" - Then user is on the "Demographic Information" page - And user agrees to share demographic details and help improve the hiring process. - And selects "Male" for Sex - And selects "Hispanic or Latino" for Ethnicity - And selects "American Indian or Alaska", "Asian", "Black or African-American", "Native Hawaiian or other", "White" for Race - And selects "None of the conditions listed above apply to me." for Disability or Serious Health Condition - And clicks "Next" - Then user is on the "Review" page - And clicks "Submit Application" - And clicks "Ok" - And clicks "Done" - And user navigates to Your Applications tab - And user withdraws the application - And "Confirm" withdrawing the application - Then verifies that the application status is "Withdrawn" +# Then verifies that the application became a draft "Draft" +# And clicks Edit vacancy "DIEGO TEST" +# And uploads cover letter if cover letter option is displayed +# And uploads qualification statement if qualification statement is displayed +# And uploads a Curriculum Vitae if Curriculum Vitae option is displayed +# And uploads a Vision Statement if Vision Statement option is displayed +# And clicks "Next" +# And user is on the "References" page +# Then if reference one is required then user enters Reference One first name "" +# And enters Reference One middle name "" +# And enters Reference One last name "" +# And enters Reference One email address "" +# And enters Reference One phone number "" +# And selects Reference One relationship as "" +# And enters Reference One position title "" +# And enters Reference One organization name "" +# Then if reference two is required then user enters Reference Two first name "" +# And enters Reference Two middle name "" +# And enters Reference Two last name "" +# And enters Reference Two email address "" +# And enters Reference Two phone number "" +# And enters Reference Two position title "" +# And enters Reference Two organization name "" +# And clicks " Save Application" +# And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" +# And user navigates to Your Applications tab +# And clicks on Vacancy Title "DIEGO TEST" +# And uploads cover letter if cover letter option is displayed +# And uploads qualification statement if qualification statement is displayed +# And uploads a Curriculum Vitae if Curriculum Vitae option is displayed +# And uploads a Vision Statement if Vision Statement option is displayed +# And clicks "Next" +# And verifies that Reference One "", "", "", "", "", "", "" is updated +# And verifies tha Reference Two "", "", "", "", "", "", "" is updated +# And clicks " Save Application" +# And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" +# And user navigates to Your Applications tab +# And clicks on Remove button +# And "Confirm" that the draft was removed +# And verifies that the draft is no longer showing under Your Application tab +# And navigates to the "Home" tab to be able to apply to a vacancy after creating a profile +# And clicks on Vacancy Title "DIEGO TEST" +# And clicks "Apply" +# Then user is on the "Application Documents" page +# And uploads cover letter if cover letter option is displayed +# And uploads qualification statement if qualification statement is displayed +# And uploads a Curriculum Vitae if Curriculum Vitae option is displayed +# And uploads a Vision Statement if Vision Statement option is displayed +# And clicks "Next" +# Then user is on the "References" page +# Then if reference one is required then user enters Reference One first name "" +# And enters Reference One middle name "" +# And enters Reference One last name "" +# And enters Reference One email address "" +# And enters Reference One phone number "" +# And selects Reference One relationship as "" +# And enters Reference One position title "" +# And enters Reference One organization name "" +# Then if reference two is required then user enters Reference Two first name "" +# And enters Reference Two middle name "" +# And enters Reference Two last name "" +# And enters Reference Two email address "" +# And enters Reference Two phone number "" +# And enters Reference Two position title "" +# And enters Reference Two organization name "" +# And clicks "Next" +# Then user is on the "Demographic Information" page +# And user agrees to share demographic details and help improve the hiring process. +# And selects "Male" for Sex +# And selects "Hispanic or Latino" for Ethnicity +# And selects "American Indian or Alaska", "Asian", "Black or African-American", "Native Hawaiian or other", "White" for Race +# And selects "None of the conditions listed above apply to me." for Disability or Serious Health Condition +# And clicks "Next" +# Then user is on the "Review" page +# And clicks "Submit Application" +# And clicks "Ok" +# And clicks "Done" +# And user navigates to Your Applications tab +# And user withdraws the application +# And "Confirm" withdrawing the application +# Then verifies that the application status is "Withdrawn" Examples: | firstName | middleName | lastName | email | phone | businessPhone | highestEducation | address | aptNumber | city | state | country | zip | referenceOneFirstName | referenceOneMiddleName | referenceOneLastName | referenceOneEmail | referenceOnePhoneNumber | referenceOneRelationship | referenceOnePositionTitle | referenceOneOrganizationName | referenceTwoFirstName | referenceTwoMiddleName | referenceTwoLastName | referenceTwoEmail | referenceTwoPhoneNumber | referenceTwoPositionTitle | referenceTwoOrganizationName | updatedReferenceOneFirstName | updatedReferenceOneMiddleName | updatedReferenceOneLastName | updatedReferenceOneEmail | updatedReferenceOnePhoneNumber | updatedReferenceOneRelationship | updatedReferenceOnePositionTitle | updatedReferenceOneOrganizationName | updatedReferenceTwoFirstName | updatedReferenceTwoMiddleName | updatedReferenceTwoLastName | updatedReferenceTwoEmail | updatedReferenceTwoPhoneNumber | updatedReferenceTwoPositionTitle | updatedReferenceTwoOrganizationName | diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Pages/User_Table_Page.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Pages/User_Table_Page.java index 656612c7e..d4c490a70 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Pages/User_Table_Page.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Pages/User_Table_Page.java @@ -24,6 +24,6 @@ public static String dynamicUserLocator(String userName){ /** * USERS DROPDOWN */ - public static String usersDropDown = "//select[@aria-label='Search a specific field of the Users list']"; + public static String usersDropDown = "//select[@aria-label='Search a specific field of the Users list, 9 items']"; } diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/ApplicantProfileSteps.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/ApplicantProfileSteps.java index b16683a52..750b6d807 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/ApplicantProfileSteps.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/ApplicantProfileSteps.java @@ -302,9 +302,9 @@ public void user_verifies_demographics_information_and(String sharingDemographic ApplicantProfileStepsImpl.user_verifies_demographics_information_and(sharingDemographicsText, sexText, ethnicityText, raceText, disabilityText); } - @Then("user verifies references one information {string}, {string}, {string}, {string}, {string}, {string}, {string}, {string}") - public void user_verifies_references_information(String firstNameText, String middleNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { - ApplicantProfileStepsImpl.user_verifies_references_information(firstNameText, middleNameText, lastNameText, emailText, phoneNumberText, relationshipText, titleText, organizationText); + @Then("user verifies references one information {string}, {string}, {string}, {string}, {string}, {string}, {string}") + public void user_verifies_references_information(String firstNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { + ApplicantProfileStepsImpl.user_verifies_references_information(firstNameText, lastNameText, emailText, phoneNumberText, relationshipText, titleText, organizationText); } @Then("if reference two is required then user enters Reference Two first name {string}") @@ -347,9 +347,9 @@ public void enters_reference_two_organization_name(String organizationTextBox) { ApplicantProfileStepsImpl.enters_reference_two_organization_name(organizationTextBox); } - @Then("user verifies references two information {string}, {string}, {string}, {string}, {string}, {string}, {string}, {string}") - public void user_verifies_references_two_information(String firstNameText, String middleNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { - ApplicantProfileStepsImpl.user_verifies_references_two_information(firstNameText, middleNameText, lastNameText, emailText, phoneNumberText, relationshipText, titleText, organizationText); + @Then("user verifies references two information {string}, {string}, {string}, {string}, {string}, {string}, {string}") + public void user_verifies_references_two_information(String firstNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { + ApplicantProfileStepsImpl.user_verifies_references_two_information(firstNameText, lastNameText, emailText, phoneNumberText, relationshipText, titleText, organizationText); } @Then("if either a Cover Letter, Qualification Statement, Curriculum Vitae \\(CV), or Vision Statement \\(or all) were uploaded then documents are displayed in the Application Documents section") diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java index 3cafe6adf..b73501af8 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java @@ -15,6 +15,7 @@ import com.nci.automation.utils.CucumberLogUtils; import com.nci.automation.utils.MiscUtils; import com.nci.automation.web.CommonUtils; +import com.nci.automation.web.ConfUtils; import com.nci.automation.web.EnvUtils; import com.nci.automation.web.PlaywrightUtils; import org.testng.Assert; @@ -347,8 +348,10 @@ public static void selects_for_organizational_code_drop_down(String option) { * @param text The text value of the element to be clicked. */ public static void clicks(String text) { + page.waitForSelector(Playwright_Common_Locators.dynamicTextLocator(text)); Playwright_Common_Utils.scrollIntoView(Playwright_Common_Locators.dynamicTextLocator(text)); page.locator(Playwright_Common_Locators.dynamicTextLocator(text)).click(); + MiscUtils.sleep(2000); CucumberLogUtils.playwrightScreenshot(page); } @@ -1306,7 +1309,6 @@ public static void user_verifies_demographics_information_and(String sharingDemo * Verifies the references information provided by the user. * * @param firstNameText The first name of the user. - * @param middleNameText The middle name of the user. * @param lastNameText The last name of the user. * @param emailText The email address of the user. * @param phoneNumberText The phone number of the user. @@ -1314,10 +1316,10 @@ public static void user_verifies_demographics_information_and(String sharingDemo * @param titleText The title of the user. * @param organizationText The organization of the user. */ - public static void user_verifies_references_information(String firstNameText, String middleNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { + public static void user_verifies_references_information(String firstNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { Playwright_Common_Utils.scrollIntoView("(//tbody/tr/td)[7]"); ArrayList expectedValues = new ArrayList<>(); - expectedValues.add(firstNameText + " " + middleNameText + " " + lastNameText); + expectedValues.add(firstNameText + " " + lastNameText); expectedValues.add(emailText); expectedValues.add(phoneNumberText); expectedValues.add(relationshipText); @@ -1335,7 +1337,6 @@ public static void user_verifies_references_information(String firstNameText, St * Verifies that the user's references contain the expected information. * * @param firstNameText The first name of the user's reference. - * @param middleNameText The middle name of the user's reference. * @param lastNameText The last name of the user's reference. * @param emailText The email of the user's reference. * @param phoneNumberText The phone number of the user's reference. @@ -1343,9 +1344,9 @@ public static void user_verifies_references_information(String firstNameText, St * @param titleText The title of the user's reference. * @param organizationText The organization of the user's reference. */ - public static void user_verifies_references_two_information(String firstNameText, String middleNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { + public static void user_verifies_references_two_information(String firstNameText, String lastNameText, String emailText, String phoneNumberText, String relationshipText, String titleText, String organizationText) { ArrayList expectedValues = new ArrayList<>(); - expectedValues.add(firstNameText + " " + middleNameText + " " + lastNameText); + expectedValues.add(firstNameText + " " + lastNameText); expectedValues.add(emailText); expectedValues.add(phoneNumberText); expectedValues.add(relationshipText); @@ -1683,7 +1684,11 @@ public static void clicks_and_is_redirected_to_the_login_portal(String logInButt page.locator("//span[normalize-space()='Log in']").click(); List pages = page.context().pages(); newPage = pages.get(pages.size() - 1); - Hooks.softAssert.assertEquals(newPage.url(), "https://iam-stage.cancer.gov/app/servicenow_ud/exk13dplx1oy5d1pZ0h8/sso/saml?RelayState=https://specializedscientificjobs-test.nih.gov/nih-ssj.do#/"); + if (ConfUtils.getProperty("env").equals("test")){ + Hooks.softAssert.assertEquals(newPage.url(), "https://iam-stage.cancer.gov/app/servicenow_ud/exk13dplx1oy5d1pZ0h8/sso/saml?RelayState=https://specializedscientificjobs-test.nih.gov/nih-ssj.do#/"); + } else if (ConfUtils.getProperty("env").equals("sandbox")) { + Hooks.softAssert.assertEquals(newPage.url(), "https://iam-stage.cancer.gov/app/servicenow_ud/exk13dplx1oy5d1pZ0h8/sso/saml?RelayState=https://specializedscientificjobs-sandbox.nih.gov/nih-ssj.do#/"); + } CucumberLogUtils.playwrightScreenshot(page); } @@ -1693,7 +1698,7 @@ public static void clicks_and_is_redirected_to_the_login_portal(String logInButt * @param pivCacCardButtonText the expected text of the PIV/CAC card button */ public static void verifies_that_the_piv_cac_card_button_text_is(String pivCacCardButtonText) { - newPage.waitForSelector("(//a[@class='piv-button link-button'])[1]"); +// newPage.waitForSelector("(//a[@class='piv-button link-button'])[1]"); CucumberLogUtils.playwrightScreenshot(newPage); Hooks.softAssert.assertEquals(newPage.locator("(//a[@class='piv-button link-button'])[1]").innerText(), pivCacCardButtonText); } diff --git a/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java b/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java index 6d3ee7730..ffaceebb8 100644 --- a/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java +++ b/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java @@ -5,7 +5,10 @@ public class Playwright_NativeView_Dashboard_Page { /** * PROFILE BUTTON */ - public static String profileButton = "Avatar: available, user"; + //**** for test env *** +// public static String profileButton = "Avatar: available, user"; + //**** for sbx env *** + public static String profileButton = "css=div.item-label.keyboard-navigatable.snf-collapsible-list-header-button[role = 'button'][aria-label='Availability']"; /** * IMPERSONATE USER OPTION diff --git a/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java b/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java index 7eff8a42c..3dccd107e 100644 --- a/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java +++ b/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java @@ -37,7 +37,10 @@ public static void side_Door_Test_Account_Login_Impersonate(String name){ page.waitForLoadState(); page.reload(); MiscUtils.sleep(2000); - page.getByLabel(Playwright_NativeView_Dashboard_Page.profileButton).click(); + //**** for test env *** +// page.getByLabel(Playwright_NativeView_Dashboard_Page.profileButton).click(); + //**** for sbx env *** + page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("CBIIT Test Account: available")).click(); page.getByRole(AriaRole.MENUITEM, new Page.GetByRoleOptions().setName(Playwright_NativeView_Dashboard_Page.impersonateUserOption)).click(); MiscUtils.sleep(3000); page.getByRole(AriaRole.COMBOBOX, new Page.GetByRoleOptions().setName(Playwright_NativeView_Dashboard_Page.impersonateUserDropDown)).click(); From af98a5a51dbc368ef459b8ffff18fe769637749b Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Thu, 22 Aug 2024 14:38:01 -0400 Subject: [PATCH 3/6] updated tests to work after Washington D.C. SNOW UPDATE --- pom.xml | 2 +- .../java/PlaywrightTests/steps/Example.java | 46 +++-- .../Features/Applicant Profile.feature | 180 ++++++++---------- .../Features/OWM_Vacancy_Manager.feature | 8 +- .../ApplicantProfileStepsImpl.java | 24 ++- .../selenium/Features/Applicant Flow.feature | 23 +-- .../Features/DEPRECATED TESTS.feature | 32 +++- .../Unauthenticated Applicant.feature | 8 +- 8 files changed, 175 insertions(+), 148 deletions(-) diff --git a/pom.xml b/pom.xml index c2c570079..397d3a686 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ com.microsoft.playwright playwright - 1.43.0 + 1.46.0 diff --git a/src/test/java/PlaywrightTests/steps/Example.java b/src/test/java/PlaywrightTests/steps/Example.java index 68fd6d4dc..8eb42c530 100644 --- a/src/test/java/PlaywrightTests/steps/Example.java +++ b/src/test/java/PlaywrightTests/steps/Example.java @@ -7,27 +7,39 @@ public class Example { public static void main(String[] args) { +// try (Playwright playwright = Playwright.create()) { +// Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions() +// .setHeadless(false)); +// BrowserContext context = browser.newContext(new Browser.NewContextOptions() +// .setViewportSize(1512, 772)); +// Page page = context.newPage(); +// page.navigate("https://service-test.nci.nih.gov/side_door.do"); +// page.getByLabel("User name").click(); +// page.getByLabel("User name").fill("CBIITTestAccount"); +// page.getByLabel("Password", new Page.GetByLabelOptions().setExact(true)).click(); +// page.getByLabel("Password", new Page.GetByLabelOptions().setExact(true)).fill("curlbylawdighalvekinlarswould"); +// page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Log in")).click(); +// page.navigate("https://service-test.nci.nih.gov/now/nav/ui/classic/params/target/%24pa_dashboard.do"); +// assertThat(page.getByLabel("StartNow Implementation", new Page.GetByLabelOptions().setExact(true))).containsText("StartNow Implementation"); +// assertThat(page.getByLabel("All menu", new Page.GetByLabelOptions().setExact(true))).containsText("StartNow Homepage"); +// page.getByPlaceholder("Filter").click(); +// page.getByPlaceholder("Filter").fill("CHARMS"); +// page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Dashboard")).click(); +// Page page1 = page.waitForPopup(() -> { +// page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Eligibility Review Needed, Total number of records is:").click(); +// }); try (Playwright playwright = Playwright.create()) { Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions() .setHeadless(false)); - BrowserContext context = browser.newContext(new Browser.NewContextOptions() - .setViewportSize(1512, 772)); + BrowserContext context = browser.newContext(); Page page = context.newPage(); - page.navigate("https://service-test.nci.nih.gov/side_door.do"); - page.getByLabel("User name").click(); - page.getByLabel("User name").fill("CBIITTestAccount"); - page.getByLabel("Password", new Page.GetByLabelOptions().setExact(true)).click(); - page.getByLabel("Password", new Page.GetByLabelOptions().setExact(true)).fill("curlbylawdighalvekinlarswould"); - page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Log in")).click(); - page.navigate("https://service-test.nci.nih.gov/now/nav/ui/classic/params/target/%24pa_dashboard.do"); - assertThat(page.getByLabel("StartNow Implementation", new Page.GetByLabelOptions().setExact(true))).containsText("StartNow Implementation"); - assertThat(page.getByLabel("All menu", new Page.GetByLabelOptions().setExact(true))).containsText("StartNow Homepage"); - page.getByPlaceholder("Filter").click(); - page.getByPlaceholder("Filter").fill("CHARMS"); - page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Dashboard")).click(); + page.navigate("https://service-test.nci.nih.gov/nih-ssj.do#/"); + page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("DIEGO TEST 20240820145734")).click(); + page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Sign In and Apply")).click(); Page page1 = page.waitForPopup(() -> { - page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Eligibility Review Needed, Total number of records is:").click(); + page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Log in")).click(); }); + assertThat(page1.locator("#form19")).containsText("Sign in with PIV / CAC card"); } - } -} \ No newline at end of file + } + } \ No newline at end of file diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature index 278375883..506963195 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature @@ -86,22 +86,6 @@ Feature: Applicant Profile Scenarios | firstName | middleName | lastName | email | phone | businessPhone | highestEducation | US Citizenship | address | aptNumber | city | state | country | zip | | SSJTest | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | Masters | Yes | 7 Mills | 12378 | Reston | VA | USA | 20453 | - @alenan @SSJ-712 @Bug_Open @JUAREZDS @In_Progress @playwright @Smoke @outdated - Scenario: Edit Demographics of Profile - Given a test account "SSJTest" is reset before executing a test - When User is on SSJ Landing page and user is "Maria Chaudhry" - PW - When User is on Profile tab - PW - And User clicks Edit for Demographics section - PW - And User chooses to share demographic details - PW - And User edits sex choice - PW - And User edits ethnicity choice - PW - And User edits race choice - PW - And User edits disability choice - PW - And User saves the updated section - PW - And User clicks Edit for Demographics section - PW - And User chooses not to share demographic details - PW - Then User saves the updated section - PW - @US_APPTRACK-342 @TC_APPTRACK-385 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario Outline: Verifying applicant is able to see "Your Applications" tab and page content after applying to a Vacancy # Given an Okta user "" is on the SSJ home page and logs in - PLEASE LEAVE THIS HERE! NEED TO CONNECT WITH OKTA TEAM @@ -355,7 +339,7 @@ Would you like to log in now or go back to the home page? | firstName | middleName | lastName | email | phone | businessPhone | highestEducation | address | aptNumber | city | state | country | zip | | SSJTest | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | Masters | 7 Mills | 12378 | Reston | VA | USA | 20453 | - @TC_APPTRACK-360 @JUAREZDS @Regression @playwright + @TC_APPTRACK-360 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario Outline: Verification of the Save application functionality Given a test account "SSJTest" is reset before executing a test And User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW @@ -429,87 +413,87 @@ Would you like to log in now or go back to the home page? And User clicks on Save Application button And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" And user navigates to Your Applications tab -# Then verifies that the application became a draft "Draft" -# And clicks Edit vacancy "DIEGO TEST" -# And uploads cover letter if cover letter option is displayed -# And uploads qualification statement if qualification statement is displayed -# And uploads a Curriculum Vitae if Curriculum Vitae option is displayed -# And uploads a Vision Statement if Vision Statement option is displayed -# And clicks "Next" -# And user is on the "References" page -# Then if reference one is required then user enters Reference One first name "" -# And enters Reference One middle name "" -# And enters Reference One last name "" -# And enters Reference One email address "" -# And enters Reference One phone number "" -# And selects Reference One relationship as "" -# And enters Reference One position title "" -# And enters Reference One organization name "" -# Then if reference two is required then user enters Reference Two first name "" -# And enters Reference Two middle name "" -# And enters Reference Two last name "" -# And enters Reference Two email address "" -# And enters Reference Two phone number "" -# And enters Reference Two position title "" -# And enters Reference Two organization name "" -# And clicks " Save Application" -# And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" -# And user navigates to Your Applications tab -# And clicks on Vacancy Title "DIEGO TEST" -# And uploads cover letter if cover letter option is displayed -# And uploads qualification statement if qualification statement is displayed -# And uploads a Curriculum Vitae if Curriculum Vitae option is displayed -# And uploads a Vision Statement if Vision Statement option is displayed -# And clicks "Next" -# And verifies that Reference One "", "", "", "", "", "", "" is updated -# And verifies tha Reference Two "", "", "", "", "", "", "" is updated -# And clicks " Save Application" -# And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" -# And user navigates to Your Applications tab -# And clicks on Remove button -# And "Confirm" that the draft was removed -# And verifies that the draft is no longer showing under Your Application tab -# And navigates to the "Home" tab to be able to apply to a vacancy after creating a profile -# And clicks on Vacancy Title "DIEGO TEST" -# And clicks "Apply" -# Then user is on the "Application Documents" page -# And uploads cover letter if cover letter option is displayed -# And uploads qualification statement if qualification statement is displayed -# And uploads a Curriculum Vitae if Curriculum Vitae option is displayed -# And uploads a Vision Statement if Vision Statement option is displayed -# And clicks "Next" -# Then user is on the "References" page -# Then if reference one is required then user enters Reference One first name "" -# And enters Reference One middle name "" -# And enters Reference One last name "" -# And enters Reference One email address "" -# And enters Reference One phone number "" -# And selects Reference One relationship as "" -# And enters Reference One position title "" -# And enters Reference One organization name "" -# Then if reference two is required then user enters Reference Two first name "" -# And enters Reference Two middle name "" -# And enters Reference Two last name "" -# And enters Reference Two email address "" -# And enters Reference Two phone number "" -# And enters Reference Two position title "" -# And enters Reference Two organization name "" -# And clicks "Next" -# Then user is on the "Demographic Information" page -# And user agrees to share demographic details and help improve the hiring process. -# And selects "Male" for Sex -# And selects "Hispanic or Latino" for Ethnicity -# And selects "American Indian or Alaska", "Asian", "Black or African-American", "Native Hawaiian or other", "White" for Race -# And selects "None of the conditions listed above apply to me." for Disability or Serious Health Condition -# And clicks "Next" -# Then user is on the "Review" page -# And clicks "Submit Application" -# And clicks "Ok" -# And clicks "Done" -# And user navigates to Your Applications tab -# And user withdraws the application -# And "Confirm" withdrawing the application -# Then verifies that the application status is "Withdrawn" + Then verifies that the application became a draft "Draft" + And clicks Edit vacancy "DIEGO TEST" + And uploads cover letter if cover letter option is displayed + And uploads qualification statement if qualification statement is displayed + And uploads a Curriculum Vitae if Curriculum Vitae option is displayed + And uploads a Vision Statement if Vision Statement option is displayed + And clicks "Next" + And user is on the "References" page + Then if reference one is required then user enters Reference One first name "" + And enters Reference One middle name "" + And enters Reference One last name "" + And enters Reference One email address "" + And enters Reference One phone number "" + And selects Reference One relationship as "" + And enters Reference One position title "" + And enters Reference One organization name "" + Then if reference two is required then user enters Reference Two first name "" + And enters Reference Two middle name "" + And enters Reference Two last name "" + And enters Reference Two email address "" + And enters Reference Two phone number "" + And enters Reference Two position title "" + And enters Reference Two organization name "" + And clicks " Save Application" + And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" + And user navigates to Your Applications tab + And clicks on Vacancy Title "DIEGO TEST" + And uploads cover letter if cover letter option is displayed + And uploads qualification statement if qualification statement is displayed + And uploads a Curriculum Vitae if Curriculum Vitae option is displayed + And uploads a Vision Statement if Vision Statement option is displayed + And clicks "Next" + And verifies that Reference One "", "", "", "", "", "", "" is updated + And verifies tha Reference Two "", "", "", "", "", "", "" is updated + And clicks " Save Application" + And verifies that successful save alert is displayed "Application successfully saved Back to Applications Home?x" + And user navigates to Your Applications tab + And clicks on Remove button + And "Confirm" that the draft was removed + And verifies that the draft is no longer showing under Your Application tab + And navigates to the "Home" tab to be able to apply to a vacancy after creating a profile + And clicks on Vacancy Title "DIEGO TEST" + And clicks "Apply" + Then user is on the "Application Documents" page + And uploads cover letter if cover letter option is displayed + And uploads qualification statement if qualification statement is displayed + And uploads a Curriculum Vitae if Curriculum Vitae option is displayed + And uploads a Vision Statement if Vision Statement option is displayed + And clicks "Next" + Then user is on the "References" page + Then if reference one is required then user enters Reference One first name "" + And enters Reference One middle name "" + And enters Reference One last name "" + And enters Reference One email address "" + And enters Reference One phone number "" + And selects Reference One relationship as "" + And enters Reference One position title "" + And enters Reference One organization name "" + Then if reference two is required then user enters Reference Two first name "" + And enters Reference Two middle name "" + And enters Reference Two last name "" + And enters Reference Two email address "" + And enters Reference Two phone number "" + And enters Reference Two position title "" + And enters Reference Two organization name "" + And clicks "Next" + Then user is on the "Demographic Information" page + And user agrees to share demographic details and help improve the hiring process. + And selects "Male" for Sex + And selects "Hispanic or Latino" for Ethnicity + And selects "American Indian or Alaska", "Asian", "Black or African-American", "Native Hawaiian or other", "White" for Race + And selects "None of the conditions listed above apply to me." for Disability or Serious Health Condition + And clicks "Next" + Then user is on the "Review" page + And clicks "Submit Application" + And clicks "Ok" + And clicks "Done" + And user navigates to Your Applications tab + And user withdraws the application + And "Confirm" withdrawing the application + Then verifies that the application status is "Withdrawn" Examples: | firstName | middleName | lastName | email | phone | businessPhone | highestEducation | address | aptNumber | city | state | country | zip | referenceOneFirstName | referenceOneMiddleName | referenceOneLastName | referenceOneEmail | referenceOnePhoneNumber | referenceOneRelationship | referenceOnePositionTitle | referenceOneOrganizationName | referenceTwoFirstName | referenceTwoMiddleName | referenceTwoLastName | referenceTwoEmail | referenceTwoPhoneNumber | referenceTwoPositionTitle | referenceTwoOrganizationName | updatedReferenceOneFirstName | updatedReferenceOneMiddleName | updatedReferenceOneLastName | updatedReferenceOneEmail | updatedReferenceOnePhoneNumber | updatedReferenceOneRelationship | updatedReferenceOnePositionTitle | updatedReferenceOneOrganizationName | updatedReferenceTwoFirstName | updatedReferenceTwoMiddleName | updatedReferenceTwoLastName | updatedReferenceTwoEmail | updatedReferenceTwoPhoneNumber | updatedReferenceTwoPositionTitle | updatedReferenceTwoOrganizationName | diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/OWM_Vacancy_Manager.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/OWM_Vacancy_Manager.feature index 203da3ac4..46241d58d 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/OWM_Vacancy_Manager.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/OWM_Vacancy_Manager.feature @@ -1,7 +1,7 @@ Feature: OWM Vacancy Manager Scenarios Description: This Feature file contains OWM Vacancy Manager Scenarios - @SSJ-7 @SSJ-8 @juarezds @Regression @playwright @Smoke + @SSJ-7 @SSJ-8 @juarezds @Regression @playwright @Smoke @SNOW_UPDATED Scenario: Verification of Basic Vacancy Information section while creating an NCI Vacancy When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW @@ -46,7 +46,7 @@ Feature: OWM Vacancy Manager Scenarios And User clicks "Save" button to save the Basic Vacancy Information And User confirms that User is on "Mandatory Statements" section - @SSJ-69 @juarezds @Regression @playwright @Smoke + @SSJ-69 @juarezds @Regression @playwright @Smoke @SNOW_UPDATED Scenario: Verification of Mandatory Statements section while creating an NCI Vacancy When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW @@ -78,7 +78,7 @@ Feature: OWM Vacancy Manager Scenarios And User clicks button "Save" - PW Then User confirms that User is on "Vacancy Committee" section - @SSJ-185 @SSJ-306 @juarezds @Regression @playwright + @SSJ-185 @SSJ-306 @juarezds @Regression @playwright @SNOW_UPDATED Scenario: Verification of Vacancy Committee section while creating an NCI Vacancy Positive Flow When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW @@ -113,7 +113,7 @@ Feature: OWM Vacancy Manager Scenarios And User clicks button "Save" - PW Then User is directed to "Email Templates" section - @SSJ-11 @Regression @playwright @carberalf + @SSJ-11 @Regression @playwright @carberalf @SNOW_UPDATED Scenario: Verification of Vacancy Committee section while creating an NCI Vacancy Negative Flow When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java index b73501af8..50ab6b5ec 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java @@ -1681,7 +1681,8 @@ public static void verifies_that_the_button_text_is(String expectedCreateAnAccou * @param logInButton the locator of the login button element to click */ public static void clicks_and_is_redirected_to_the_login_portal(String logInButton) { - page.locator("//span[normalize-space()='Log in']").click(); + page.locator("//span[normalize-space()='"+logInButton+"']").click(); + MiscUtils.sleep(4000); List pages = page.context().pages(); newPage = pages.get(pages.size() - 1); if (ConfUtils.getProperty("env").equals("test")){ @@ -1689,7 +1690,7 @@ public static void clicks_and_is_redirected_to_the_login_portal(String logInButt } else if (ConfUtils.getProperty("env").equals("sandbox")) { Hooks.softAssert.assertEquals(newPage.url(), "https://iam-stage.cancer.gov/app/servicenow_ud/exk13dplx1oy5d1pZ0h8/sso/saml?RelayState=https://specializedscientificjobs-sandbox.nih.gov/nih-ssj.do#/"); } - CucumberLogUtils.playwrightScreenshot(page); + } /** @@ -1699,8 +1700,23 @@ public static void clicks_and_is_redirected_to_the_login_portal(String logInButt */ public static void verifies_that_the_piv_cac_card_button_text_is(String pivCacCardButtonText) { // newPage.waitForSelector("(//a[@class='piv-button link-button'])[1]"); - CucumberLogUtils.playwrightScreenshot(newPage); - Hooks.softAssert.assertEquals(newPage.locator("(//a[@class='piv-button link-button'])[1]").innerText(), pivCacCardButtonText); +// CucumberLogUtils.playwrightScreenshot(newPage); +// Hooks.softAssert.assertEquals(newPage.locator("(//a[@class='piv-button link-button'])[1]").innerText(), pivCacCardButtonText); + + Page[] popup = {null}; + page.context().onPage(p -> popup[0] = p); + + page.click("text=Log in"); + + // Waiting for new page + while (popup[0] == null) { + /* Add delay if you need */ + MiscUtils.sleep(2000); + } + + // Perform action on popup page + String text = popup[0].textContent("#form19"); + assert text.contains("Sign in with PIV / CAC card"); } /** diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature index 951f6bb80..a3a214ef2 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature @@ -3,10 +3,9 @@ Feature: Applicant Flow Scenarios Background: common steps Given User is on SSJ Landing page and user is "Okta Verified Applicant" - @Regression @Nekrashevich @APPTRACK-758 @selenium @Smoke + @Regression @Nekrashevich @APPTRACK-758 @selenium @Smoke @SNOW_UPDATED Scenario Outline: Edit Basic Information of Profile And User is on Profile tab - And User clicks Edit for Basic Information section And User inputs "" into first name field And User inputs "" into middle name field And User inputs "" into last name field @@ -26,21 +25,7 @@ Feature: Applicant Flow Scenarios | firstName | middleName | lastName | email | phone | businessPhone | address | appNumber | city | state | country | zip | | Mario | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | 7 Mills | 12378 | Reston | VA | USA | 20453 | - @Regression @Nekrashevich @APPTRACK-712 @selenium @Smoke - Scenario: Edit Demographics of Profile - When User is on Profile tab - And User clicks Edit for Demographics section - And User chooses to share demographic details - And User edits sex choice - And User edits ethnicity choice - And User edits race choice - And User edits disability choice - And User saves the updated section - And User clicks Edit for Demographics section - And User chooses not to share demographic details - Then User saves the updated section - - @Regression @Nekrashevich @SSJ-948 @selenium @Smoke + @Regression @Nekrashevich @SSJ-948 @selenium @Smoke @SNOW_UPDATED Scenario: Applicant view of SSJ Landing page And User can see SSJ landing page title "Specialized Scientific Jobs" And User can navigate via hyperlink to learn more about NIH @@ -50,7 +35,7 @@ Feature: Applicant Flow Scenarios | column1 | column2 | column3 | | Vacancy Title | Institute | Application Period | - @Regression @Nekrashevich @selenium @Smoke + @Regression @Nekrashevich @selenium @Smoke @SNOW_UPDATED Scenario: Vacancy Details View for an Applicant And User is on SSJ landing page When User clicks to apply for a live vacancy @@ -66,7 +51,7 @@ Feature: Applicant Flow Scenarios And User can verify the description of "FOREIGN EDUCATION" statement Then User can verify the description of "REASONABLE ACCOMODATION" statement - @Regression @Nekrashevich @selenium @Smoke + @Regression @Nekrashevich @selenium @Smoke @SNOW_UPDATED Scenario: Your Applications tab When User is on Your Applications tab And User can verify "Your Applications" page title diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature index 1329e690c..742c7c7ff 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature @@ -75,4 +75,34 @@ Feature: DEPRECATED TESTS And User clicks "Not Registered" option Then User is redirected to Okta registration page And User enters all the registration details - Then User can verify that Okta account was not created \ No newline at end of file + Then User can verify that Okta account was not created + + @SSJ-712 + Scenario: Edit Demographics of Profile + Given a test account "SSJTest" is reset before executing a test + When User is on SSJ Landing page and user is "Maria Chaudhry" - PW + When User is on Profile tab - PW + And User clicks Edit for Demographics section - PW + And User chooses to share demographic details - PW + And User edits sex choice - PW + And User edits ethnicity choice - PW + And User edits race choice - PW + And User edits disability choice - PW + And User saves the updated section - PW + And User clicks Edit for Demographics section - PW + And User chooses not to share demographic details - PW + Then User saves the updated section - PW + + @APPTRACK-712 + Scenario: Edit Demographics of Profile + When User is on Profile tab + And User clicks Edit for Demographics section + And User chooses to share demographic details + And User edits sex choice + And User edits ethnicity choice + And User edits race choice + And User edits disability choice + And User saves the updated section + And User clicks Edit for Demographics section + And User chooses not to share demographic details + Then User saves the updated section \ No newline at end of file diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature index 94c39bfcc..a5c14c4b8 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Unauthenticated Applicant.feature @@ -3,25 +3,25 @@ Feature: Unauthenticated applicant Scenarios Background: common steps Given User is on SSJ home page and user is Unauthenticated Applicant - @Regression @Nekrashevich @SSJ-124 @SSJ-365 @selenium + @Regression @Nekrashevich @SSJ-124 @SSJ-365 @selenium @SNOW_UPDATED Scenario: Not registered option And User clicks on Login Dropdown And User clicks "Not Registered" option Then User is redirected to Okta registration page - @Regression @Nekrashevich @SSJ-31 @selenium + @Regression @Nekrashevich @SSJ-31 @selenium @SNOW_UPDATED Scenario: Already Registered option And User clicks on Login Dropdown And User clicks "Already Registered" option Then User is redirected to sign in with existing credentials - @Regression @Nekrashevich @SSJ-122 @SSJ-36 @selenium + @Regression @Nekrashevich @SSJ-122 @SSJ-36 @selenium @SNOW_UPDATED Scenario: Employee/Contractor Onl option And User clicks on Login Dropdown And User clicks "Employee/Contractor Only" option Then User is redirected to NIH Login Page - @Regression @Nekrashevich @SSJ-27 @selenium + @Regression @Nekrashevich @SSJ-27 @selenium @SNOW_UPDATED Scenario: Okta registration error And User clicks on Login Dropdown And User clicks "Not Registered" option From c3716436c7ac4bfaa91ac5cad6a1f7df727086e1 Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Thu, 22 Aug 2024 18:15:07 -0400 Subject: [PATCH 4/6] .. --- .../Features/Applicant Profile.feature | 4 +-- .../selenium/Features/Applicant Flow.feature | 28 ++----------------- .../Features/DEPRECATED TESTS.feature | 25 ++++++++++++++++- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature index 506963195..893d5b15c 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Features/Applicant Profile.feature @@ -1,7 +1,7 @@ Feature: Applicant Profile Scenarios Description: This Feature file contains Applicant Profile Scenarios - @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @JUAREZDS @Regression @playwright + @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @JUAREZDS @Regression @playwright @SNOW_UPDATED Scenario Outline: Verifying the Save application functionality Given a test account "" is reset before executing a test When User is on SSJ Landing page and user is "Maria Chaudhry" - PW @@ -254,7 +254,7 @@ Feature: Applicant Profile Scenarios And verifies Application Documents text "APPLICATION DOCUMENTS" And verifies required documents with required references needed to apply to this test Vacancy - @TC_APPTRACK-144 @JUAREZDS @Regression @playwright @in-prog @Progression + @TC_APPTRACK-144 @JUAREZDS @Regression @playwright Scenario: Applying for vacancy as unauthenticated applicant Given an unauthenticated applicant is on the SSJ homepage "SSJPortalView" And verifies that the drop drown text is "Login" diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature index a3a214ef2..3baf8cd8f 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/Applicant Flow.feature @@ -1,32 +1,8 @@ Feature: Applicant Flow Scenarios - Background: common steps - Given User is on SSJ Landing page and user is "Okta Verified Applicant" - - @Regression @Nekrashevich @APPTRACK-758 @selenium @Smoke @SNOW_UPDATED - Scenario Outline: Edit Basic Information of Profile - And User is on Profile tab - And User inputs "" into first name field - And User inputs "" into middle name field - And User inputs "" into last name field - And User inputs "" into email field - And User inputs "" into phone field - And User inputs "" into business phone field - And User picks highest degree option as "Masters" - And User confirms being a US Citizen - And User inputs "
" into address field - And User inputs "" into appNumber field - And User inputs "" into city field - And User inputs "" into state field - And User inputs "" into country field - And User inputs "" into zip field - And User saves the updated section - Examples: - | firstName | middleName | lastName | email | phone | businessPhone | address | appNumber | city | state | country | zip | - | Mario | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | 7 Mills | 12378 | Reston | VA | USA | 20453 | - @Regression @Nekrashevich @SSJ-948 @selenium @Smoke @SNOW_UPDATED Scenario: Applicant view of SSJ Landing page + Given User is on SSJ Landing page and user is "Okta Verified Applicant" And User can see SSJ landing page title "Specialized Scientific Jobs" And User can navigate via hyperlink to learn more about NIH And User can see "Open Vacancies" header @@ -37,6 +13,7 @@ Feature: Applicant Flow Scenarios @Regression @Nekrashevich @selenium @Smoke @SNOW_UPDATED Scenario: Vacancy Details View for an Applicant + Given User is on SSJ Landing page and user is "Okta Verified Applicant" And User is on SSJ landing page When User clicks to apply for a live vacancy And User verifies that a vacancy title is displayed @@ -53,6 +30,7 @@ Feature: Applicant Flow Scenarios @Regression @Nekrashevich @selenium @Smoke @SNOW_UPDATED Scenario: Your Applications tab + Given User is on SSJ Landing page and user is "Okta Verified Applicant" When User is on Your Applications tab And User can verify "Your Applications" page title Then User can see the following columns displayed on Your Applications page diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature index 742c7c7ff..cbaaff632 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Features/DEPRECATED TESTS.feature @@ -77,6 +77,7 @@ Feature: DEPRECATED TESTS And User enters all the registration details Then User can verify that Okta account was not created +#these selenium tests already being covered by playwright tests @SSJ-712 Scenario: Edit Demographics of Profile Given a test account "SSJTest" is reset before executing a test @@ -105,4 +106,26 @@ Feature: DEPRECATED TESTS And User saves the updated section And User clicks Edit for Demographics section And User chooses not to share demographic details - Then User saves the updated section \ No newline at end of file + Then User saves the updated section + + @APPTRACK-758 + Scenario Outline: Edit Basic Information of Profile + And User is on Profile tab + And User inputs "" into first name field + And User inputs "" into middle name field + And User inputs "" into last name field + And User inputs "" into email field + And User inputs "" into phone field + And User inputs "" into business phone field + And User picks highest degree option as "Masters" + And User confirms being a US Citizen + And User inputs "
" into address field + And User inputs "" into appNumber field + And User inputs "" into city field + And User inputs "" into state field + And User inputs "" into country field + And User inputs "" into zip field + And User saves the updated section + Examples: + | firstName | middleName | lastName | email | phone | businessPhone | address | appNumber | city | state | country | zip | + | Mario | Michelle | Pololi | mario@gmail.com | 2018212343 | 2023323454 | 7 Mills | 12378 | Reston | VA | USA | 20453 | From 43875c1a62ad687bf92f6cc506482b39b652c752 Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Thu, 22 Aug 2024 18:51:13 -0400 Subject: [PATCH 5/6] .. --- .../ApplicantProfileStepsImpl.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java index 50ab6b5ec..2780b77b2 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java @@ -1699,24 +1699,14 @@ public static void clicks_and_is_redirected_to_the_login_portal(String logInButt * @param pivCacCardButtonText the expected text of the PIV/CAC card button */ public static void verifies_that_the_piv_cac_card_button_text_is(String pivCacCardButtonText) { -// newPage.waitForSelector("(//a[@class='piv-button link-button'])[1]"); -// CucumberLogUtils.playwrightScreenshot(newPage); -// Hooks.softAssert.assertEquals(newPage.locator("(//a[@class='piv-button link-button'])[1]").innerText(), pivCacCardButtonText); - Page[] popup = {null}; page.context().onPage(p -> popup[0] = p); - page.click("text=Log in"); - - // Waiting for new page while (popup[0] == null) { - /* Add delay if you need */ MiscUtils.sleep(2000); } - - // Perform action on popup page String text = popup[0].textContent("#form19"); - assert text.contains("Sign in with PIV / CAC card"); + assert text.contains(pivCacCardButtonText); } /** From 0929786f1d72f5a05e2b94c6d7480d617d76740f Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Mon, 26 Aug 2024 11:27:34 -0400 Subject: [PATCH 6/6] fixed PR comments --- .../java/PlaywrightTests/steps/Example.java | 45 ------------------- .../Playwright_NativeView_Dashboard_Page.java | 3 -- .../Playwright_ServiceNow_Common_Methods.java | 3 -- 3 files changed, 51 deletions(-) delete mode 100644 src/test/java/PlaywrightTests/steps/Example.java diff --git a/src/test/java/PlaywrightTests/steps/Example.java b/src/test/java/PlaywrightTests/steps/Example.java deleted file mode 100644 index 8eb42c530..000000000 --- a/src/test/java/PlaywrightTests/steps/Example.java +++ /dev/null @@ -1,45 +0,0 @@ -package PlaywrightTests.steps; - -import com.microsoft.playwright.*; -import com.microsoft.playwright.options.*; -import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; -import java.util.*; - -public class Example { - public static void main(String[] args) { -// try (Playwright playwright = Playwright.create()) { -// Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions() -// .setHeadless(false)); -// BrowserContext context = browser.newContext(new Browser.NewContextOptions() -// .setViewportSize(1512, 772)); -// Page page = context.newPage(); -// page.navigate("https://service-test.nci.nih.gov/side_door.do"); -// page.getByLabel("User name").click(); -// page.getByLabel("User name").fill("CBIITTestAccount"); -// page.getByLabel("Password", new Page.GetByLabelOptions().setExact(true)).click(); -// page.getByLabel("Password", new Page.GetByLabelOptions().setExact(true)).fill("curlbylawdighalvekinlarswould"); -// page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Log in")).click(); -// page.navigate("https://service-test.nci.nih.gov/now/nav/ui/classic/params/target/%24pa_dashboard.do"); -// assertThat(page.getByLabel("StartNow Implementation", new Page.GetByLabelOptions().setExact(true))).containsText("StartNow Implementation"); -// assertThat(page.getByLabel("All menu", new Page.GetByLabelOptions().setExact(true))).containsText("StartNow Homepage"); -// page.getByPlaceholder("Filter").click(); -// page.getByPlaceholder("Filter").fill("CHARMS"); -// page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Dashboard")).click(); -// Page page1 = page.waitForPopup(() -> { -// page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Eligibility Review Needed, Total number of records is:").click(); -// }); - try (Playwright playwright = Playwright.create()) { - Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions() - .setHeadless(false)); - BrowserContext context = browser.newContext(); - Page page = context.newPage(); - page.navigate("https://service-test.nci.nih.gov/nih-ssj.do#/"); - page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("DIEGO TEST 20240820145734")).click(); - page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Sign In and Apply")).click(); - Page page1 = page.waitForPopup(() -> { - page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Log in")).click(); - }); - assertThat(page1.locator("#form19")).containsText("Sign in with PIV / CAC card"); - } - } - } \ No newline at end of file diff --git a/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java b/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java index ffaceebb8..c44061725 100644 --- a/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java +++ b/src/test/java/appsCommon/Pages/Playwright_NativeView_Dashboard_Page.java @@ -5,9 +5,6 @@ public class Playwright_NativeView_Dashboard_Page { /** * PROFILE BUTTON */ - //**** for test env *** -// public static String profileButton = "Avatar: available, user"; - //**** for sbx env *** public static String profileButton = "css=div.item-label.keyboard-navigatable.snf-collapsible-list-header-button[role = 'button'][aria-label='Availability']"; /** diff --git a/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java b/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java index 3dccd107e..54956e54b 100644 --- a/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java +++ b/src/test/java/appsCommon/PlaywrightUtils/Playwright_ServiceNow_Common_Methods.java @@ -37,9 +37,6 @@ public static void side_Door_Test_Account_Login_Impersonate(String name){ page.waitForLoadState(); page.reload(); MiscUtils.sleep(2000); - //**** for test env *** -// page.getByLabel(Playwright_NativeView_Dashboard_Page.profileButton).click(); - //**** for sbx env *** page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("CBIIT Test Account: available")).click(); page.getByRole(AriaRole.MENUITEM, new Page.GetByRoleOptions().setName(Playwright_NativeView_Dashboard_Page.impersonateUserOption)).click(); MiscUtils.sleep(3000);