Skip to content

Commit

Permalink
Merge branch 'develop' into feat/PN-11245
Browse files Browse the repository at this point in the history
  • Loading branch information
angelominisci committed Aug 5, 2024
2 parents 0bb2423 + 19dae73 commit e43a16c
Show file tree
Hide file tree
Showing 80 changed files with 1,136 additions and 86 deletions.
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@

<dependencies>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310 -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.17.2</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package it.pn.frontend.e2e.common;

import io.cucumber.java.en.And;
import io.cucumber.java.en.Then;
import it.pn.frontend.e2e.section.mittente.DettaglioNotificaMittenteSection;
import it.pn.frontend.e2e.utility.NotificationBuilder;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.TimeoutException;
Expand All @@ -10,14 +14,19 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DettaglioNotificaSection extends BasePage {
private static final Logger logger = LoggerFactory.getLogger("DettaglioNotificaSection");

@FindBy(xpath = "//button[contains(text(),'Attestazione opponibile a terzi: ')]")
List<WebElement> attestazioniFile;

@FindBy(xpath = "//td[contains(@class,'MuiTableCell-root MuiTableCell-body MuiTableCell-paddingNone MuiTableCell-sizeMedium css-11dv4ll')]")
List<WebElement> infoNotifiche;

@FindBy(xpath = "//button/div[contains(text(),'NOTIFICATION')]")
List<WebElement> documentiAllegati;

Expand Down Expand Up @@ -155,4 +164,23 @@ public void checkMessaggioScadenzaDownload() {
By checkAvvisoDownloadScaduto = By.xpath("//div[contains(text(), 'Il documento sarà scaricabile tra pochi minuti')]");
getWebDriverWait(10).withMessage("Il pulsante sezione attestazione opponibile non è visibile").until(ExpectedConditions.visibilityOfElementLocated(checkAvvisoDownloadScaduto));
}

public Map<String, String> recuperoInfoNotificheDestinatario() {
Map<String, String> infoNotifica = new HashMap<>();
String mittente = getInfoNotifica(0);
infoNotifica.put("mittente", mittente);
String destinatario = getInfoNotifica(1);
infoNotifica.put("destinatario", destinatario);
String data = getInfoNotifica(2);
infoNotifica.put("data", data);
String codiceIUN = getInfoNotifica(3);
infoNotifica.put("codiceIUN", codiceIUN);
infoNotifica.put("codiceAvviso", "nd");

return infoNotifica;
}

public String getInfoNotifica(int i) {
return infoNotifiche.get(i).getText();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public class NotificheDestinatarioPage extends BasePage{

@FindBy(id = "iunMatch")
WebElement codiceIunTextField;
@FindBy(xpath = "//button[contains(text(),'Ricevuta di consegna PEC')]")
WebElement ricevutaDiConsegnaButton;

@FindBy(xpath = "//button[contains(text(), 'Ricevuta di consegna')]")
WebElement ricevutaDiConsegnaButton;

@FindBy(xpath = "//button[contains(text(), 'Ricevuta di consegna')]")
WebElement ricevutaDiConsegnaButton;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/it/pn/frontend/e2e/listeners/Hooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import io.cucumber.java.Scenario;
import io.cucumber.java.it.Ma;
import io.github.bonigarcia.wdm.WebDriverManager;
import it.pn.frontend.e2e.model.DigitalAddressResponse;
import it.pn.frontend.e2e.model.singleton.MandateSingleton;
import it.pn.frontend.e2e.model.address.DigitalAddressResponse;
import it.pn.frontend.e2e.rest.RestContact;
import it.pn.frontend.e2e.rest.RestDelegation;
import it.pn.frontend.e2e.utility.CookieConfig;
Expand All @@ -25,7 +25,6 @@
import org.openqa.selenium.devtools.v126.network.model.Headers;
import org.openqa.selenium.devtools.v126.network.model.RequestWillBeSent;
import org.openqa.selenium.devtools.v126.network.model.ResourceType;
import org.openqa.selenium.devtools.v126.network.Network;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.address;

import it.pn.frontend.e2e.model.enums.DigitalDomicileTypeEnum;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.address;

import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.address;

import it.pn.frontend.e2e.model.enums.DigitalDomicileTypeEnum;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.address;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;


import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;

import lombok.Data;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.documents;

import lombok.Data;

Expand Down
25 changes: 25 additions & 0 deletions src/main/java/it/pn/frontend/e2e/model/enums/DocumentType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package it.pn.frontend.e2e.model.enums;

public enum DocumentType {
ATTO_NOTIFICATO("ATTO_NOTIFICATO"),
ATTESTAZIONE_OPPONIBILE_A_TERZI("ATTESTAZIONE_OPPONIBILE_A_TERZI");

private final String value;

DocumentType(String value) {
this.value = value;
}

public String getValue() {
return value;
}

public static DocumentType fromValue(String value) {
for (DocumentType code : DocumentType.values()) {
if (code.value.equalsIgnoreCase(value)) {
return code;
}
}
throw new IllegalArgumentException("Valore non valido per DocumentType: " + value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package it.pn.frontend.e2e.model.enums;

public enum RaddAltResponseCode {

ZERO(0),
TWO(2),
THREE(3),
FOUR(4),
TEN(10),
EIGHTY(80),
NINETY_NINE(99);

private final int value;

RaddAltResponseCode(int value) {
this.value = value;
}

public int getValue() {
return value;
}

public static RaddAltResponseCode fromValue(int value) {
for (RaddAltResponseCode code : RaddAltResponseCode.values()) {
if (code.value == value) {
return code;
}
}
throw new IllegalArgumentException("Valore non valido per Code: " + value);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.incidents;

import it.pn.frontend.e2e.model.enums.FunctionalityEnum;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.incidents;

import it.pn.frontend.e2e.model.enums.FunctionalityEnum;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.incidents;

import it.pn.frontend.e2e.model.enums.FunctionalityEnum;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import com.fasterxml.jackson.annotation.JsonInclude;
import it.pn.frontend.e2e.model.documents.Document;
import it.pn.frontend.e2e.model.enums.NotificationFeePolicyEnum;
import it.pn.frontend.e2e.model.enums.PhysicalCommunicationTypeEnum;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import lombok.Data;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import com.fasterxml.jackson.annotation.JsonInclude;
import it.pn.frontend.e2e.model.documents.Digests;
import lombok.Data;

@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import it.pn.frontend.e2e.model.documents.Digests;
import lombok.Data;

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import it.pn.frontend.e2e.model.documents.Digests;
import lombok.Data;

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import com.fasterxml.jackson.annotation.JsonInclude;
import it.pn.frontend.e2e.model.payments.F24Payment;
import it.pn.frontend.e2e.model.payments.PagoPaPayment;
import it.pn.frontend.e2e.utility.WebTool;
import lombok.Data;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.notification;

import com.fasterxml.jackson.annotation.JsonInclude;
import it.pn.frontend.e2e.model.address.PhysicalAddress;
import it.pn.frontend.e2e.model.address.DigitalDomicile;
import it.pn.frontend.e2e.model.enums.RecipientTypeEnum;
import lombok.Data;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.payments;

import it.pn.frontend.e2e.model.documents.MetadataAttachment;
import lombok.Getter;
import lombok.Setter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.payments;

import it.pn.frontend.e2e.model.notification.NotificationMetadataAttachment;
import lombok.Data;

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.payments;

import it.pn.frontend.e2e.model.documents.Attachment;
import lombok.Getter;
import lombok.Setter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.payments;

import it.pn.frontend.e2e.model.notification.NotificationPaymentAttachment;
import lombok.Data;

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.pn.frontend.e2e.model;
package it.pn.frontend.e2e.model.payments;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package it.pn.frontend.e2e.model.radd.ActInquiry;

import it.pn.frontend.e2e.model.enums.RecipientTypeEnum;
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

@Data
@RequiredArgsConstructor
public class ActInquiryRequest {
@NonNull
private String uid;
@NonNull
//Codice Fiscale Destinatario
private String recipientTaxId;
@NonNull
private RecipientTypeEnum recipientType;

private String iun;

public ActInquiryRequest(@NonNull String uid, @NonNull String recipientTaxId, @NonNull RecipientTypeEnum recipientType, String iun) {
this.uid = uid;
this.recipientTaxId = recipientTaxId;
this.recipientType = recipientType;
this.iun = iun;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package it.pn.frontend.e2e.model.radd.ActInquiry;

import lombok.Data;

@Data
public class ActInquiryResponse {
private boolean result;
private ActInquiryResponseStatus actInquiryResponseStatus;

public ActInquiryResponse(boolean result, ActInquiryResponseStatus actInquiryResponseStatus){
this.result = result;
this.actInquiryResponseStatus = actInquiryResponseStatus;
}
}
Loading

0 comments on commit e43a16c

Please sign in to comment.