Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyllarr committed Apr 12, 2024
1 parent a0c9828 commit d9de198
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.util.List;
import java.util.Map;

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.apache.http.HttpStatus;
import org.junit.AfterClass;
import org.junit.BeforeClass;
Expand Down Expand Up @@ -464,9 +465,9 @@ private void accessAppWithoutToken(String endpoint, InputStream oidcConfigInputS
try {
// browser login should succeed
client.setDispatcher(createAppResponse(mechanism, HttpStatus.SC_MOVED_TEMPORARILY, getClientUrl(), CLIENT_PAGE_TEXT));
TextPage page = loginToKeycloak(KeycloakConfiguration.ALICE, KeycloakConfiguration.ALICE_PASSWORD, requestUri, response.getLocation(),
HtmlPage page = loginToKeycloak(KeycloakConfiguration.ALICE, KeycloakConfiguration.ALICE_PASSWORD, requestUri, response.getLocation(),
response.getCookies()).click();
assertTrue(page.getContent().contains(CLIENT_PAGE_TEXT));
assertTrue(page.asText().contains(CLIENT_PAGE_TEXT));
} finally {
client.setDispatcher(new QueueDispatcher());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.junit.Test;
import org.wildfly.security.http.HttpServerAuthenticationMechanism;

import com.gargoylesoftware.htmlunit.TextPage;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

import io.restassured.RestAssured;
Expand Down Expand Up @@ -156,9 +155,9 @@ private void performAuthentication(InputStream oidcConfig, String username, Stri

if (loginToKeycloak) {
client.setDispatcher(createAppResponse(mechanism, expectedDispatcherStatusCode, expectedLocation, clientPageText));
TextPage page = loginToKeycloak(username, password, requestUri, response.getLocation(),
HtmlPage page = loginToKeycloak(username, password, requestUri, response.getLocation(),
response.getCookies()).click();
assertTrue(page.getContent().contains(clientPageText));
assertTrue(page.asText().contains(clientPageText));
}
} finally {
client.setDispatcher(new QueueDispatcher());
Expand Down

0 comments on commit d9de198

Please sign in to comment.