From 2fc461edd5ef5802e5babc7e2c3094c4cbdbde61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:50:35 +0000 Subject: [PATCH 1/4] Bump org.htmlunit:htmlunit from 4.4.0 to 4.5.0 Bumps [org.htmlunit:htmlunit](https://github.com/HtmlUnit/htmlunit) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/HtmlUnit/htmlunit/releases) - [Commits](https://github.com/HtmlUnit/htmlunit/compare/4.4.0...4.5.0) --- updated-dependencies: - dependency-name: org.htmlunit:htmlunit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 432d7ebaee..4032f7c6e1 100644 --- a/pom.xml +++ b/pom.xml @@ -182,7 +182,7 @@ org.htmlunit htmlunit - 4.4.0 + 4.5.0 From 177f2e707489a38068deaef48710f07921833fab Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Tue, 29 Oct 2024 13:02:56 +0100 Subject: [PATCH 2/4] Disable JavaScript --- .../surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java index 995ec35615..36af64ba1d 100644 --- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java +++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java @@ -53,6 +53,7 @@ public void testWithIdenticalNames() throws IOException { final URI uri = reportsFile.toURI(); try (WebClient webClient = new WebClient()) { + webClient.getOptions().setJavaScriptEnabled(false); HtmlPage page = webClient.getPage(uri.toURL()); HtmlAnchor a = (HtmlAnchor) page.getByXPath("//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]") @@ -60,6 +61,7 @@ public void testWithIdenticalNames() throws IOException { HtmlTableRow content = (HtmlTableRow) page.getElementById("surefire260.TestB.testDup-failure"); assertNotNull(content); assertTrue(content.getAttribute("style").contains("none")); + webClient.getOptions().setJavaScriptEnabled(true); a.click(); assertFalse(content.getAttribute("style").contains("none")); } From a23e7d5145962f09b9870a47142af0d3ff9e4302 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Tue, 29 Oct 2024 16:26:16 +0100 Subject: [PATCH 3/4] Revert "Disable JavaScript" This reverts commit 177f2e707489a38068deaef48710f07921833fab. --- .../surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java index 36af64ba1d..995ec35615 100644 --- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java +++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java @@ -53,7 +53,6 @@ public void testWithIdenticalNames() throws IOException { final URI uri = reportsFile.toURI(); try (WebClient webClient = new WebClient()) { - webClient.getOptions().setJavaScriptEnabled(false); HtmlPage page = webClient.getPage(uri.toURL()); HtmlAnchor a = (HtmlAnchor) page.getByXPath("//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]") @@ -61,7 +60,6 @@ public void testWithIdenticalNames() throws IOException { HtmlTableRow content = (HtmlTableRow) page.getElementById("surefire260.TestB.testDup-failure"); assertNotNull(content); assertTrue(content.getAttribute("style").contains("none")); - webClient.getOptions().setJavaScriptEnabled(true); a.click(); assertFalse(content.getAttribute("style").contains("none")); } From e6fd1283a57743f8af293a184938f0dbca177da0 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Tue, 29 Oct 2024 18:39:04 +0100 Subject: [PATCH 4/4] Ignore script errors --- .../surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java index 995ec35615..5438b5e231 100644 --- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java +++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java @@ -53,6 +53,7 @@ public void testWithIdenticalNames() throws IOException { final URI uri = reportsFile.toURI(); try (WebClient webClient = new WebClient()) { + webClient.getOptions().setThrowExceptionOnScriptError(false); HtmlPage page = webClient.getPage(uri.toURL()); HtmlAnchor a = (HtmlAnchor) page.getByXPath("//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]")