Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ef484b4f authored by Jaime Pérez-Lozana's avatar Jaime Pérez-Lozana
Browse files

Merge branch 'SOUI-SIMPL-3312' into 'develop'

SOUI-SIMPL-3312

See merge request simpl/pso/pso-test/pso-test-automation!162
parents 86fc55c2 3c595af5
No related branches found
No related tags found
No related merge requests found
Pipeline #273321 passed with warnings
......@@ -510,7 +510,6 @@ public class AuthorityPage {
return df.format(date);
}
/***
* This method compares the values obtained dynamically from the first row of the Participant List page
* and compares them with the values obtained dynamically from the Participant Detail page.
......@@ -559,4 +558,24 @@ public class AuthorityPage {
realValues.replaceAll(String::strip);
assertEqualCollections(expectedValues, realValues);
}
/***
* The method verifies if the tag or label to the right of the "Filter" button was applied successfully.
*
* @param filter
* @param valueFilter
* @param dateParsed ; this value is not taken from the Authority.feature as a parameter, it is calculated and parsed as String
*/
public void verifyFilterIsAppied(String filter, String valueFilter, String dateParsed) {
String filterValueApplied = "null";
if (filter.equals("Onboarding Date")) {
filterValueApplied = filter.concat(":").concat(" ").concat(dateParsed).concat(";");
} else {
filterValueApplied = filter.concat(":").concat(" ").concat(valueFilter.toUpperCase()).concat(";");
}
String filterAppliedLocatorValue = page.locator(FILTER_APPLIED_VALUE_LOCATOR).innerText().trim();
if (!filterValueApplied.equals(filterAppliedLocatorValue)) {
throw new AssertionError("The filter: " + filter + " with the value " + valueFilter + " is not displayed.");
}
}
}
......@@ -484,9 +484,9 @@ Feature: Authority
Then the dialog for the delete action is displayed successfully
@TCA32 @SIMPL-3309 @SIMPL-3310 @SIMPL-3311 @bugSIMPL-10276 @SIMPL-3313 @SIMPL-3314
@TCA32 @SIMPL-3309 @SIMPL-3310 @SIMPL-3311 @bugSIMPL-10276 @SIMPL-3312 @SIMPL-3313 @SIMPL-3314
# Filter by email scenario has a bug associated.
Scenario Outline: Participants Management page filtering and reseting the filters: <caseName>
Scenario Outline: Participants Management page filtering and resetting the filters: <caseName>
Given the user navigates to the "Participant Management" page
And the user logs in with a user with "IATTR_M" role
When the user filters by "<filter>" with value "<filterValue>"
......@@ -498,6 +498,7 @@ Feature: Authority
| caseName | filter | filterValue |
| the user is filtering by Participant type | Participant Type | Consumer |
| the user is filtering by Participant Name | Participant Name | PSO |
| the user is filtering by Onboarding date | Onboarding Date | |
#| the user is filtering by Email | Email | complete |
@TCA34 @SIMPL-4917
......
......@@ -40,6 +40,7 @@ public class AuthoritySteps {
private static String participantDetailNameValue = "null";
private static String participantDetailTypeValue = null;
private static String participantDetailOnboardingValue = null;
private static String datePasedToString = null;
@Given("the user clicks the register for this dataspace button")
......@@ -251,6 +252,7 @@ public class AuthoritySteps {
LocalDate today = LocalDate.now();
DateTimeFormatter formatter = CalendarWidget.getDateFormat();
page.locator(PARTICIPANT_LIST_SECOND_FILTER_LOCATOR).fill(today.format(formatter));
datePasedToString = authorityPage.parseDate(today.format(formatter));
}
default -> throw new IllegalArgumentException("Unknown filter: " + filter);
}
......@@ -781,12 +783,7 @@ public class AuthoritySteps {
@Then("the user resets the {string} with the value {string} applied successfully")
public void the_user_resets_the_filters_applied_successfully(String filter, String valueFilter) {
String filterValueApplied = "null";
filterValueApplied = filter.concat(":").concat(" ").concat(valueFilter.toUpperCase()).concat(";");
String filterAppliedLocatorValue = page.locator(FILTER_APPLIED_VALUE_LOCATOR).innerText().trim();
if (!filterValueApplied.equals(filterAppliedLocatorValue)) {
throw new AssertionError("The filter: " + filter + " with the value " + valueFilter + " is not displayed.");
}
authorityPage.verifyFilterIsAppied(filter, valueFilter, datePasedToString);
page.getByText(PARTICIPANT_PAGE_FILTER_BUTTON).click();
assertElementIsVisibleByLocator(page.getByText(PARTICIPANT_PAGE_RESET_FILTER_BUTTON));
page.getByText(PARTICIPANT_PAGE_RESET_FILTER_BUTTON).click();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment