Skip to content

Commit

Permalink
fix tests for the new webClient setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Jan 12, 2024
1 parent 36bd563 commit fb98a83
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/org/htmlunit/libraries/HtmxTest1x7x0.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package org.htmlunit.libraries;

import org.htmlunit.WebClient;
import org.htmlunit.junit.BrowserRunner;
import org.htmlunit.junit.BrowserRunner.Alerts;
import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI;
Expand All @@ -38,4 +39,13 @@ public class HtmxTest1x7x0 extends HtmxTest {
public void htmx() throws Exception {
htmx("htmx-1.7.0");
}

@Override
protected void setupWebClient(final WebClient webClient) {
super.setupWebClient(webClient);

if (webClient.getBrowserVersion().isIE()) {
webClient.getOptions().setThrowExceptionOnScriptError(false);
}
}
}
10 changes: 10 additions & 0 deletions src/test/java/org/htmlunit/libraries/HtmxTest1x8x4.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package org.htmlunit.libraries;

import org.htmlunit.WebClient;
import org.htmlunit.junit.BrowserRunner;
import org.htmlunit.junit.BrowserRunner.Alerts;
import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI;
Expand All @@ -38,4 +39,13 @@ public class HtmxTest1x8x4 extends HtmxTest {
public void htmx() throws Exception {
htmx("htmx-1.8.4");
}

@Override
protected void setupWebClient(final WebClient webClient) {
super.setupWebClient(webClient);

if (webClient.getBrowserVersion().isIE()) {
webClient.getOptions().setThrowExceptionOnScriptError(false);
}
}
}
10 changes: 10 additions & 0 deletions src/test/java/org/htmlunit/libraries/HtmxTest1x9x2.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package org.htmlunit.libraries;

import org.htmlunit.WebClient;
import org.htmlunit.junit.BrowserRunner;
import org.htmlunit.junit.BrowserRunner.Alerts;
import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI;
Expand All @@ -39,4 +40,13 @@ public class HtmxTest1x9x2 extends HtmxTest {
public void htmx() throws Exception {
htmx("htmx-1.9.2");
}

@Override
protected void setupWebClient(final WebClient webClient) {
super.setupWebClient(webClient);

if (webClient.getBrowserVersion().isIE()) {
webClient.getOptions().setThrowExceptionOnScriptError(false);
}
}
}

0 comments on commit fb98a83

Please # to comment.