Skip to content

Commit

Permalink
Merge pull request #360 from CBIIT/Alena
Browse files Browse the repository at this point in the history
Leadership Queue (Pending Action). OA Intake app
  • Loading branch information
Mariachaudhry authored Jan 3, 2025
2 parents e8d99f6 + be51843 commit d7591a6
Show file tree
Hide file tree
Showing 3 changed files with 301 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,27 @@ Feature: Create OA Intake form
| Export as PDF | Export as Excel | Export as CSV|
And User can see OA Intakes - Cancelled filter is preset with cancelled requests
And User can remove filters for OA Intakes - Cancelled requests
And User logs out of OA Intake application

@selenium @Alena @Regression @OAIntake-650 @OAIntake-606
Scenario: Leadership Queue (Pending Action)
Given Leadership User logged in to OA Intake Portal
And User clicks on Leadership Queue tab
And User can verify page header is "Leadership Queue (Pending Action)"
When User clicks on OA Intake Leadership Queue menu
Then User can see the following options for OA Intake Leadership Queue menu
|option1 |option2 |option3 |
| Export as PDF | Export as Excel | Export as CSV|
And User can see OA Intakes filter is preset with submitted requests
And User can verify that Leadership Queue Request ID column can be sorted in descending and ascending order
And User can verify that Leadership Queue Status column can be sorted in descending and ascending order
And User can verify that Leadership Queue Branch column can be sorted in descending and ascending order
And User can verify that Leadership Queue Request Title column can be sorted in descending and ascending order
And User can verify that Leadership Queue Requestor (Requested For) column can be sorted in descending and ascending order
And User can verify that Leadership Queue Estimated Amount column can be sorted in descending and ascending order
And User can verify that Leadership Queue Recommended Contract Mechanism column can be sorted in descending and ascending order
And User can verify that Leadership Queue Requested Award Date column can be sorted in descending and ascending order
And User can verify that Leadership Queue Submitter column can be sorted in descending and ascending order
And User can verify that Leadership Queue Status Date column can be sorted in descending and ascending order
And User can verify that Leadership Queue Created On column can be sorted in descending and ascending order
And User logs out of OA Intake application
112 changes: 112 additions & 0 deletions src/test/java/PLATFORM_BUSINESS/OA_Intake/pages/OAIntakePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,4 +417,116 @@ public OAIntakePage() {
/**OA Intakes - Cancelled menu Export as CSV*/
@FindBy(xpath = "//*[@id='x10fadd561bce4a10c5c40e1ce54bcbbd']/div/div/div/div[1]/span/ul/li[3]/a")
public WebElement exportAsCSVOAIntakesCancelledMenu;

/**OA Intakes Context Menu*/
@FindBy(xpath = "//button[@aria-label='OA Intakes Context Menu']")
public WebElement oAIntakesContextMenu;

/**OA Intakes - Leadership Queue menu Export as PDF*/
@FindBy(xpath = "//a[.='Export as PDF']")
public WebElement exportAsPDFLeadershipQueueMenu;

/**OA Intakes - Leadership Queue menu Export as Excel*/
@FindBy(xpath = "//a[.='Export as Excel']")
public WebElement exportAsExcelLeadershipQueueMenu;

/**OA Intakes - Leadership Queue menu Export as CSV*/
@FindBy(xpath = "//a[.='Export as CSV']")
public WebElement exportAsCSVLeadershipQueueMenu;

/**preset Submitted status Leadership queue*/
@FindBy(xpath = "//a[.='Status = Submitted']")
public WebElement presetSubmittedStatusLeadershipQueue;

/** Leadership queue page header */
@FindBy(xpath = "(//span[contains(text(),'Leadership Queue (Pending Action)')])[2]")
public WebElement leadershipQueuePageHeader;

/**Request ID sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Request ID')]")
public WebElement sortAscendingRequestIDLeadershipQueue;

/**Request ID sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Request ID')]")
public WebElement sortDescendingRequestIDLeadershipQueue;

/**Status sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Status')]")
public WebElement sortAscendingStatusLeadershipQueue;

/**Status sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Status')]")
public WebElement sortDescendingStatusLeadershipQueue;

/**Branch sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Branch')]")
public WebElement sortAscendingBranchLeadershipQueue;

/**Branch sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Branch')]")
public WebElement sortDescendingBranchLeadershipQueue;

/**Request Title sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Request Title')]")
public WebElement sortAscendingRequestTitleLeadershipQueue;

/**Request Title sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Request Title')]")
public WebElement sortDescendingRequestTitleLeadershipQueue;

/**Requestor sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Requestor (Requested For)')]")
public WebElement sortAscendingRequestorLeadershipQueue;

/**Requestor sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Requestor (Requested For)')]")
public WebElement sortDescendingRequestorLeadershipQueue;

/**Estimated Amount sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Estimated Amount')]")
public WebElement sortAscendingEstimatedAmountLeadershipQueue;

/**Estimated Amount sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Estimated Amount')]")
public WebElement sortDescendingEstimatedAmountLeadershipQueue;

/**Recommended Contract Mechanism sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Recommended Contract Mechanism')]")
public WebElement sortAscendingRecommendedContractMechanismLeadershipQueue;

/**Recommended Contract Mechanism sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Recommended Contract Mechanism')]")
public WebElement sortDescendingRecommendedContractMechanismLeadershipQueue;

/**Requested Award Date sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Requested Award Date')]")
public WebElement sortAscendingRequestedAwardDateLeadershipQueue;

/**Requested Award Date sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Requested Award Date')]")
public WebElement sortDescendingRequestedAwardDateLeadershipQueue;

/**Submitter sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Submitter')]")
public WebElement sortAscendingSubmitterLeadershipQueue;

/**Submitter sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Submitter')]")
public WebElement sortDescendingSubmitterLeadershipQueue;

/**Status Date sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Status Date')]")
public WebElement sortAscendingStatusDateLeadershipQueue;

/**Status Date sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Status Date')]")
public WebElement sortDescendingStatusDateLeadershipQueue;

/**Created on sort by ascending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Ascending'][contains(text(),'Created On')]")
public WebElement sortAscendingCreatedOnLeadershipQueue;

/**Created on sort by descending option Leadership Queue*/
@FindBy(xpath = "//div[@title='Sort by Descending'][contains(text(),'Created On')]")
public WebElement sortDescendingCreatedOnLeadershipQueue;
}
167 changes: 166 additions & 1 deletion src/test/java/PLATFORM_BUSINESS/OA_Intake/steps/OAIntakeSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public void user_can_verify_page_header_as(String string) {
*/
@Given("User can verify page header is {string}")
public void user_can_verify_page_header_is(String header) {
softAssert.assertEquals(oaIntakePage.pageHeaderContractingOfficer.getText(), header);
softAssert.assertEquals(oaIntakePage.leadershipQueuePageHeader.getText(), header);
}

/**
Expand Down Expand Up @@ -741,4 +741,169 @@ public void user_can_see_oa_intakes_cancelled_filter_is_preset_with_cancelled_re
public void user_can_remove_filters_for_oa_intakes_cancelled_requests() {
CommonUtils.clickOnElement(oaIntakePage.removeSubsequentConditionsCancelled);
}

/**
*User clicks on Leadership Queue tab
*/
@Given("User clicks on Leadership Queue tab")
public void user_clicks_on_leadership_queue_tab() {
CommonUtils.clickOnElement(oaIntakePage.tabLeadershipQueue);
}

/**
*User clicks on OA Intake Leadership Queue menu
*/
@When("User clicks on OA Intake Leadership Queue menu")
public void user_clicks_on_oa_intake_leadership_queue_menu() {
CommonUtils.clickOnElement(oaIntakePage.oAIntakesContextMenu);
}

/**
*User verifies options for OA Intake Leadership Queue menu
*/
@Then("User can see the following options for OA Intake Leadership Queue menu")
public void user_can_see_the_following_options_for_oa_intake_leadership_queue_menu(io.cucumber.datatable.DataTable dataTable) {
CommonUtils.sleep(3000);
Map<String, String> options = OAIntakeCommonUtils.getMapFromDataTable(dataTable);
softAssert.assertTrue(oaIntakePage.exportAsPDFLeadershipQueueMenu.isDisplayed(), options.get("option1"));
softAssert.assertTrue(oaIntakePage.exportAsExcelLeadershipQueueMenu.isDisplayed(), options.get("option2"));
softAssert.assertTrue(oaIntakePage.exportAsCSVLeadershipQueueMenu.isDisplayed(), options.get("option3"));
CommonUtils.clickOnElement(oaIntakePage.oAIntakesContextMenu);
}

/**
*User can see OA Intakes filter is preset with submitted requests
*/
@Then("User can see OA Intakes filter is preset with submitted requests")
public void user_can_see_oa_intakes_accepted_filter_is_preset_with_submitted_requests() {
String expectedTextFilter = "Status = Submitted";
softAssert.assertEquals(oaIntakePage.presetSubmittedStatusLeadershipQueue.getText(),expectedTextFilter);
}

/**
*User verifies that Leadership Queue Request ID column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Request ID column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_request_id_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingRequestIDLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingRequestIDLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Status column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Status column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_status_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingStatusLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingStatusLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Branch column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Branch column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_branch_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingBranchLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingBranchLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Request Title column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Request Title column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_request_title_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingRequestTitleLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingRequestTitleLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Requestor column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Requestor \\(Requested For) column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_requestor_requested_for_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingRequestorLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingRequestorLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Estimated Amount column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Estimated Amount column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_estimated_amount_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingEstimatedAmountLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingEstimatedAmountLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Recommended Contract Mechanism column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Recommended Contract Mechanism column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_recommended_contract_mechanism_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingRecommendedContractMechanismLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingRecommendedContractMechanismLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Requested Award Date column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Requested Award Date column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_requested_award_date_column_can_be_sorted_in_descending_and_ascending_order() {
for (int i = 0; i < 2; i++) {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingRequestedAwardDateLeadershipQueue);
CommonUtils.sleep(1000);
}
CommonUtils.clickOnElement(oaIntakePage.sortDescendingRequestedAwardDateLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Submitter column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Submitter column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_submitter_column_can_be_sorted_in_descending_and_ascending_order() {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingSubmitterLeadershipQueue);
CommonUtils.sleep(1000);
CommonUtils.clickOnElement(oaIntakePage.sortDescendingSubmitterLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Status Date column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Status Date column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_status_date_column_can_be_sorted_in_descending_and_ascending_order() {
for (int i = 0; i < 2; i++) {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingStatusDateLeadershipQueue);
CommonUtils.sleep(1000);
}
CommonUtils.clickOnElement(oaIntakePage.sortDescendingStatusDateLeadershipQueue);
CommonUtils.sleep(1000);
}

/**
*User verifies that Leadership Queue Created On column can be sorted in descending and ascending order
*/
@Then("User can verify that Leadership Queue Created On column can be sorted in descending and ascending order")
public void user_can_verify_that_leadership_queue_created_on_column_can_be_sorted_in_descending_and_ascending_order() {
for (int i = 0; i < 2; i++) {
CommonUtils.clickOnElement(oaIntakePage.sortAscendingCreatedOnLeadershipQueue);
CommonUtils.sleep(1000);
}
CommonUtils.clickOnElement(oaIntakePage.sortDescendingCreatedOnLeadershipQueue);
CommonUtils.sleep(1000);
}
}

0 comments on commit d7591a6

Please sign in to comment.