|
7 | 7 | import hudson.model.FreeStyleProject; |
8 | 8 | import hudson.model.Result; |
9 | 9 | import hudson.model.queue.QueueTaskFuture; |
| 10 | +import org.htmlunit.html.HtmlForm; |
| 11 | +import org.htmlunit.html.HtmlPage; |
10 | 12 | import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition; |
11 | 13 | import org.jenkinsci.plugins.workflow.job.WorkflowJob; |
12 | 14 | import org.jenkinsci.plugins.workflow.job.WorkflowRun; |
|
15 | 17 | import org.jvnet.hudson.test.JenkinsRule; |
16 | 18 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins; |
17 | 19 | import org.jvnet.hudson.test.recipes.LocalData; |
| 20 | +import org.xml.sax.SAXException; |
18 | 21 |
|
| 22 | +import java.io.IOException; |
19 | 23 | import java.nio.file.Files; |
20 | 24 | import java.nio.file.Paths; |
21 | 25 |
|
22 | 26 | @WithJenkins |
23 | 27 | public class VB6BuilderTest { |
24 | 28 |
|
| 29 | + @Test |
| 30 | + void configRoundTrip(JenkinsRule j) throws Exception { |
| 31 | + FreeStyleProject p = j.createFreeStyleProject(); |
| 32 | + VB6Builder orig = new VB6Builder("projectFile1.vbp"); |
| 33 | + p.getBuildersList().add(orig); |
| 34 | + |
| 35 | + try (JenkinsRule.WebClient webClient = j.createWebClient()) { |
| 36 | + HtmlPage page = webClient.getPage(p, "configure"); |
| 37 | + HtmlForm form = page.getFormByName("config"); |
| 38 | + j.submit(form); |
| 39 | + } |
| 40 | + |
| 41 | + j.assertEqualBeans(orig, p.getBuildersList().get(VB6Builder.class), "projectFile"); |
| 42 | + |
| 43 | + } |
| 44 | + |
25 | 45 | @Test |
26 | 46 | void testUnix(JenkinsRule j) throws Exception { |
27 | 47 | Assumptions.assumeFalse(Functions.isWindows()); |
|
0 commit comments