Skip to content

Commit

Permalink
Don't use form-element-path
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Dec 5, 2021
1 parent 6bff25b commit db144e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/src/test/java/hudson/model/ParametersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ public void choiceWithLTGT() throws Exception {
HtmlPage page = wc.goTo("job/" + project.getName() + "/build?delay=0sec");
HtmlForm form = page.getFormByName("parameters");

HtmlElement element = (HtmlElement) (form.getElementsByAttribute("input", "path", "/parameter/name")).get(0).getParentNode();
HtmlElement element = (HtmlElement) (form.getElementsByAttribute("input", "name", "name")).get(0).getParentNode();
assertNotNull(element);
assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(form, "//div[contains(@class, 'jenkins-form-description')]")).getTextContent());
assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(form, "//div[contains(@class, 'jenkins-form-label')]")).getTextContent());

HtmlSelect choiceSelect = (HtmlSelect) form.getElementsByAttribute("select", "path", "/parameter/value").get(0);
HtmlSelect choiceSelect = (HtmlSelect) form.getElementsByAttribute("select", "name", "value").get(0);

HtmlOption opt = DomNodeUtil.selectSingleNode(choiceSelect, "option[@value='Choice <2>']");
assertNotNull(opt);
Expand Down

0 comments on commit db144e7

Please sign in to comment.