Skip to content

Commit

Permalink
synchronize test code with joinfaces-maven-jar-example
Browse files Browse the repository at this point in the history
  • Loading branch information
persapiens committed Dec 19, 2023
1 parent 303fc70 commit 63a29fa
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
3 changes: 2 additions & 1 deletion src/test/java/org/joinfaces/example/SecurityConfigIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.BeanCreationException;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;

@SuppressFBWarnings("THROWS_METHOD_THROWS_CLAUSE_THROWABLE")
public class SecurityConfigIT {

@Test
public void exceptionOnConfigureNull() {
SecurityConfig securityConfig = new SecurityConfig();
Assertions.assertThrows(BeanCreationException.class, () -> securityConfig.configure(null, null));
Assertions.assertThrows(BeanCreationException.class, () -> securityConfig.configure((HttpSecurity) null, null));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public AbstractPageComponent(WebDriver webDriver) {
this.webDriver = webDriver;
}

protected abstract String getLocation();
public abstract String getLocation();

public void navegateTo() {
this.webDriver.navigate().to(this.preffix + getLocation());
this.webDriver.navigate().to(this.preffix + "/" + getLocation());
}

public <T extends AbstractPageComponent> T initElements(Class<T> classx) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private static WebDriver getHtmlUnitDriver() {
private static WebDriver getChromeDriver() {
WebDriverManager.getInstance(ChromeDriver.class).setup();
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless", "--window-size=1920,1080", "--ignore-certificate-errors", "--remote-allow-origins=*");
chromeOptions.addArguments("--headless", "--window-size=1920,1080", "--ignore-certificate-errors", "--remote-allow-origins=*", "--disable-dev-shm-usage", "--no-sandbox");
return new ChromeDriver(chromeOptions);
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/CustomInputPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public CustomInputPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/customInput.faces";
public String getLocation() {
return "customInput.faces";
}

public void submit(String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ public void submitHello() {
assertThat(customInputPage.getOutputText())
.isEqualTo("You entered: Hello");
}

}
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/FileUploadPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public FileUploadPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/fileUpload.faces";
public String getLocation() {
return "fileUpload.faces";
}

private By getDownloadButtonBy() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/HelloTagPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public HelloTagPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/helloTag.faces";
public String getLocation() {
return "helloTag.faces";
}

private By getHelloWorldDivBy() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/HiCCPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public HiCCPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/hiCC.faces";
public String getLocation() {
return "hiCC.faces";
}

private By getHiCCDivBy() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/LoginPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public LoginPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/login.faces";
public String getLocation() {
return "login.faces";
}

public StarterPage login(String username, String password) {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/MenuOfPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public MenuOfPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/starter.faces";
public String getLocation() {
return "starter.faces";
}

public StarterPage clickStarter() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/joinfaces/example/view/StarterPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public StarterPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/starter.faces";
public String getLocation() {
return "starter.faces";
}

private void click(WebElement webElement, String technology, By tabHeaderBy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public WelcomeConverterPage(WebDriver webDriver) {
}

@Override
protected String getLocation() {
return "/welcomeConverter.faces";
public String getLocation() {
return "welcomeConverter.faces";
}

public void submit(String message) {
Expand Down

0 comments on commit 63a29fa

Please sign in to comment.