Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop' into feat/PN-10397
Browse files Browse the repository at this point in the history
  • Loading branch information
leleOFA committed Jul 18, 2024
2 parents 75aaee8 + 9d16710 commit 96096cf
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 13 deletions.
11 changes: 7 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.18.1</version>
<version>4.22.0</version>
</dependency>



<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-devtools-v85 -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-devtools-v120 -->
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-devtools-v126 -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-devtools-v120</artifactId>
<version>4.16.0</version>
<artifactId>selenium-devtools-v126</artifactId>
<version>4.22.0</version>
</dependency>


<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
Expand All @@ -66,7 +69,7 @@
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.5.3</version>
<version>5.9.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/it/pn/frontend/e2e/listeners/Hooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.DevToolsException;
import org.openqa.selenium.devtools.HasDevTools;
import org.openqa.selenium.devtools.v120.network.Network;
import org.openqa.selenium.devtools.v120.network.model.Headers;
import org.openqa.selenium.devtools.v120.network.model.RequestWillBeSent;
import org.openqa.selenium.devtools.v120.network.model.ResourceType;
import org.openqa.selenium.devtools.v126.network.Network;
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 Expand Up @@ -88,7 +89,7 @@ protected void chrome() {

chromeOptions.setExperimentalOption("prefs", chromePrefs);
if (this.headless != null && this.headless.equalsIgnoreCase("true")) {
chromeOptions.addArguments("no-sandbox");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("headless");
chromeOptions.addArguments("window-size=1920,1080");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class HeaderPASection extends BasePage {

private static final Logger logger = LoggerFactory.getLogger("HeaderPASection");

@FindBy(css = "button[title='Esci']")
@FindBy(xpath = "//button[contains(text(),'Esci')]")
WebElement esciButton;

public HeaderPASection(WebDriver driver) {
Expand All @@ -35,9 +35,9 @@ public void waitLoadHeaderSection() {

public void selezionaEsciButton() {
try {
getWebDriverWait(60).until(ExpectedConditions.elementToBeClickable(this.esciButton));
this.js().executeScript("arguments[0].scrollIntoView(true);", this.esciButton);
this.esciButton.click();
getWebDriverWait(10).until(ExpectedConditions.elementToBeClickable(esciButton));
//this.js().executeScript("arguments[0].scrollIntoView(true);", this.esciButton);
esciButton.click();
} catch (TimeoutException e) {
logger.error("Il bottone esci non cliccabile con errore: " + e.getMessage());
Assert.fail("Il bottone esci non cliccabile con errore: " + e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,11 @@ public void siSelezionaLaNotifica() {
backgroundTest.siFiltraLaTabellaDelleNotifichePerIUNDestinatario(iun);
}

@And("Si attende completamento notifica {string}")
public void siAttendeCompletamentoNotificaV2(String statoNotifica) {
piattaformaNotifichePage.pollingSuStatoNotificaPerCompletamento(statoNotifica);
}

@And("Si seleziona la notifica mittente")
public void siSelezionaLaNotificaMittente() {
BackgroundTest backgroundTest = new BackgroundTest();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Feature: Mittente genera una notifica che non prevede pagamento

@parallel
@TA_InviaNotificaConDestinatarioReperibileAlPrimoInvio
Scenario: [TA-FE MITTENTE CREA NOTIFICA CON PAGAMENTO] - Mittente invia una notifica a destinatario disponibile al primo invio
Given PA - Si effettua la login tramite token exchange, e viene visualizzata la dashboard
When Si inizializzano i dati per la notifica
| modello | 890 |
| documenti | 1 |
| oggettoNotifica | Pagamento rata IMU |
| costiNotifica | true |
And Si aggiunge un destinatario alla notifica
| at | Presso |
| indirizzo | VIA ROMA 20 |
| dettagliIndirizzo | Scala b |
| codicePostale | 20147 |
| comune | Milano |
| dettagliComune | Milano |
| provincia | MI |
| stato | Italia |
| nomeCognome | Gaio Giulio |
| codiceFiscale | CSRGGL44L13H501E |
| tipoDestinatario | PF |
| domicilioDigitale | test@test.com |
| avvisoPagoPa | 1 |
| F24 | 1 |
Then Creo in background una notifica per destinatario tramite API REST
And Si seleziona la notifica mittente
And Aspetta 60 secondi
And Si attende completamento notifica "Consegnata"
And Logout da portale mittente

0 comments on commit 96096cf

Please sign in to comment.