Skip to content

Commit

Permalink
Merge pull request #356 from CBIIT/sarwara2
Browse files Browse the repository at this point in the history
ESR - Federal Lead Closeout Approval
  • Loading branch information
Mariachaudhry authored Dec 30, 2024
2 parents c289927 + 06f0690 commit 3b6823e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: ESR Approvals
And the user is approved from the ESR Board approvers
Then the user confirms the ESR Board Intake Approvals are completed

@ESR-702 @sarwarahmed1 @In-Progress @playwright
@ESR-702 @sarwarahmed1 @Regression @playwright
Scenario: Test the Federal Lead Closeout Approval in an ESR-Q ticket
Given a user logs into Native View on the NCI at your service page
And navigates to create ESR
Expand All @@ -57,6 +57,8 @@ Feature: ESR Approvals
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-Q is completed
And the user is approved from a federal lead for closeout approval
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
Expand Down
10 changes: 10 additions & 0 deletions src/test/java/ITSM/ESR/playwright/steps/ESRApprovalSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,14 @@ public void the_user_is_approved_from_the_operational_poc() {
public void the_user_confirms_the_operational_poc_approval_is_completed() {
ESRApprovalStepsImplementation.confirmOperationalPOCApprovalIsCompleted();
}

@And("the user is approved from a federal lead for closeout approval")
public void the_user_is_approved_from_a_federal_lead_for_closeout_approval() {
ESRApprovalStepsImplementation.federalLeadCloseoutApproval();
}

@Then("the user confirms the Federal Lead Closeout Approval is completed")
public void the_user_confirms_the_federal_lead_closeout_approval_is_completed() {
ESRApprovalStepsImplementation.confirmFederalLeadCloseoutApprovalIsCompleted();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,21 @@ public static void operationalPOCApproval() {
public static void confirmOperationalPOCApprovalIsCompleted() {
assertThat(Playwright_Common_Locators.iframeLocator().locator("//select[@aria-label='Stage']")).containsText("Federal Lead Closeout Approval");
}

/**
* This method completes the Federal Lead Closeout approval
*/
public static void federalLeadCloseoutApproval() {
Playwright_Common_Locators.iframeLocator().locator("#tabs2_list").getByText("Approvers (10)").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();
}

/**
* This method confirms that the Federal Lead Closeout Approval is completed
*/
public static void confirmFederalLeadCloseoutApprovalIsCompleted() {
assertThat(Playwright_Common_Locators.iframeLocator().locator("//select[@aria-label='Stage']")).containsText("ESR Board Closeout Review");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ public static void completeCloseoutPreparationCatalogTaskForESRQ() {
Playwright_Common_Locators.iframeLocator().locator("(//div[@class='sc_variable_editor']/div/select)[4]").selectOption("Proceed to Implementation");
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   OCIO Federal Lead to")).click();
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   OCIO Federal Lead to")).fill("Jennifer Kwok");
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   Project Lead Assignment")).click();
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   Project Lead Assignment")).click();
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   Project Lead Assignment")).fill("CHARMS Technical Support");
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   Project Assignment Group")).click();
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("   Project Assignment Group")).fill("CHARMS Technical Support");
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("Project Lead to implement Q-")).click();
Playwright_Common_Locators.iframeLocator().getByRole(AriaRole.COMBOBOX, new FrameLocator.GetByRoleOptions().setName("Project Lead to implement Q-")).fill("Larry Brem");
Playwright_Common_Locators.iframeLocator().getByLabel("Add a row for Technology").click();
Expand Down

0 comments on commit 3b6823e

Please sign in to comment.