Skip to content

Commit

Permalink
Merge pull request #375 from CBIIT/sarwara2
Browse files Browse the repository at this point in the history
ESR Board Closeout Approvals for ESR-Q tickets
  • Loading branch information
Mariachaudhry authored Jan 21, 2025
2 parents d16369b + 0abed77 commit 84dd390
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.46.0</version>
<version>1.49.0</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 @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
Expand All @@ -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
Expand All @@ -120,3 +122,6 @@ 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
6 changes: 4 additions & 2 deletions src/test/java/ITSM/ESR/playwright/features/ESRTask.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 @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
Expand All @@ -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
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
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 @@ -50,4 +50,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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,34 @@ public static void federalLeadESRIApproval() {
Playwright_Common_Locators.iframeLocator().locator("(//select[@aria-required='false'])[1]").selectOption("approved");
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();
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();
}

/**
* 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");
}
}

0 comments on commit 84dd390

Please sign in to comment.