Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade HtmlUnit from 2.x to 3.x #276

Merged
merged 2 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.64</version>
<version>4.66</version>
<relativePath />
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.jenkinsci.plugins.configfiles;

import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlRadioButtonInput;
import org.htmlunit.html.HtmlAnchor;
import org.htmlunit.html.HtmlForm;
import org.htmlunit.html.HtmlInput;
import org.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlRadioButtonInput;
import hudson.util.VersionNumber;
import org.jenkinsci.plugins.configfiles.custom.CustomConfig;
import org.junit.Rule;
Expand Down Expand Up @@ -42,10 +42,10 @@ public void regularCaseStillWorking() throws Exception {

HtmlPage createGroovyConfig = j.submit(addConfigForm);
HtmlInput configIdInput = createGroovyConfig.getElementByName("config.id");
configIdInput.setValueAttribute(CONFIG_ID);
configIdInput.setValue(CONFIG_ID);

HtmlInput configNameInput = createGroovyConfig.getElementByName("config.name");
configNameInput.setValueAttribute("Regular name");
configNameInput.setValue("Regular name");

HtmlForm saveConfigForm = createGroovyConfig.getForms().stream()
.filter(htmlForm -> htmlForm.getActionAttribute().equals("saveConfig"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.jenkinsci.plugins.configfiles.buildwrapper;

import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.DomNodeList;
import com.gargoylesoftware.htmlunit.html.HtmlOption;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.html.DomElement;
import org.htmlunit.html.DomNodeList;
import org.htmlunit.html.HtmlOption;
import org.htmlunit.html.HtmlPage;
import hudson.Launcher;
import hudson.maven.MavenModuleSet;
import hudson.model.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.jenkinsci.plugins.configfiles.folder;

import com.cloudbees.hudson.plugins.folder.Folder;
import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlAnchor;
import org.htmlunit.html.HtmlPage;
import hudson.model.Item;
import hudson.util.VersionNumber;
import jenkins.model.Jenkins;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jenkinsci.plugins.configfiles.maven.job;

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
import org.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlTextInput;
import hudson.maven.MavenModuleSet;
import hudson.model.Cause;
import hudson.model.FreeStyleProject;
Expand Down Expand Up @@ -107,8 +107,8 @@ public void configMustBeVisibleFromConfigPage() throws Exception {

final HtmlTextInput name = page.getElementByName("config.name");
final HtmlTextInput comment = page.getElementByName("config.comment");
Assert.assertEquals("name NOK", c1.name, name.getValueAttribute());
Assert.assertEquals("comment NOK", c1.comment, comment.getValueAttribute());
Assert.assertEquals("name NOK", c1.name, name.getValue());
Assert.assertEquals("comment NOK", c1.comment, comment.getValue());
}
{
// GlobalMavenSettingsConfig
Expand All @@ -118,8 +118,8 @@ public void configMustBeVisibleFromConfigPage() throws Exception {

final HtmlTextInput name = page.getElementByName("config.name");
final HtmlTextInput comment = page.getElementByName("config.comment");
Assert.assertEquals("name NOK", c2.name, name.getValueAttribute());
Assert.assertEquals("comment NOK", c2.comment, comment.getValueAttribute());
Assert.assertEquals("name NOK", c2.name, name.getValue());
Assert.assertEquals("comment NOK", c2.comment, comment.getValue());
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jenkinsci.plugins.configfiles.sec;

import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlAnchor;
import org.htmlunit.html.HtmlPage;
import hudson.util.VersionNumber;
import jenkins.model.GlobalConfiguration;
import org.jenkinsci.plugins.configfiles.GlobalConfigFiles;
Expand Down