Skip to content

Commit

Permalink
Merge pull request #44843 from quarkusio/dependabot/maven/org.htmluni…
Browse files Browse the repository at this point in the history
…t-htmlunit-4.7.0

Bump org.htmlunit:htmlunit from 4.5.0 to 4.7.0
  • Loading branch information
sberyozkin authored Dec 2, 2024
2 parents c10465e + 4a21abe commit 52aee64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<jandex-gradle-plugin.version>1.0.0</jandex-gradle-plugin.version>

<asciidoctorj.version>2.5.13</asciidoctorj.version>
<htmlunit.version>4.5.0</htmlunit.version>
<htmlunit.version>4.7.0</htmlunit.version>
<javaparser-core.version>3.26.2</javaparser-core.version>
<jdeparser.version>2.0.3.Final</jdeparser.version>
<subethasmtp.version>6.0.1</subethasmtp.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package io.quarkus.it.keycloak;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;

import java.io.IOException;
import java.net.URI;

import org.hamcrest.Matchers;
import org.htmlunit.SilentCssErrorHandler;
import org.htmlunit.TextPage;
import org.htmlunit.WebClient;
Expand Down Expand Up @@ -39,13 +37,13 @@ public void testCodeFlowFormPostAndBackChannelLogout() throws IOException {
form.getInputByName("username").type("alice");
form.getInputByName("password").type("alice");

HtmlPage afterClick = form.getInputByValue("login").click();
TextPage textPage = form.getInputByValue("login").click();

assertThat(afterClick.getWebResponse().getContentAsString(), Matchers.containsString("Submit This Form"));
assertEquals("alice", textPage.getContent());

assertNotNull(getSessionCookie(webClient, "code-flow-form-post"));

TextPage textPage = webClient.getPage("http://localhost:8081/service/code-flow-form-post");
textPage = webClient.getPage("http://localhost:8081/service/code-flow-form-post");
assertEquals("alice", textPage.getContent());

// Session is still active
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
import static org.awaitility.Awaitility.given;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
Expand Down Expand Up @@ -220,13 +219,13 @@ public void testCodeFlowFormPostAndBackChannelLogout() throws IOException {
form.getInputByName("username").type("alice");
form.getInputByName("password").type("alice");

HtmlPage afterClick = form.getInputByValue("login").click();
TextPage textPage = form.getInputByValue("login").click();

assertThat(afterClick.getWebResponse().getContentAsString(), Matchers.containsString("Submit This Form"));
assertEquals("alice", textPage.getContent());

assertNotNull(getSessionCookie(webClient, "code-flow-form-post"));

TextPage textPage = webClient.getPage("http://localhost:8081/code-flow-form-post");
textPage = webClient.getPage("http://localhost:8081/code-flow-form-post");
assertEquals("alice", textPage.getContent());

// Session is still active
Expand Down Expand Up @@ -279,13 +278,13 @@ public void testCodeFlowFormPostAndFrontChannelLogout() throws Exception {
form.getInputByName("username").type("alice");
form.getInputByName("password").type("alice");

HtmlPage afterClick = form.getInputByValue("login").click();
TextPage textPage = form.getInputByValue("login").click();

assertThat(afterClick.getWebResponse().getContentAsString(), Matchers.containsString("Submit This Form"));
assertEquals("alice", textPage.getContent());

assertNotNull(getSessionCookie(webClient, "code-flow-form-post"));

TextPage textPage = webClient.getPage("http://localhost:8081/code-flow-form-post");
textPage = webClient.getPage("http://localhost:8081/code-flow-form-post");
assertEquals("alice", textPage.getContent());

// Session is still active
Expand Down

0 comments on commit 52aee64

Please sign in to comment.