diff --git a/src/main/java/configuration/ui/data/simplOpen/Authority.java b/src/main/java/configuration/ui/data/simplOpen/Authority.java index f4dfedd2bc3e0a7e56d3f7df5026401ae66b6321..02f8c9d185bc56a92c0d0a9d8d6fc9409e520996 100644 --- a/src/main/java/configuration/ui/data/simplOpen/Authority.java +++ b/src/main/java/configuration/ui/data/simplOpen/Authority.java @@ -62,6 +62,8 @@ public class Authority { public static final String ROLE_RESTRICTED = "Role Restricted Access"; public static final String ACCESS_DENIED = "Access denied. Your role does not grant permission to view this content."; public static final String ALERT_ERROR_CREATING_CREDENTIAL_LOCATOR = "A participant with this data is already present, check email, organisation or username"; + public static final String ALERT_DISPLAYING_SUCCESSFUL_APPROVED = "You successfully approved this request. A set of credentials was created for the applicant."; + public static final String ALERT_DISPLAYING_SUCCESSFUL_REJECTED = "You successfully reject this request."; public static final String[] PARTICIPANT_TYPES = { "Data Provider", diff --git a/src/main/java/framework/ui/pages/simplOpen/AuthorityPage.java b/src/main/java/framework/ui/pages/simplOpen/AuthorityPage.java index ffc7b487c2d65277bcc812831a915d682f6079eb..6a142e609c2c930c04ad6f09383535f884061fa7 100644 --- a/src/main/java/framework/ui/pages/simplOpen/AuthorityPage.java +++ b/src/main/java/framework/ui/pages/simplOpen/AuthorityPage.java @@ -12,6 +12,8 @@ import java.util.Collections; import java.util.List; import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; +import static configuration.ui.data.simplOpen.Authority.ALERT_DISPLAYING_SUCCESSFUL_APPROVED; +import static configuration.ui.data.simplOpen.Authority.ALERT_DISPLAYING_SUCCESSFUL_REJECTED; import static framework.common.Assertions.*; import static framework.ui.locators.simplOpen.Authority.*; import static framework.ui.locators.simplOpen.Authority.REQUEST_STATUS_LOCATOR; @@ -405,6 +407,7 @@ public class AuthorityPage { private void processApproval() throws InterruptedException { Utils.clickButtonByAriaText("Approve"); + assertElementIsVisibleByLocator(page.getByText(ALERT_DISPLAYING_SUCCESSFUL_APPROVED)); Thread.sleep(100); waitForStatusToBeDisplayed("APPROVED"); } @@ -415,6 +418,7 @@ public class AuthorityPage { reasonField.fill("Automation reject test"); Utils.clickButtonByAriaText("Reject"); + assertElementIsVisibleByLocator(page.getByText(ALERT_DISPLAYING_SUCCESSFUL_REJECTED)); Thread.sleep(100); waitForStatusToBeDisplayed("REJECTED"); } diff --git a/src/test/java/features/ui/simplOpen/Authority.feature b/src/test/java/features/ui/simplOpen/Authority.feature index b7d1bb18823e2110feef387e7e42f520690d216c..e8ed9b821a1df90bf776dbcd771139c3118fbd5d 100644 --- a/src/test/java/features/ui/simplOpen/Authority.feature +++ b/src/test/java/features/ui/simplOpen/Authority.feature @@ -183,7 +183,7 @@ Feature: Authority | | | rejected | - @TCA14 @SIMPL-617 @SIMPL-612 @SIMPL-608 @SIMPL-609 @SIMPL-614 @SIMPL-618 @bug:SIMPL-9887 @bug:SIMPL-9566 + @TCA14 @SIMPL-617 @SIMPL-612 @SIMPL-608 @SIMPL-609 @SIMPL-614 @SIMPL-618 @SIMPL-1081 @bug:SIMPL-9887 @bug:SIMPL-9566 # Check Test. "In Progress status" does no longer show participants with a PDF file submitted. # Now the new status seems to be "In_Review" BUT is not appearing in the filters. Scenario Outline: Confirm filtering by Status in Progress and <button> the request