Skip to content

Commit

Permalink
Upgrade to HtmlUnit 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed May 2, 2024
1 parent 73b4746 commit 0e1988f
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 57 deletions.
8 changes: 4 additions & 4 deletions spring-boot-project/spring-boot-dependencies/build.gradle
Expand Up @@ -563,8 +563,8 @@ bom {
]
}
}
library("HtmlUnit", "2.70.0") {
group("net.sourceforge.htmlunit") {
library("HtmlUnit", "4.1.0") {
group("org.htmlunit") {
modules = [
"htmlunit" {
exclude group: "commons-logging", module: "commons-logging"
Expand Down Expand Up @@ -1807,10 +1807,10 @@ bom {
releaseNotes("https://github.com/SeleniumHQ/selenium/releases/tag/selenium-{version}")
}
}
library("Selenium HtmlUnit", "4.13.0") {
library("Selenium HtmlUnit", "4.20.0") {
group("org.seleniumhq.selenium") {
modules = [
"htmlunit-driver"
"htmlunit3-driver"
]
}
links {
Expand Down
8 changes: 4 additions & 4 deletions spring-boot-project/spring-boot-docs/build.gradle
Expand Up @@ -77,10 +77,6 @@ dependencies {
implementation("jakarta.persistence:jakarta.persistence-api")
implementation("jakarta.servlet:jakarta.servlet-api")
implementation("jakarta.validation:jakarta.validation-api")
implementation("net.sourceforge.htmlunit:htmlunit") {
exclude group: "commons-logging", module: "commons-logging"
exclude group: "xml-apis", module: "xml-apis"
}
implementation("org.apache.httpcomponents.client5:httpclient5")
implementation("org.apache.commons:commons-dbcp2") {
exclude group: "commons-logging", module: "commons-logging"
Expand All @@ -99,6 +95,10 @@ dependencies {
exclude group: "javax.xml.bind", module: "jaxb-api"
exclude group: "org.jboss.spec.javax.transaction", module: "jboss-transaction-api_1.2_spec"
}
implementation("org.htmlunit:htmlunit") {
exclude group: "commons-logging", module: "commons-logging"
exclude group: "xml-apis", module: "xml-apis"
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jooq:jooq") {
exclude group: "javax.xml.bind", module: "jaxb-api"
Expand Down
Expand Up @@ -16,8 +16,8 @@

package org.springframework.boot.docs.testing.springbootapplications.springmvctests;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.WebClient;
import org.htmlunit.html.HtmlPage;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Expand Up @@ -16,9 +16,9 @@

package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests

import com.gargoylesoftware.htmlunit.WebClient
import com.gargoylesoftware.htmlunit.html.HtmlPage
import org.assertj.core.api.Assertions.assertThat
import org.htmlunit.WebClient
import org.htmlunit.html.HtmlPage
import org.junit.jupiter.api.Test
import org.mockito.BDDMockito.given
import org.springframework.beans.factory.annotation.Autowired
Expand Down
Expand Up @@ -20,12 +20,12 @@ dependencies {
optional("com.google.code.gson:gson")
optional("com.jayway.jsonpath:json-path")
optional("com.sun.xml.messaging.saaj:saaj-impl")
optional("net.sourceforge.htmlunit:htmlunit") {
optional("org.hibernate.orm:hibernate-core")
optional("org.htmlunit:htmlunit") {
exclude group: "commons-logging", module: "commons-logging"
}
optional("org.hibernate.orm:hibernate-core")
optional("org.junit.jupiter:junit-jupiter-api")
optional("org.seleniumhq.selenium:htmlunit-driver") {
optional("org.seleniumhq.selenium:htmlunit3-driver") {
exclude(group: "commons-logging", module: "commons-logging")
exclude(group: "com.sun.activation", module: "jakarta.activation")
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,7 +23,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.gargoylesoftware.htmlunit.WebClient;
import org.htmlunit.WebClient;
import org.openqa.selenium.WebDriver;

import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package org.springframework.boot.test.autoconfigure.web.servlet;

import com.gargoylesoftware.htmlunit.WebClient;
import org.htmlunit.WebClient;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@

import java.util.concurrent.Executors;

import com.gargoylesoftware.htmlunit.BrowserVersion;
import org.htmlunit.BrowserVersion;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,8 @@

package org.springframework.boot.test.autoconfigure.web.servlet.mockmvc;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.WebClient;
import org.htmlunit.html.HtmlPage;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchWindowException;
import org.openqa.selenium.NoSuchSessionException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

Expand Down Expand Up @@ -59,7 +59,7 @@ void shouldBeADifferentWebClient() {
this.webDriver.get("/html");
WebElement element = this.webDriver.findElement(By.tagName("body"));
assertThat(element.getText()).isEqualTo("Hello");
assertThatExceptionOfType(NoSuchWindowException.class).isThrownBy(previousWebDriver::getWindowHandle);
assertThatExceptionOfType(NoSuchSessionException.class).isThrownBy(previousWebDriver::getWindowHandle);
assertThat(previousWebDriver).isNotNull().isNotSameAs(this.webDriver);
}

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package org.springframework.boot.test.autoconfigure.web.servlet.mockmvc;

import com.gargoylesoftware.htmlunit.WebClient;
import org.htmlunit.WebClient;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriver;

Expand Down
8 changes: 4 additions & 4 deletions spring-boot-project/spring-boot-test/build.gradle
Expand Up @@ -23,22 +23,22 @@ dependencies {
optional("org.assertj:assertj-core")
optional("org.hamcrest:hamcrest-core")
optional("org.hamcrest:hamcrest-library")
optional("org.htmlunit:htmlunit") {
exclude(group: "commons-logging", module: "commons-logging")
}
optional("org.jetbrains.kotlin:kotlin-stdlib")
optional("org.jetbrains.kotlin:kotlin-reflect")
optional("org.junit.jupiter:junit-jupiter-api")
optional("org.mockito:mockito-core")
optional("org.skyscreamer:jsonassert")
optional("org.seleniumhq.selenium:htmlunit-driver") {
optional("org.seleniumhq.selenium:htmlunit3-driver") {
exclude(group: "commons-logging", module: "commons-logging")
exclude(group: "com.sun.activation", module: "jakarta.activation")
}
optional("org.seleniumhq.selenium:selenium-api")
optional("org.springframework:spring-web")
optional("org.springframework:spring-webflux")
optional("org.springframework.graphql:spring-graphql-test")
optional("net.sourceforge.htmlunit:htmlunit") {
exclude(group: "commons-logging", module: "commons-logging")
}

testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation("io.mockk:mockk")
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,9 +18,9 @@

import java.io.IOException;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.WebClient;
import org.htmlunit.FailingHttpStatusCodeException;
import org.htmlunit.Page;
import org.htmlunit.WebClient;

import org.springframework.core.env.Environment;
import org.springframework.util.Assert;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@

package org.springframework.boot.test.web.htmlunit.webdriver;

import com.gargoylesoftware.htmlunit.BrowserVersion;
import org.htmlunit.BrowserVersion;
import org.openqa.selenium.Capabilities;

import org.springframework.core.env.Environment;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,10 +19,10 @@
import java.io.IOException;
import java.net.URL;

import com.gargoylesoftware.htmlunit.StringWebResponse;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebConnection;
import com.gargoylesoftware.htmlunit.WebResponse;
import org.htmlunit.StringWebResponse;
import org.htmlunit.WebClient;
import org.htmlunit.WebConnection;
import org.htmlunit.WebResponse;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,13 +18,13 @@

import java.net.URL;

import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.TopLevelWindow;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebClientOptions;
import com.gargoylesoftware.htmlunit.WebConsole;
import com.gargoylesoftware.htmlunit.WebRequest;
import com.gargoylesoftware.htmlunit.WebWindow;
import org.htmlunit.BrowserVersion;
import org.htmlunit.TopLevelWindow;
import org.htmlunit.WebClient;
import org.htmlunit.WebClientOptions;
import org.htmlunit.WebConsole;
import org.htmlunit.WebRequest;
import org.htmlunit.WebWindow;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentMatcher;
Expand Down
Expand Up @@ -12,12 +12,12 @@ dependencies {
runtimeOnly("com.h2database:h2")

testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("net.sourceforge.htmlunit:htmlunit") {
testImplementation("org.htmlunit:htmlunit") {
exclude group: "commons-logging", module: "commons-logging"
}
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("org.seleniumhq.selenium:selenium-api")
testImplementation("org.seleniumhq.selenium:htmlunit-driver") {
testImplementation("org.seleniumhq.selenium:htmlunit3-driver") {
exclude group: "commons-logging", module: "commons-logging"
exclude(group: "com.sun.activation", module: "jakarta.activation")
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,8 @@

package smoketest.test.web;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.WebClient;
import org.htmlunit.html.HtmlPage;
import org.junit.jupiter.api.Test;
import smoketest.test.service.VehicleDetails;

Expand Down

0 comments on commit 0e1988f

Please sign in to comment.