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

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

Merge branch 'SOUI-Create_InProgress_Users' into 'develop'

SOUI-SIMPL-740_Create_InProgress_Users

See merge request simpl/pso/pso-test/pso-test-automation!99
parents c393c8ce 131aca07
No related branches found
No related tags found
No related merge requests found
......@@ -5,9 +5,11 @@ import framework.common.Config;
public class Authority {
public static final String URL_AUTHORITY = Config.get("URL_AUTHORITY");
public static final String URL_KEYCLOAK_AUTHORITY = Config.get("URL_KEYCLOAK_AUTHORITY");
public static final String PDF_FILE_PATH = "simplOpen/dummy_pdf.pdf";
public static final String HOST_ADMINISTRATION = "administration";
public static final String HOST_APPLICATION = "application/info";
public static final String HOST_APPLICATION_ONBOARDING_STATUS = "application/onboarding-status";
public static final String HOST_ADDITIONAL_REQUEST = "application/additional-request";
public static final String HOST_IDENTITY_ATTRIBUTE_CREATION = "identity-attributes/_new";
public static final String ORGANIZATION_INPUT_VALUE = "pso";
public static final String SURNAME_INPUT_VALUE = "test";
......
......@@ -53,11 +53,13 @@ public class Authority {
"cdk-cell cdk-column-email mat-column-email";
public static final String PARTICIPANT_TYPE_COLUMN__FORM_REQUEST_LIST_TABLE_LOCATOR = "td.mat-mdc-cell.mdc-data-table__cell." +
"cdk-cell.cdk-column-participantType.mat-column-participantType";
public static final String REQUEST_DATE_HEADER__FORM_REQUEST_LIST_LOCATOR = "//div[contains(text(), ' Request date ' )]";
public static final String APPROVE_REQUEST_BUTTON_LOCATOR = ".col-lg-2.mx-2.mb-1.btn.btn-primary";
public static final String REJECT_REQUEST_BUTTON_LOCATOR = ".col-lg-2.mx-2.mb-1.btn.btn-secondary";
public static final String CONFIRM_DETAILS_DIALOG = ".mdc-dialog__container";
public static final String TITLE_DIALOG_LOCATOR = "//h2[contains(@id,'mat-mdc-dialog-title')]";
public static final String MESSAGE_WITHIN_DIALOGUE_LOCATOR = "p[class='ng-star-inserted']";
public static final String CHOOSE_FILE_BUTTON = "input[type='file']";
public static final String IDENTITY_ATTRIBUTE_CREATION_NAME = "input[name='name']";
public static final String IDENTITY_ATTRIBUTE_CREATION_CODE = "input[name='code']";
public static final String IDENTITY_ATTRIBUTE_CREATION_ASSIGNABLE = "input[name='assignable']";
......
File added
......@@ -27,7 +27,23 @@ Feature: Authority
| Data Provider |
| Infrastructure Provider |
@TCA02 @SIMPL-751
@TCA02 @SIMPL-740
Scenario Outline: PSO | Verify after logging in Public Dataspace Onboarding Site, user uploads a document in .pdf format
Given the applicant request user already created the request as "<Participant type>"
And the user navigates to the "Additional Request" page
And the user is redirected to the "Governance Authority" keycloak
And the user logs in keycloak with a recently created user
And the user selects a .pdf file
Then the user clicks on the Submit Application Request button
Examples:
| Participant type |
| Consumer |
| Application Provider |
| Data Provider |
| Infrastructure Provider |
@TCA03 @SIMPL-751
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
......@@ -36,7 +52,7 @@ Feature: Authority
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
@TCA03 @SIMPL-752
@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
......@@ -45,7 +61,7 @@ Feature: Authority
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
@TCA04 @SIMPL-746 @SIMPL-1132
@TCA05 @SIMPL-746 @SIMPL-1132
Scenario Outline: Access Denied With Invalid Authentication: <page>
Given the user navigates to the "<page>" page
When the user tries to log in with invalid login credentials
......@@ -56,7 +72,7 @@ Feature: Authority
| Participant Management |
| Dashboard Requests List |
@TCA05 @SIMPL-3049 @SIMPL-4125 @SIMPL-744 @SIMPL-631 @bug:SIMPL-7932 @bug:SIMPL-7791
@TCA06 @SIMPL-3049 @SIMPL-4125 @SIMPL-744 @SIMPL-631 @bug:SIMPL-7932 @bug:SIMPL-7791
Scenario: Display of Participant Details in the Governance Authority's Data Space
Given the user navigates to the "Participant Management" page
And the user is redirected to the "Governance Authority" keycloak
......@@ -73,7 +89,7 @@ Feature: Authority
| Onboarding Date | USER_ONBOARDING_DATE |
| Participant Credentials Expiration Date | Fri Nov 20 2026 |
@TCA06 @SIMPL-4128 @SIMPL-4129 @SIMPL-4134 @SIMPL-4135
@TCA07 @SIMPL-4128 @SIMPL-4129 @SIMPL-4134 @SIMPL-4135
Scenario Outline: Filtering of a Participant's Identity Attributes in the Governance Authority's Data Space: <caseName>
Given the user navigates to the "Participant Management" page
And the user is redirected to the "Governance Authority" keycloak
......@@ -92,7 +108,7 @@ Feature: Authority
| 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 | 22/11/2024 - 22/11/2024 |
@TCA07 @SIMPL-652 @SIMPL-651
@TCA08 @SIMPL-652 @SIMPL-651
Scenario Outline: Filter onboarding requests: <caseName>
Given the user navigates to the "Dashboard Requests List" page
And the user logs in with a user with "NOTARY" role
......@@ -104,18 +120,19 @@ Feature: Authority
| caseName | filter | value |
| Filtering by Status in Progress | status | In progress |
@TCA08 @SIMPL-1128
@TCA09 @SIMPL-1128
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
@TCA09 @SIMPL-617 @SIMPL-612 @SIMPL-608 @SIMPL-609
@TCA10 @SIMPL-617 @SIMPL-612 @SIMPL-608 @SIMPL-609
Scenario Outline: Confirm filtering by Status in Progress and <button> the request
Given the user navigates to the "Dashboard Requests List" page
And the user logs in with a user with "NOTARY" role
When the user filters by "status" with value "In progress"
And the user sorts by descending Request Date
And the user clicks on the first result from "Request List"
When the dataspace governance user clicks on the "<button>" button
Then the system prompts the user to confirm the "<actionValue>" action
......@@ -125,7 +142,7 @@ Feature: Authority
| Approve | approval |
| Reject | rejection |
@TCA10 @SIMPL-2868 @SIMPL-3102
@TCA11 @SIMPL-2868
Scenario Outline: Verify Navigation to Participant Type Detail Page and Display of Correct Title and Identity Attributes
Given the user navigates to the "Participant Management" page
And the user logs in with a user with "IATTR_M" role
......@@ -142,14 +159,14 @@ Feature: Authority
| Data Provider |
| Infrastructure Provider |
@TCA11 @SIMPL-1130
@TCA12 @SIMPL-1130
Scenario: Incomplete 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 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
@TCA12 @SIMPL-3466
@TCA13 @SIMPL-3466
Scenario Outline: Create Identity Attribute
Given the user navigates to the "Identity Attributes Creation" page
And the user logs in with a user with "IATTR_M" role
......
......@@ -13,6 +13,10 @@ import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
......@@ -62,6 +66,23 @@ public class AuthoritySteps {
page.locator(ONBOARDING_INFO_REGISTER_BUTTON).click();
}
@Given("the applicant request user already created the request as {string}")
public void the_user_fills_the_request_form(String participantType) {
// NOTE: Once API is done, this should be changed to that instead of working with the UI
commonSteps.theUserNavigatesToThePage("Welcome to Dataspace Info");
the_user_clicks_the_register_for_this_dataspace_button();
the_user_enters_the_email_address();
theUserInsertsTheOrganization();
the_user_selects_a_participant_type(participantType);
theUserInsertsTheSurname();
theUserInsertsTheName();
theUserInsertsTheUsername();
theUserInsertsThePassword();
theUserInsertsHeConfirmPassword();
the_user_clicks_the_create_credential_button();
the_successful_message_is_displayed();
}
@Given("the user enters the email address")
public void the_user_enters_the_email_address() {
String randomNumber = UUID.randomUUID().toString().replace("-", "").substring(0, 5);
......@@ -124,6 +145,37 @@ public class AuthoritySteps {
page.locator(USERNAME_INPUT_LOCATOR).fill(NEW_USER);
}
@When("the user logs in keycloak with a recently created user")
public void theUserLogsInWithCreatedUser() {
Utils.LogInDetails logInDetails = new Utils.LogInDetails();
logInDetails.setUsername(NEW_USER);
logInDetails.setPassword(ONBOARDING_DATAPARTICIPANT_PASSWORD);
commonSteps.keycloakLogin(logInDetails);
Locator submitAppButton = page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Submit application request"));
assertElementIsVisibleByLocator(submitAppButton);
}
@When("the user selects a .pdf file")
public void theUserSelectsAPDFFile() {
String filePath = PDF_FILE_PATH;
URL resource = getClass().getClassLoader().getResource(filePath);
if (resource == null) {
throw new RuntimeException("File not found: " + filePath);
}
try {
Path fullPath = Paths.get(resource.toURI());
page.setInputFiles(CHOOSE_FILE_BUTTON, fullPath);
} catch (URISyntaxException e) {
throw new RuntimeException("Invalid URI syntax for file: " + filePath, e);
}
}
@Then("the user clicks on the Submit Application Request button")
public void the_user_clicks_SubmitPDFButton() {
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Submit application request")).click();
assertElementIsVisibleByLocator(page.locator(ONBOARDING_REQUESTS_PANEL));
}
@When("the user inserts the password")
public void theUserInsertsThePassword() {
page.locator(PASSWORD_INPUT_LOCATOR).fill(PASSWORD_INPUT_VALUE);
......@@ -217,6 +269,14 @@ public class AuthoritySteps {
page.getByText(PARTICIPANT_PAGE_APPLY_FILTER_BUTTON).click();
}
@When("^the user sorts by (ascending |descending )Request Date$")
public void the_user_sorts_Request_Date(String sortOption) throws InterruptedException {
page.locator(REQUEST_DATE_HEADER__FORM_REQUEST_LIST_LOCATOR).click();
if (sortOption.trim().equals("descending")) {
page.locator(REQUEST_DATE_HEADER__FORM_REQUEST_LIST_LOCATOR).click();
}
}
@When("the dataspace governance user clicks on the {string} button")
public void the_user_clicks_on_reject_or_approve_btn(String buttonValue) {
if (buttonValue.equals("Approve")) {
......
......@@ -83,12 +83,14 @@ public class CommonSteps {
page.navigate(URL_AUTHORITY.concat(HOST_APPLICATION));
break;
case "Participant Management":
page.navigate(URL_AUTHORITY.concat(HOST_ADMINISTRATION)
.concat("/").concat(HOST_MANAGEMENT_PARTICIPANT));
page.navigate(URL_AUTHORITY.concat(HOST_ADMINISTRATION).concat("/").concat(HOST_MANAGEMENT_PARTICIPANT));
break;
case "Onboarding Status":
page.navigate(URL_AUTHORITY.concat(HOST_APPLICATION_ONBOARDING_STATUS));
break;
case "Additional Request":
page.navigate(URL_AUTHORITY.concat(HOST_ADDITIONAL_REQUEST));
break;
case "Dashboard Requests List":
page.navigate(URL_AUTHORITY.concat(HOST_ADMINISTRATION));
break;
......
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