From 95d8100af1c3f5b424a65885b3fc4c431c31a9bc Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 10:27:08 -0500 Subject: [PATCH 1/9] Completed test case 711 --- src/main/java/com/nci/automation/web/TestProperties.java | 2 +- src/test/java/ITSM/ESR/playwright/features/ESRTask.feature | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/nci/automation/web/TestProperties.java b/src/main/java/com/nci/automation/web/TestProperties.java index 9627b4b3e..3c18f075a 100644 --- a/src/main/java/com/nci/automation/web/TestProperties.java +++ b/src/main/java/com/nci/automation/web/TestProperties.java @@ -4,7 +4,7 @@ public class TestProperties { public static String ENV = "test"; public static String BROWSER = "chrome"; - public static boolean HEADLESS = true; + public static boolean HEADLESS = false; public static int SET_SLOW_MO_TIME = 1000; /** diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature b/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature index 4519e5aa5..19789d396 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature @@ -111,7 +111,7 @@ Feature: ESR Tasks And the ESR Board Closeout Review catalog task is completed Then the user confirms the ESR Board Closeout Review catalog task is completed - @ESR-??? @sarwarahmed1 @In-Progress @playwright + @ESR-711 @sarwarahmed1 @Progression @playwright Scenario: Test the ESR Board Closeout catalog task in an ESR-I ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR @@ -124,4 +124,6 @@ Feature: ESR Tasks And the Engineering Project Execution catalog task is completed And the Closeout Preparation catalog task for ESR-I is completed And the user is approved from the Operational POC - And the user is approved from a federal lead for ESR-I closeout approval \ No newline at end of file + And the user is approved from a federal lead for ESR-I closeout approval + And the ESR Board Closeout Review catalog task is completed + Then the user confirms the ESR Board Closeout Review catalog task is completed \ No newline at end of file From 105d1073b26cdbf7f3ab529b989b2c1183032f5f Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 10:38:13 -0500 Subject: [PATCH 2/9] Further steps --- src/main/java/com/nci/automation/web/TestProperties.java | 2 +- src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature | 2 ++ src/test/java/ITSM/ESR/playwright/features/ESRTask.feature | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nci/automation/web/TestProperties.java b/src/main/java/com/nci/automation/web/TestProperties.java index 3c18f075a..9627b4b3e 100644 --- a/src/main/java/com/nci/automation/web/TestProperties.java +++ b/src/main/java/com/nci/automation/web/TestProperties.java @@ -4,7 +4,7 @@ public class TestProperties { public static String ENV = "test"; public static String BROWSER = "chrome"; - public static boolean HEADLESS = false; + public static boolean HEADLESS = true; public static int SET_SLOW_MO_TIME = 1000; /** diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature index d6a5972cf..b1491daf9 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature @@ -105,6 +105,8 @@ Feature: ESR Approvals And the Closeout Preparation catalog task for ESR-Q is completed And the user is approved from a federal lead for closeout approval And the ESR Board Closeout Review catalog task is completed + And the user is approved for ESR Board Closeout Review + Then the user confirms the ESR Board Closeout Review approvals are completed @ESR-714 @sarwarahmed1 @In-Progress @playwright Scenario: Test the ESR Board Closeout Review approvals in an ESR-I ticket diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature b/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature index 19789d396..6b5ff73f8 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRTask.feature @@ -111,7 +111,7 @@ Feature: ESR Tasks And the ESR Board Closeout Review catalog task is completed Then the user confirms the ESR Board Closeout Review catalog task is completed - @ESR-711 @sarwarahmed1 @Progression @playwright + @ESR-711 @sarwarahmed1 @Regression @playwright Scenario: Test the ESR Board Closeout catalog task in an ESR-I ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR From 49ec731dae0097fc04e39a4a3bf6b0d7f2494aec Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 12:24:59 -0500 Subject: [PATCH 3/9] PlayWright update and changes --- pom.xml | 2 +- src/main/java/com/nci/automation/web/WebDriverUtils.java | 2 +- src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0087cc88c..59fc7ddd4 100644 --- a/pom.xml +++ b/pom.xml @@ -226,7 +226,7 @@ com.microsoft.playwright playwright - 1.46.0 + 1.49.0 diff --git a/src/main/java/com/nci/automation/web/WebDriverUtils.java b/src/main/java/com/nci/automation/web/WebDriverUtils.java index f472a4029..17775d2c7 100644 --- a/src/main/java/com/nci/automation/web/WebDriverUtils.java +++ b/src/main/java/com/nci/automation/web/WebDriverUtils.java @@ -43,7 +43,7 @@ public static void launchChrome() { ChromeOptions chromeOptions = new ChromeOptions(); if (headless) { - chromeOptions.addArguments("--headless"); + chromeOptions.addArguments("--headless=old"); } if ("true".equals(ci)) { diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature index b1491daf9..29ae6ec3d 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature @@ -91,7 +91,7 @@ Feature: ESR Approvals And the user is approved from a federal lead for ESR-I closeout approval Then the user confirms the Federal Lead Closeout Approval is completed - @ESR-712 @sarwarahmed1 @In-Progress @playwright + @ESR-712 @sarwarahmed1 @Progression @playwright Scenario: Test the ESR Board Closeout Review approvals in an ESR-Q ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR From b704fc0e145eeca6763ab53aed082ff1d0723991 Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 12:26:18 -0500 Subject: [PATCH 4/9] Edits --- src/main/java/com/nci/automation/web/WebDriverUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/nci/automation/web/WebDriverUtils.java b/src/main/java/com/nci/automation/web/WebDriverUtils.java index 17775d2c7..f472a4029 100644 --- a/src/main/java/com/nci/automation/web/WebDriverUtils.java +++ b/src/main/java/com/nci/automation/web/WebDriverUtils.java @@ -43,7 +43,7 @@ public static void launchChrome() { ChromeOptions chromeOptions = new ChromeOptions(); if (headless) { - chromeOptions.addArguments("--headless=old"); + chromeOptions.addArguments("--headless"); } if ("true".equals(ci)) { From b09621e55344b1338cf378d0c2f3b7fe150203ed Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 15:41:40 -0500 Subject: [PATCH 5/9] completed esr-q closeout approval test case --- .../playwright/features/ESRApproval.feature | 8 +++++-- .../playwright/steps/ESRApprovalSteps.java | 11 +++++++++ .../ESRApprovalStepsImplementation.java | 24 +++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature index 29ae6ec3d..11eac8c5e 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature @@ -91,7 +91,7 @@ Feature: ESR Approvals And the user is approved from a federal lead for ESR-I closeout approval Then the user confirms the Federal Lead Closeout Approval is completed - @ESR-712 @sarwarahmed1 @Progression @playwright + @ESR-712 @sarwarahmed1 @Regression @playwright Scenario: Test the ESR Board Closeout Review approvals in an ESR-Q ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR @@ -108,7 +108,7 @@ Feature: ESR Approvals And the user is approved for ESR Board Closeout Review Then the user confirms the ESR Board Closeout Review approvals are completed - @ESR-714 @sarwarahmed1 @In-Progress @playwright + @ESR-714 @sarwarahmed1 @Progression @playwright Scenario: Test the ESR Board Closeout Review approvals in an ESR-I ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR @@ -122,3 +122,7 @@ Feature: ESR Approvals And the Closeout Preparation catalog task for ESR-I is completed And the user is approved from the Operational POC And the user is approved from a federal lead for ESR-I closeout approval + And the ESR Board Closeout Review catalog task is completed + And the user is approved for ESR Board Closeout Review + Then the user confirms the ESR Board Closeout Review approvals are completed + diff --git a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java index 30e06faff..d02d9e580 100644 --- a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java +++ b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java @@ -1,6 +1,7 @@ package ITSM.ESR.playwright.steps; import ITSM.ESR.playwright.stepsImplementation.ESRApprovalStepsImplementation; +import ITSM.ESR.playwright.stepsImplementation.ESRTaskStepsImplementation; import io.cucumber.java.en.And; import io.cucumber.java.en.Then; @@ -50,4 +51,14 @@ public void the_user_confirms_the_federal_lead_closeout_approval_is_completed() public void the_user_is_approved_from_a_federal_lead_for_esr_i_closeout_approval() { ESRApprovalStepsImplementation.federalLeadESRIApproval(); } + + @And("the user is approved for ESR Board Closeout Review") + public void the_user_is_approved_for_esr_board_closeout_review() { + ESRApprovalStepsImplementation.esrBoardCloseoutApprovals(); + } + @Then("the user confirms the ESR Board Closeout Review approvals are completed") + public void the_user_confirms_the_esr_board_closeout_review_approvals_are_completed() { + ESRApprovalStepsImplementation.confirmESRBoardCloseoutReviewApprovalsAreCompleted(); + } + } \ No newline at end of file diff --git a/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java b/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java index b097c29d2..3964ee189 100644 --- a/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java +++ b/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java @@ -95,4 +95,28 @@ public static void federalLeadESRIApproval() { Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); } + + public static void esrBoardCloseoutApprovals() { + Playwright_Common_Locators.iframeLocator().locator("#tabs2_list").getByText("Approvers (18)").click(); + Playwright_Common_Locators.iframeLocator().locator("(//td[@class='vt']/a)[16]").click(); + Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); + Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); + Playwright_Common_Locators.iframeLocator().locator("(//td[@class='vt']/a)[18]").click(); + Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); + Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); + Playwright_Common_Locators.iframeLocator().locator("#tabs2_list").getByText("Approvers (18)").click(); + Playwright_Common_Locators.iframeLocator().locator("(//td[@class='vt']/a)[20]").click(); + Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); + Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); + Playwright_Common_Locators.iframeLocator().locator("(//td[@class='vt']/a)[22]").click(); + Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); + Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); + Playwright_Common_Locators.iframeLocator().locator("(//td[@class='vt']/a)[24]").click(); + Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); + Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); + } + + public static void confirmESRBoardCloseoutReviewApprovalsAreCompleted() { + assertThat(Playwright_Common_Locators.iframeLocator().locator("//select[@aria-label='Stage']")).containsText("Completed"); + } } \ No newline at end of file From aa6b33b69f0291c1a3ab383532d97e8f4ffd3276 Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 15:45:44 -0500 Subject: [PATCH 6/9] edits --- src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature | 2 +- src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature index 11eac8c5e..1d6ebb0b5 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature @@ -108,7 +108,7 @@ Feature: ESR Approvals And the user is approved for ESR Board Closeout Review Then the user confirms the ESR Board Closeout Review approvals are completed - @ESR-714 @sarwarahmed1 @Progression @playwright + @ESR-714 @sarwarahmed1 @In-Progress @playwright Scenario: Test the ESR Board Closeout Review approvals in an ESR-I ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR diff --git a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java index d02d9e580..1c27f3362 100644 --- a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java +++ b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java @@ -1,7 +1,6 @@ package ITSM.ESR.playwright.steps; import ITSM.ESR.playwright.stepsImplementation.ESRApprovalStepsImplementation; -import ITSM.ESR.playwright.stepsImplementation.ESRTaskStepsImplementation; import io.cucumber.java.en.And; import io.cucumber.java.en.Then; From 63808b6f2f1f5d52a79044e49a4f33b34ace2ae3 Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 15:47:10 -0500 Subject: [PATCH 7/9] Added java docs --- .../stepsImplementation/ESRApprovalStepsImplementation.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java b/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java index 3964ee189..8c13e84de 100644 --- a/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java +++ b/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java @@ -96,6 +96,9 @@ public static void federalLeadESRIApproval() { Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); } + /** + * This method completes the ESR Board Closeout Review approvals for ESR-Q tickets + */ public static void esrBoardCloseoutApprovals() { Playwright_Common_Locators.iframeLocator().locator("#tabs2_list").getByText("Approvers (18)").click(); Playwright_Common_Locators.iframeLocator().locator("(//td[@class='vt']/a)[16]").click(); @@ -116,6 +119,9 @@ public static void esrBoardCloseoutApprovals() { Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); } + /** + * This method confirms that the ESR Board Closeout Review approvals are completed + */ public static void confirmESRBoardCloseoutReviewApprovalsAreCompleted() { assertThat(Playwright_Common_Locators.iframeLocator().locator("//select[@aria-label='Stage']")).containsText("Completed"); } From cc5894b4855637dfba076d4149900197c34c0e70 Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 15:47:50 -0500 Subject: [PATCH 8/9] Space fixes --- src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature index 1d6ebb0b5..863116dcf 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature @@ -124,5 +124,4 @@ Feature: ESR Approvals And the user is approved from a federal lead for ESR-I closeout approval And the ESR Board Closeout Review catalog task is completed And the user is approved for ESR Board Closeout Review - Then the user confirms the ESR Board Closeout Review approvals are completed - + Then the user confirms the ESR Board Closeout Review approvals are completed \ No newline at end of file From 372156d9227a212f7a4b6d21744140c023cc5f5e Mon Sep 17 00:00:00 2001 From: Sarwar Date: Fri, 17 Jan 2025 15:49:26 -0500 Subject: [PATCH 9/9] Space fixes --- src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java index 1c27f3362..cab730cbf 100644 --- a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java +++ b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java @@ -55,9 +55,9 @@ public void the_user_is_approved_from_a_federal_lead_for_esr_i_closeout_approval public void the_user_is_approved_for_esr_board_closeout_review() { ESRApprovalStepsImplementation.esrBoardCloseoutApprovals(); } + @Then("the user confirms the ESR Board Closeout Review approvals are completed") public void the_user_confirms_the_esr_board_closeout_review_approvals_are_completed() { ESRApprovalStepsImplementation.confirmESRBoardCloseoutReviewApprovalsAreCompleted(); } - } \ No newline at end of file