Skip to content

Commit

Permalink
Removing JUnit dependency that probably causes this bug due to a test…
Browse files Browse the repository at this point in the history
…ng dependency
  • Loading branch information
augustocristian committed Mar 12, 2024
1 parent 19f111d commit 1656d62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

<junit-jupiter-params.version>5.10.2</junit-jupiter-params.version>

<junit.version>4.13.2</junit.version>

<webdrivermanager.version>5.6.3</webdrivermanager.version>

<retorch.version>1.1.0</retorch.version>
Expand Down Expand Up @@ -116,12 +114,6 @@
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>selenium-jupiter</artifactId>
Expand Down
11 changes: 3 additions & 8 deletions src/test/java/com/fullteaching/e2e/no_elastest/utils/Wait.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.fullteaching.e2e.no_elastest.utils;

import org.junit.Assert;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
Expand All @@ -26,15 +25,11 @@ public static void footer(WebDriver wd) {
}

public static void waitForPageLoaded(WebDriver driver) { //13 lines
//DO NOT TOUCH THAT!! It's critical for some waiting
ExpectedCondition<Boolean> expectation = driver1 -> ((JavascriptExecutor) driver1).executeScript("return document.readyState").toString().equals("complete");
try {

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30));
wait.until(expectation);
} catch (Throwable error) {
Assert.fail("Timeout waiting for Page Load Request to complete.");
}
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30));

wait.until(expectation);
}

}

0 comments on commit 1656d62

Please sign in to comment.