diff --git a/src/main/java/configuration/ui/data/simplOpen/Authority.java b/src/main/java/configuration/ui/data/simplOpen/Authority.java index 02f8c9d185bc56a92c0d0a9d8d6fc9409e520996..09ec06fb746f324a1e6a35a97cfe218b4ce5ad47 100644 --- a/src/main/java/configuration/ui/data/simplOpen/Authority.java +++ b/src/main/java/configuration/ui/data/simplOpen/Authority.java @@ -29,8 +29,8 @@ public class Authority { public static final String ONBOARDING_DATAPARTICIPANT_REQUEST_ACCEPTED_USER = "dataparticipant_request_accepted@automation.com"; public static final String ONBOARDING_DATAPARTICIPANT_REQUEST_REJECTED_USER = "dataparticipant_request_rejected@automation.com"; public static final String ONBOARDING_DATAPARTICIPANT_PASSWORD = "Testing2@14"; - public static final String USER_PSO_SIMPL_3049_IDENTIFIER = "0194b20f-3144-7bd7-acaf-53c966ec82ae"; - public static final String USER_PSO_SIMPL_3049_ONBOARDING_DATE = "Wed Jan 29 2025"; + public static final String USER_PSO_SIMPL_3049_IDENTIFIER = "019503b3-5354-7c15-acdb-72cdee021db0"; + public static final String USER_PSO_SIMPL_3049_ONBOARDING_DATE = "Fri Feb 14 2025"; public static final String USER_PSO_SIMPL_3049_CREDENTIALS_EXPIRATION_DATE = "-"; public static final String REQUESTS_LIST_TABLE_REQUEST_STATUS_COLUMN = "Request status"; public static final String REQUESTS_LIST_TABLE_REQUESTER_EMAIL_COLUMN = "Requester email"; @@ -66,8 +66,8 @@ public class Authority { public static final String ALERT_DISPLAYING_SUCCESSFUL_REJECTED = "You successfully reject this request."; public static final String[] PARTICIPANT_TYPES = { - "Data Provider", "Consumer", + "Data Provider", "Infrastructure Provider", "Application Provider" }; diff --git a/src/main/java/framework/ui/locators/simplOpen/Authority.java b/src/main/java/framework/ui/locators/simplOpen/Authority.java index bc48184a40b3e8added0ce8b8e1ed9b1b57d9329..483343ed1be2979fb54039c8913bcb7cbdb7217b 100644 --- a/src/main/java/framework/ui/locators/simplOpen/Authority.java +++ b/src/main/java/framework/ui/locators/simplOpen/Authority.java @@ -1,7 +1,7 @@ package framework.ui.locators.simplOpen; public class Authority { - public static final String ONBOARDING_INFO_REGISTER_BUTTON_LOCATOR = ".mdc-button--unelevated.mat-primary"; + public static final String ONBOARDING_INFO_REGISTER_BUTTON_LOCATOR = "//span[contains(text(), 'Register for this dataspace' )]"; public static final String ONBOARDING_FORM_LOCATOR = "form[id='applicationForm']"; public static final String EMAIL_ADDRESS_LOCATOR = "input[id='email']"; public static final String ORGANISATION_INPUT_LOCATOR = "input[id='organization']"; @@ -20,6 +20,9 @@ public class Authority { public static final String PASSWORD_GENEREATED_LOCATOR = "div.lead:nth-child(2)"; public static final String SUBMISSION_FORM_BUTTON_LOCATOR = "//button[.//span[text()='Go to the application submission form →']]"; public static final String SUBMIT_APPLICATION_POPUP_LOCATOR = "//*[@id=\"mat-mdc-dialog-title-0\"]"; + public static final String ACCOUNT_CIRCLE_ICON = "//mat-icon[contains(text(), 'account_circle' )]"; + public static final String LOGOUT_BUTTON = "//span[contains(text(), 'Logout' )]"; + public static final String CLOSE_ALERT_MESSAGE = "button[aria-label='Close']"; public static final String KEYCLOAK_USERNAME_INPUT_LOCATOR = "input[id='username']"; public static final String KEYCLOAK_PASSWORD_INPUT_LOCATOR = "input[id='password']"; public static final String KEYCLOAK_SIGN_IN_BUTTON_LOCATOR = "input[id='kc-login']"; @@ -94,7 +97,7 @@ public class Authority { public static final String IDENTITY_ATTRIBUTE_LIST_ASSIGNABLE_TO_ROLE_COLUMN_LOCATOR = ".cdk-column-assignableToRoles [data-testid='text-element']"; public static final String IDENTITY_ATTRIBUTE_LIST_IN_USE_COLUMN_LOCATOR = ".cdk-column-used [data-testid='text-element']"; public static final String EMPTY_LIST_MESSAGE_LOCATOR = "div.p-5.text-center"; - public static final String LIST_IDENTITY_ATTRIBUTE_ID_LOCATOR = "//td[@class='mat-mdc-cell mdc-data-table__cell cdk-cell cdk-column-id mat-column-id']"; + public static final String LIST_IDENTITY_ATTRIBUTE_ID_LOCATOR = "//td[@class='mat-mdc-cell mdc-data-table__cell cdk-cell cdk-column-id mat-column-id ng-star-inserted']"; public static final String IDENTITY_ATTRIBUTE_EDIT_BUTTON_LOCATOR = "//span[normalize-space()='Edit Attribute']"; public static final String IDENTITY_ATTRIBUTE_DETAILS_COLUMNS_LOCATOR = "div[class='col']"; public static final String NEW_ATTRIBUTE_BUTTON_LOCATOR = "//span[normalize-space()='New Attribute']"; diff --git a/src/test/java/features/ui/simplOpen/Authority.feature b/src/test/java/features/ui/simplOpen/Authority.feature index 72175680ac6e17aa610620076a79a83fdb5ff38f..07af6ede94e861e7d5500572c8c16e9a1c51b6db 100644 --- a/src/test/java/features/ui/simplOpen/Authority.feature +++ b/src/test/java/features/ui/simplOpen/Authority.feature @@ -46,23 +46,23 @@ Feature: Authority | Data Provider | | Infrastructure Provider | - @TCA03 @SIMPL-751 @SIMPL-1034 - Scenario: Verify applicant dataspace participant user view in progress onboarding status - Given the applicant with pdf submitted is in the onboarding status page - When the applicant logs in with valid credentials - Then the application status summary page shows the status request is "Request submitted" with a "green" icon - And the application status summary page shows the status request is "In Progress" with a "green" icon - And the application status summary page shows the status request is "Request accepted" with a "grey" icon - And the applicant dataspace participant user can open the request status details dialog pressing See request details button - - @TCA04 @SIMPL-752 - Scenario: Verify applicant dataspace participant user does not view in progress onboarding status - Given the applicant with pdf not submitted is in the onboarding status page - When the applicant logs in with valid credentials - Then the application status summary page shows the status request is "Request submitted" with a "green" icon - And the application status summary page does not show the status request is "In Progress" with a "green" icon - And the application status summary page does not show the status request is "Request accepted" with a "grey" icon - And the applicant dataspace participant user can open the request status details dialog pressing See request details button +# @TCA03 @SIMPL-751 @SIMPL-1034 +# Scenario: Verify applicant dataspace participant user view in progress onboarding status +# Given the applicant with pdf submitted is in the onboarding status page +# When the applicant logs in with valid credentials +# Then the application status summary page shows the status request is "Request submitted" with a "green" icon +# And the application status summary page shows the status request is "In Progress" with a "green" icon +# And the application status summary page shows the status request is "Request accepted" with a "grey" icon +# And the applicant dataspace participant user can open the request status details dialog pressing See request details button +# +# @TCA04 @SIMPL-752 +# Scenario: Verify applicant dataspace participant user does not view in progress onboarding status +# Given the applicant with pdf not submitted is in the onboarding status page +# When the applicant logs in with valid credentials +# Then the application status summary page shows the status request is "Request submitted" with a "green" icon +# And the application status summary page does not show the status request is "In Progress" with a "green" icon +# And the application status summary page does not show the status request is "Request accepted" with a "grey" icon +# And the applicant dataspace participant user can open the request status details dialog pressing See request details button @TCA05 @SIMPL-746 @SIMPL-1132 Scenario Outline: Access Denied With Invalid Authentication: <page> @@ -134,7 +134,7 @@ Feature: Authority | Filtering by Name | Name | DATA_PROVIDER | | Filtering by Code | Code | DATA_PROVIDER | | Filtering by Date Range for the Last Update Date | Last Update Date | 01/01/2024 - 31/12/2025 | - | Filtering by Fixed Date for the Last Update Date | Last Update Date | 15/01/2025 - 15/01/2025 | + | Filtering by Fixed Date for the Last Update Date | Last Update Date | 14/02/2025 - 14/02/2025 | @TCA10 @SIMPL-652 @SIMPL-651 @SIMPL-653 @SIMPL-601 @SIMPL-602 @SIMPL-604 Scenario Outline: Filter onboarding requests: <caseName> @@ -163,25 +163,25 @@ Feature: Authority | Email with Approved Status | dataparticipant_request_accepted@automation.com | Approved | | Email with Rejected Status | dataparticipant_request_rejected@automation.com | Rejected | - @TCA12 @SIMPL-1128 @SIMPL-1080 - # TODO: Check download credentials. - Scenario: Download credentials from approved user - Given the applicant with pdf submitted is in the onboarding status page - When the accepted applicant logs in with valid credentials - And the applicant dataspace participant user can open the request status details dialog pressing See request details button - Then the applicant dataspace participant clicks on the "Download your Credentials" button - - @TCA13 @SIMPL-1130 @SIMPL-615 @SIMPL-1036 - Scenario Outline: If incomplete or rejected onboarding request, the user does not see Download Your Credentials button - Given the applicant with pdf submitted is in the onboarding status page - And the <applicantStatus> applicant logs in with valid credentials - When the applicant dataspace participant user can open the request status details dialog pressing See request details button - Then the Download Your Credentials button is not visible - - Examples: - | applicantStatus | - | | - | rejected | +# @TCA12 @SIMPL-1128 @SIMPL-1080 +# # TODO: Check download credentials. +# Scenario: Download credentials from approved user +# Given the applicant with pdf submitted is in the onboarding status page +# When the accepted applicant logs in with valid credentials +# And the applicant dataspace participant user can open the request status details dialog pressing See request details button +# Then the applicant dataspace participant clicks on the "Download your Credentials" button +# +# @TCA13 @SIMPL-1130 @SIMPL-615 @SIMPL-1036 +# Scenario Outline: If incomplete or rejected onboarding request, the user does not see Download Your Credentials button +# Given the applicant with pdf submitted is in the onboarding status page +# And the <applicantStatus> applicant logs in with valid credentials +# When the applicant dataspace participant user can open the request status details dialog pressing See request details button +# Then the Download Your Credentials button is not visible +# +# Examples: +# | applicantStatus | +# | | +# | rejected | @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. @@ -193,9 +193,7 @@ Feature: Authority # NOTE: End of extra steps. And the user navigates to the "Dashboard Requests List" page And the user logs in with a user with "NOTARY" role -# NOTE: Status filtering step is "On Pause" while it gets fixed - #And the user filters by "status" with value "In progress" -# NOTE: The following step should be changed/deleted once the "In_Review" filter is fixed. + And the user filters by "status" with value "In review" And the user filters by email already created user And the user sorts by "<sortDirection>" "<columnToSort>" And the user clicks on the first result from "Request List" @@ -205,7 +203,7 @@ Feature: Authority Examples: | caseName | button | actionValue | sortDirection | columnToSort | Participant type | | Consumer user confirms and process Approval action | Approve | Confirm Approval | descending | Request Date | Consumer | - | Consumer user confirms and process Reject action | Reject | Reject Request | descending | Request Date | Consumer | + | Consumer user confirms and process Reject action | Reject | Reject Request | descending | Request Date | Consumer | | Application Provider user confirms and process Approval action | Approve | Confirm Approval | descending | Request Date | Application Provider | | Application Provider user confirms and process Reject action | Reject | Reject Request | descending | Request Date | Application Provider | | Data Provider user confirms and process Approval action | Approve | Confirm Approval | descending | Request Date | Data Provider | @@ -325,7 +323,7 @@ Feature: Authority Given the user navigates to the "Dashboard Requests List" page And the user logs in with a user with "NOTARY" role When the user sorts by "<sortDirection>" "<columnToSort>" - Then the onboarding request list is sorted successfully by "<columnToSort>" + Then the list is sorted successfully by "<columnToSort>" Examples: | sortDirection | columnToSort | | ascending | Last change date | @@ -380,12 +378,12 @@ Feature: Authority | The user selects 25 elements by page | 25 | | The user selects 100 elements by page | 100 | - @TCA25 @SIMPL-755 - # TODO: T2IAA_M role doesn't have access to Dashboard Requests List. Check if there's a change/bug. - Scenario: Accessing Admin Dashboard via Keycloak with role T2IAA_M - Given the user navigates to the "Dashboard Requests List" page - When the user logs in with a user with "T2IAA_M" role - Then the onboarding requests list is displayed +# @TCA25 @SIMPL-755 +# # TODO: T2IAA_M role doesn't have access to Dashboard Requests List. Check if there's a change/bug. +# Scenario: Accessing Admin Dashboard via Keycloak with role T2IAA_M +# Given the user navigates to the "Dashboard Requests List" page +# When the user logs in with a user with "T2IAA_M" role +# Then the onboarding requests list is displayed @TCA26 @SIMPL-650 @SIMPL-521 Scenario Outline: Denied Access To Admin Dashboard of Public Dataspace Onboarding Site : <caseName> @@ -435,12 +433,12 @@ Feature: Authority | Assignable to Role | | In use | - @TCA29 @SIMPL-3106, @SIMPL-3107, @SIMPL-3108, @SIMPL-3109 + @TCA29 @SIMPL-3106 @SIMPL-3107 @SIMPL-3108 @SIMPL-3109 Scenario Outline: User sorts Participant List requests by <columnToSort> in <sortDirection> order Given the user navigates to the "Participant Management" page And the user logs in with a user with "IATTR_M" role When the user sorts by "<sortDirection>" "<columnToSort>" - Then the Participant List requests is sorted successfully by "<columnToSort>" + Then the list is sorted successfully by "<columnToSort>" Examples: | sortDirection | columnToSort | diff --git a/src/test/java/features/ui/simplOpen/Participant.feature b/src/test/java/features/ui/simplOpen/Participant.feature index e412676458110adb6d3684e1c1b87faf22944bbc..64e3684d1039475c46ba4882aefc7b14a4e7ac90 100644 --- a/src/test/java/features/ui/simplOpen/Participant.feature +++ b/src/test/java/features/ui/simplOpen/Participant.feature @@ -21,15 +21,15 @@ Feature: Participant And the mTLS status is "SECURED" Examples: - | caseName | participantUtility | keycloak | role | buttonVisibility | username | emailAddress | commonName | organisation | participantType | assignedIdentityAttributes | - | Consumer - User with role: ONBOARDER_M | Consumer Participant Utility | Consumer | CONSUMER_ONBOARDER_M | sees | consumer_role_onboarder_m_auto | consumer_role_onboarder_m_auto@test.com | ONBOARDED_CONSUMER_ID | PSO | CONSUMER | CONSUMER | - | Consumer - User with role: CATALOG_R | Consumer Participant Utility | Consumer | CONSUMER_CATALOG_R | does not see | consumer_role_catalog_r_auto | consumer_role_catalog_r_auto@test.com | | | | | - | Consumer - User with role: T1UAR_M | Consumer Participant Utility | Consumer | CONSUMER_T1UAR_M | does not see | consumer_role_t1uar_m_auto | consumer_role_t1uar_m_auto@test.com | | | | | - | Consumer - User with no roles assigned | Consumer Participant Utility | Consumer | NO ROLE | does not see | no_roles_user_auto | no_roles_user_auto@test.com | | | | | - | Data Provider - User with role: ONBOARDER_M | Data Provider Participant Utility | Data Provider | DATA_PROVIDER_ONBOARDER_M | sees | dataprovider_role_onboarder_m_auto | dataprovider_role_onboarder_m_auto@test.com | ONBOARDED_DATA_PROVIDER_ID | PSO | DATA PROVIDER | DATA_PROVIDER | - | Data Provider - User with role: CATALOG_R | Data Provider Participant Utility | Data Provider | DATA_PROVIDER_CATALOG_R | does not see | dataprovider_role_catalog_r_auto | dataprovider_role_catalog_r_auto@test.com | | | | | - | Data Provider - User with role: T1UAR_M | Data Provider Participant Utility | Data Provider | DATA_PROVIDER_T1UAR_M | does not see | dataprovider_role_t1uar_m_auto | dataprovider_role_t1uar_m_auto@test.com | | | | | - | Data Provider - User with no roles assigned | Data Provider Participant Utility | Data Provider | NO ROLE | does not see | no_roles_user_auto | no_roles@test.com | | | | | + | caseName | participantUtility | keycloak | role | buttonVisibility | username | emailAddress | commonName | organisation | participantType | assignedIdentityAttributes | + | Consumer - User with role: ONBOARDER_M | Consumer Participant Utility | Consumer | CONSUMER_ONBOARDER_M | sees | consumer_role_onboarder_m_auto | consumer_role_onboarder_m_auto@pso.com | ONBOARDED_CONSUMER_ID | PSO | CONSUMER | CONSUMER | + | Consumer - User with role: CATALOG_R | Consumer Participant Utility | Consumer | CONSUMER_CATALOG_R | does not see | consumer_role_catalog_r_auto | consumer_role_catalog_r_auto@pso.com | | | | | + | Consumer - User with role: T1UAR_M | Consumer Participant Utility | Consumer | CONSUMER_T1UAR_M | does not see | consumer_role_t1uar_m_auto | consumer_role_t1uar_m_auto@pso.com | | | | | + | Consumer - User with no roles assigned | Consumer Participant Utility | Consumer | NO ROLE | does not see | no_roles_user_auto | no_roles_user_auto@pso.com | | | | | + | Data Provider - User with role: ONBOARDER_M | Data Provider Participant Utility | Data Provider | DATA_PROVIDER_ONBOARDER_M | sees | dataprovider_role_onboarder_m_auto | dataprovider_role_onboarder_m_auto@pso.com | ONBOARDED_DATA_PROVIDER_ID | PSO | DATA PROVIDER | DATA_PROVIDER | + | Data Provider - User with role: CATALOG_R | Data Provider Participant Utility | Data Provider | DATA_PROVIDER_CATALOG_R | does not see | dataprovider_role_catalog_r_auto | dataprovider_role_catalog_r_auto@pso.com | | | | | + | Data Provider - User with role: T1UAR_M | Data Provider Participant Utility | Data Provider | DATA_PROVIDER_T1UAR_M | does not see | dataprovider_role_t1uar_m_auto | dataprovider_role_t1uar_m_auto@pso.com | | | | | + | Data Provider - User with no roles assigned | Data Provider Participant Utility | Data Provider | NO ROLE | does not see | no_roles_user_auto | no_roles_user_auto@pso.com | | | | | @TCP02 @SIMPL-1100 Scenario Outline: Unauthorized user navigates to the Participant Utility Page: <caseName> diff --git a/src/test/java/stepDefinitions/ui/simplOpen/AuthoritySteps.java b/src/test/java/stepDefinitions/ui/simplOpen/AuthoritySteps.java index cac8b254d91a434c89c45d1b2cd59f6649dfd420..2d38bfbe04c60e2a2ec3cd2daeb227506eb98638 100644 --- a/src/test/java/stepDefinitions/ui/simplOpen/AuthoritySteps.java +++ b/src/test/java/stepDefinitions/ui/simplOpen/AuthoritySteps.java @@ -70,7 +70,7 @@ public class AuthoritySteps { the_user_clicks_SubmitApplicationRequestButton(); the_user_clicks_SubmitPDFButton(); theFileIsSuccessfullyUploaded(); - theUserClicksTheButton(); + theUserClicksTheLogoutButton(); } @Given("the user enters the email address") @@ -470,7 +470,7 @@ public class AuthoritySteps { @Then("the list of Identity Attributes for the participant is displayed") public void theListOfIdentityAttributesForTheParticipantIsDisplayed() { - assertElementIsVisibleByLocator(page.locator(PARTICIPANT_DETAILS_ATTRIBUTES_TABLE_LOCATOR)); + assertElementIsVisibleByLocator(page.locator(PARTICIPANT_DETAILS_HEADER_LOCATOR)); List<String> tableHeaders = page.locator(PARTICIPANT_DETAILS_IDENTITY_ATTRIBUTES_HEADER_COLUMNS_LOCATOR).allTextContents(); List<String> expectedHeaders = List.of(PARTICIPANT_DETAILS_IDENTITY_ATTRIBUTES_TABLE_NAME_COLUMN, @@ -623,6 +623,7 @@ public class AuthoritySteps { Locator alert = page.getByRole(AriaRole.ALERT); assertElementIsVisibleByLocator(alert); assertThat(alert).hasText(SUCCESSFUL_IDENTITY_ATTRIBUTE_CREATION_ALERT_MESSAGE); + clickButtonByLocator(CLOSE_ALERT_MESSAGE); } @Then("the user is redirected to the Identity Attributes Details page") @@ -652,6 +653,7 @@ public class AuthoritySteps { Locator updateAlert = page.getByRole(AriaRole.ALERT); assertElementIsVisibleByLocator(updateAlert); assertThat(updateAlert).hasText(SUCCESSFUL_IDENTITY_ATTRIBUTE_EDITION_ALERT_MESSAGE); + clickButtonByLocator(CLOSE_ALERT_MESSAGE); } @Then("the successful message is displayed") @@ -691,7 +693,7 @@ public class AuthoritySteps { Utils.checkInputFieldHasText(page, ORGANISATION_INPUT_LOCATOR, participantType); } - @Then("the Participant List requests is sorted successfully by {string}") + @Then("the list is sorted successfully by {string}") public void verify_the_dates_values_of_the_column_were_sorted(String columnToSort) { authorityPage.verifyTheDatesValuesOfTheColumnWereSorted(columnToSort); } @@ -737,8 +739,9 @@ public class AuthoritySteps { } @Then("the user clicks the Logout button") - public void theUserClicksTheButton() { - Utils.clickButtonByAriaText("Logout"); + public void theUserClicksTheLogoutButton() { + clickButtonByLocator(ACCOUNT_CIRCLE_ICON); + clickButtonByLocator(LOGOUT_BUTTON); } @Then("the list displays a boolean value for each Identity Attribute in the {string} column")