From c61624007241921d91f7ba43c20e1511c0f33785 Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Mon, 15 Jul 2024 17:53:45 -0400 Subject: [PATCH 1/3] fixed smoke tests --- .../SSJ/playwright/Features/Applicant Profile.feature | 2 +- .../SSJ/playwright/Features/OWM_Vacancy_Manager.feature | 6 +++--- .../SSJ/selenium/Features/Applicant Flow.feature | 1 - .../SSJ/selenium/Steps/ApplicantFlowSteps.java | 5 ----- 4 files changed, 4 insertions(+), 10 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 f4f759363..e4ccd6d3c 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 @@ -78,7 +78,7 @@ Feature: Applicant Profile Scenarios @alenan @SSJ-712 @Bug_Open @juarezds @In_Progress @playwright @Smoke Scenario: Edit Demographics of Profile - Given a test account "Maria Chaudhry" is reset before executing a test + 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 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 848a5d208..203da3ac4 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 @@ -48,7 +48,7 @@ Feature: OWM Vacancy Manager Scenarios @SSJ-69 @juarezds @Regression @playwright @Smoke Scenario: Verification of Mandatory Statements section while creating an NCI Vacancy - When User is on SCSS Landing page and user is "OWM Vacancy Manager" - PW + When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW And User clicks button "+ Create Vacancy" - PW And User fills in "Vacancy Title" field with title "Testing Automation Title" @@ -80,7 +80,7 @@ Feature: OWM Vacancy Manager Scenarios @SSJ-185 @SSJ-306 @juarezds @Regression @playwright Scenario: Verification of Vacancy Committee section while creating an NCI Vacancy Positive Flow - When User is on SCSS Landing page and user is "OWM Vacancy Manager" - PW + When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW And User clicks button "+ Create Vacancy" - PW And User fills in "Vacancy Title" field with title "Testing Automation Title" @@ -115,7 +115,7 @@ Feature: OWM Vacancy Manager Scenarios @SSJ-11 @Regression @playwright @carberalf Scenario: Verification of Vacancy Committee section while creating an NCI Vacancy Negative Flow - When User is on SCSS Landing page and user is "OWM Vacancy Manager" - PW + When User is on SSJ Landing page and user is "OWM Vacancy Manager" - PW And User navigates to tab "Vacancy Dashboard" - PW And User clicks button "+ Create Vacancy" - PW And User fills in "Vacancy Title" field with title "Testing Automation Title SSJ" 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 b396c3ed4..951f6bb80 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 @@ -56,7 +56,6 @@ Feature: Applicant Flow Scenarios When User clicks to apply for a live vacancy And User verifies that a vacancy title is displayed And User verifies that open and close dates are displayed - And User verifies that a close date has "12:00PM ET" end period specified And User verifies that Point of Contact is displayed And User verifies that Application Documents header is displayed And User confirms that HHS and NIH are Equal Opportunity Employers Statements are displayed diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Steps/ApplicantFlowSteps.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Steps/ApplicantFlowSteps.java index 7f6bf5f1c..58e248b40 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Steps/ApplicantFlowSteps.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/selenium/Steps/ApplicantFlowSteps.java @@ -237,11 +237,6 @@ public void user_verifies_that_open_and_close_dates_are_displayed() { Assert.assertNotNull(closeDateLiveVacancyVacDetailsView); } - @Given("User verifies that a close date has {string} end period specified") - public void user_verifies_that_a_close_date_has_end_period_specified(String endPeriod) { - Assert.assertTrue(applicantFlowStepsImplementation.verifyCloseDateContent(endPeriod)); - } - @Given("User verifies that Point of Contact is displayed") public void user_verifies_that_point_of_contact_is_displayed() { String pocVacDetailsView = applicantFlowPage.pocVacDetailsView.getText(); From 031e3bedaf4193cc3cba87599468335d6523e3c2 Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Thu, 18 Jul 2024 14:50:51 -0400 Subject: [PATCH 2/3] .. --- .../SSJ/playwright/Features/Applicant Profile.feature | 11 ++++++++++- .../ApplicantProfileStepsImpl.java | 2 +- 2 files changed, 11 insertions(+), 2 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 e4ccd6d3c..c28d21b28 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 | Jessica | Marianna | Mollick | mollickja@nih.gov | 7018211343 | 2123323454 | Masters | Yes | 11 Kolls | 6 | Sausalito | CA | USA | 97712 | | Karen | Elena | Andrew | andrewkl@nih.gov | 8233212333 | 2202122234 | Bachelors | Yes | 11 Bells | 39 | Sacramento | CA | USA | 95512 | - @juarezds @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @Regression @playwright @Bug_Open @Smoke + @juarezds @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @Regression @playwright @Bug_Open @Smoke @Progression 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 @@ -70,6 +70,15 @@ Feature: Applicant Profile Scenarios And verifies that the saved business phone number displays as "" And verifies that the saved highest education displays as "" And verifies that the saved US Citizenship displays as "" + 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 And tester navigates to native view to reset account with name "" so that automated test can run again without manual intervention Examples: 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 65168a61f..b376f4cfd 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java @@ -152,7 +152,7 @@ public static void verifies_that_the_saved_phone_number_displays_as(String expec */ public static void user_clicks_edit_for_demographics_section() { PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsOptionalTab).click(); - PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsEditButton).click(); +// PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsEditButton).click(); } /*** From ac6ff6cccea1692c5c5d68da23ab595b7aef8604 Mon Sep 17 00:00:00 2001 From: lfcabrera14 Date: Thu, 18 Jul 2024 16:06:10 -0400 Subject: [PATCH 3/3] Fixed logic for Saving Demographics functionality after bugfix --- .../Features/Applicant Profile.feature | 21 +++---------------- .../Steps/ApplicantProfileSteps.java | 6 ++++++ .../ApplicantProfileStepsImpl.java | 3 +-- 3 files changed, 10 insertions(+), 20 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 32ca9fb44..234189911 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 | Jessica | Marianna | Mollick | mollickja@nih.gov | 7018211343 | 2123323454 | Masters | Yes | 11 Kolls | 6 | Sausalito | CA | USA | 97712 | | Karen | Elena | Andrew | andrewkl@nih.gov | 8233212333 | 2202122234 | Bachelors | Yes | 11 Bells | 39 | Sacramento | CA | USA | 95512 | - @juarezds @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @Regression @playwright @Bug_Open @Smoke @Progression + @juarezds @SSJ-32 @SSJ-33 @SSJ-36 @SSJ-92 @SSJ-98 @Regression @playwright @SSJ-712 @Smoke 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 @@ -70,7 +70,7 @@ Feature: Applicant Profile Scenarios And verifies that the saved business phone number displays as "" And verifies that the saved highest education displays as "" And verifies that the saved US Citizenship displays as "" - And User clicks Edit for Demographics section - PW + And User clicks Demographics section - PW And User chooses to share demographic details - PW And User edits sex choice - PW And User edits ethnicity choice - PW @@ -79,28 +79,13 @@ Feature: Applicant Profile Scenarios 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 And tester navigates to native view to reset account with name "" so that automated test can run again without manual intervention Examples: | 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 - 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 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 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 b9ba1fb5a..cd930566f 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/ApplicantProfileSteps.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/ApplicantProfileSteps.java @@ -4,6 +4,7 @@ import ServiceNow.PlatformBusinessApps.SSJ.playwright.StepsImplementation.ApplicantProfileStepsImpl; import ServiceNow.PlatformBusinessApps.SSJ.playwright.StepsImplementation.Reset_Account_StepsImpl; import appsCommon.PlaywrightUtils.Playwright_ServiceNow_Common_Methods; +import com.nci.automation.web.PlaywrightUtils; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; @@ -146,6 +147,11 @@ public void user_clicks_edit_for_demographics_section_pw() { ApplicantProfileStepsImpl.user_clicks_edit_for_demographics_section(); } + @Then("User clicks Demographics section - PW") + public void user_clicks_demographics_section_pw() { + PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsOptionalTab).click(); + } + @When("User chooses to share demographic details - PW") public void user_chooses_to_share_demographic_details_pw() { ApplicantProfileStepsImpl.user_chooses_to_share_demographic_details(); 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 15d2dd191..ab8f08120 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/ApplicantProfileStepsImpl.java @@ -152,8 +152,7 @@ public static void verifies_that_the_saved_phone_number_displays_as(String expec * USE THIS METHOD TO EDIT DEMOGRAPHICS SECTION */ public static void user_clicks_edit_for_demographics_section() { - PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsOptionalTab).click(); -// PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsEditButton).click(); + PlaywrightUtils.page.locator(Profile_Tab_Page.demographicsEditButton).click(); } /***