From fc9e1b5807469f7a1fc8afd87ab78649ad0933af Mon Sep 17 00:00:00 2001 From: Sarwar Date: Thu, 9 Jan 2025 15:58:24 -0500 Subject: [PATCH] Init --- .../playwright/features/ESRApproval.feature | 20 +++++++++++++++++-- .../playwright/steps/ESRApprovalSteps.java | 5 +++++ .../ESRApprovalStepsImplementation.java | 10 ++++++++++ 3 files changed, 33 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 f65053514..09d11b06e 100644 --- a/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature +++ b/src/test/java/ITSM/ESR/playwright/features/ESRApproval.feature @@ -61,7 +61,7 @@ Feature: ESR Approvals Then the user confirms the Federal Lead Closeout Approval is completed @ESR-703 @sarwarahmed1 @Regression @playwright - Scenario: Test the Operational POC Approval catalog task in an ESR-I ticket + Scenario: Test the Operational POC Approval in an ESR-I ticket Given a user logs into Native View on the NCI at your service page And navigates to create ESR And fills out all required information for ESR-I and clicks submit @@ -73,4 +73,20 @@ Feature: ESR Approvals 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 - Then the user confirms the Operational POC Approval is completed \ No newline at end of file + Then the user confirms the Operational POC Approval is completed + + @ESR-704 @sarwarahmed1 @Regression @playwright + Scenario: Test the Federal Lead Closeout Approval in an ESR-I ticket + Given a user logs into Native View on the NCI at your service page + And navigates to create ESR + And fills out all required information for ESR-I and clicks submit + And user clicks on Intake Preparation catalog task + And user fills out all required information for ESR-I Intake Preparation + And the user is approved from a federal lead + And ESR Board Intake Review catalog task is completed + And the user is approved from the ESR Board approvers + 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 + Then the user confirms the Federal Lead Closeout Approval is completed \ No newline at end of file diff --git a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java index 5cad4985c..30e06faff 100644 --- a/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java +++ b/src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java @@ -45,4 +45,9 @@ public void the_user_is_approved_from_a_federal_lead_for_closeout_approval() { public void the_user_confirms_the_federal_lead_closeout_approval_is_completed() { ESRApprovalStepsImplementation.confirmFederalLeadCloseoutApprovalIsCompleted(); } + + @And("the user is approved from a federal lead for ESR-I closeout approval") + public void the_user_is_approved_from_a_federal_lead_for_esr_i_closeout_approval() { + ESRApprovalStepsImplementation.federalLeadESRIApproval(); + } } \ 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 7c12e3122..b097c29d2 100644 --- a/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java +++ b/src/test/java/ITSM/ESR/playwright/stepsImplementation/ESRApprovalStepsImplementation.java @@ -85,4 +85,14 @@ public static void federalLeadCloseoutApproval() { public static void confirmFederalLeadCloseoutApprovalIsCompleted() { assertThat(Playwright_Common_Locators.iframeLocator().locator("//select[@aria-label='Stage']")).containsText("ESR Board Closeout Review"); } + + /** + * This method completes the Federal Lead Closeout approval for ESR-I + */ + public static void federalLeadESRIApproval() { + Playwright_Common_Locators.iframeLocator().locator("#tabs2_list").getByText("Approvers (11)").click(); + Playwright_Common_Locators.iframeLocator().getByLabel("Requested - Open record:").click(); + Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved"); + Playwright_Common_Locators.iframeLocator().locator("#sysverb_update").click(); + } } \ No newline at end of file