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

Modernise the 'New view' and 'New node' pages #5842

Merged
merged 51 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6b51ea5
Initial
Aug 16, 2021
88f4c62
input
Aug 16, 2021
956ff65
Getting there...
Aug 16, 2021
10702e3
Merge remote-tracking branch 'origin/page-titles' into new-new-view-page
janfaracik Oct 7, 2021
0d38bb0
Update newJob.jelly
janfaracik Oct 7, 2021
170f87e
Reset
janfaracik Oct 7, 2021
f2149db
Redo form
janfaracik Oct 7, 2021
d471735
Update colours to have blue hue, correct radio focus
janfaracik Oct 7, 2021
2bd13ec
Add properties
janfaracik Oct 7, 2021
367a2e1
Update field, add back inline error
janfaracik Oct 8, 2021
5835e66
Update style.less
janfaracik Oct 8, 2021
b40ccad
Update hudson-behavior.js
janfaracik Oct 8, 2021
b5bfaa3
Add locale
janfaracik Oct 8, 2021
60e0040
Update entry.jelly
janfaracik Oct 8, 2021
1e2b8c0
Update form.jelly
janfaracik Oct 10, 2021
dff84c5
Update new node page
janfaracik Oct 10, 2021
b2ef80e
Use search bar instead of input
janfaracik Oct 10, 2021
138fe14
Update form.less
janfaracik Oct 10, 2021
281b2bd
Animate in/out radio children
janfaracik Oct 10, 2021
7cddfd3
Merge branch 'master' into new-new-view-page
janfaracik Oct 21, 2021
417177d
Apply suggestions from code review
janfaracik Oct 21, 2021
3eb5b63
Add page title for New Node page
janfaracik Oct 21, 2021
6dbda76
Merge branch 'new-new-view-page' of https://github.com/janfaracik/jen…
janfaracik Oct 21, 2021
33dc004
Style number inputs too
janfaracik Oct 21, 2021
5032586
Update form.less
janfaracik Oct 21, 2021
dc4a6ed
Move help link to left, restyle it, decrease spacing between componen…
janfaracik Oct 22, 2021
fadba5a
Move help-button to form.less, restyle help box
janfaracik Oct 22, 2021
db504c7
Merge branch 'master' into new-new-view-page
janfaracik Oct 22, 2021
ab8517a
Add tooltip to help button
janfaracik Oct 22, 2021
0a4ecee
Fix help button not working on pipeline page, improves background of …
janfaracik Oct 22, 2021
acd5c19
Fix Azure inputs
janfaracik Oct 22, 2021
e77882d
Fix failing unit tests
janfaracik Oct 22, 2021
b8d574e
Add max-width none to fix pipeline editor
janfaracik Oct 22, 2021
32fddac
Add form item width variable
janfaracik Oct 22, 2021
3a1980e
Add focus state to (?) button
janfaracik Oct 22, 2021
26423de
Move some props to CSS variables
janfaracik Oct 22, 2021
1a6662c
Move radius to CSS variables, rename help button to be consistent
janfaracik Oct 22, 2021
bbf2cc1
Extract more props into variables, fin?
janfaracik Oct 22, 2021
1587663
Move JS out of html
janfaracik Oct 22, 2021
a1cc003
Fix error/warning icon
janfaracik Oct 24, 2021
e894c56
Draggable cards now have a max width
janfaracik Oct 24, 2021
8810c27
Delete button style - it'll be updated in future buttons MR
janfaracik Oct 25, 2021
74d6632
Update description of ID attribute for form - thanks @timja
janfaracik Oct 26, 2021
70782b1
Fix Global Credentials' Verify Configuration button being hidden by t…
janfaracik Oct 26, 2021
5d6476c
Fix checkbox label not appearing next to checkbox
janfaracik Oct 26, 2021
c1dc212
Add min width/height to help button to ensure it doesnt get squished
janfaracik Oct 26, 2021
79742de
Fix missing help buttons and help buttons that only show as ?
janfaracik Oct 26, 2021
6adfacf
Address review comments
timja Oct 28, 2021
741de11
Address felix's feedback too
timja Oct 29, 2021
dddde9c
Merge pull request #2 from timja/adjust-minor-issues
janfaracik Nov 1, 2021
a27dc99
Fix test
janfaracik Nov 1, 2021
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
4 changes: 2 additions & 2 deletions core/src/main/resources/hudson/model/ComputerSet/new.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
<j:getStatic var="createPermission" className="hudson.model.Computer" field="CREATE"/>
<l:layout permission="${createPermission}">
<l:layout title="${%New node}" permission="${createPermission}">
<st:include page="sidepanel.jelly" />
janfaracik marked this conversation as resolved.
Show resolved Hide resolved
<l:main-panel>
<j:invokeStatic var="slaves" className="hudson.slaves.NodeDescriptor" method="allInstantiable" />
<n:form nameTitle="${%Node name}" copyTitle="${%Copy Existing Node}" copyNames="${it._slaveNames}"
<n:form title="${%New node}" nameTitle="${%Node name}" copyTitle="${%Copy Existing Node}" copyNames="${it._slaveNames}"
descriptors="${slaves}" checkUrl="checkName" xmlns:n="/lib/hudson/newFromList" />
</l:main-panel>
</l:layout>
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/resources/jenkins/model/Jenkins/newView.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ THE SOFTWARE.
New View page
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<l:layout permission="${app.primaryView.CREATE}" title="${%New View}">
<st:include page="sidepanel.jelly" />

<l:main-panel>
<j:invokeStatic var="views" className="hudson.model.View" method="allInstantiable" />
<n:form nameTitle="${%View name}" action="createView" copyTitle="${%Copy Existing View}"
<n:form title="${%New View}" nameTitle="${%View name}" action="createView" copyTitle="${%Copy Existing View}"
descriptors="${views}" checkUrl="checkViewName" xmlns:n="/lib/hudson/newFromList" />
</l:main-panel>
</l:layout>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
New\ View=New view
View\ name=Name
4 changes: 2 additions & 2 deletions core/src/main/resources/lib/form/advanced.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>

<div class='tr'>
<st:adjunct includes="lib.form.advanced.advanced"/>
<div class='jenkins-form-item tr'>
<st:adjunct includes="lib.form.advanced.advanced"/>

<div class="advancedLink" style="${attrs.align!=null?('text-align:'+attrs.align):''}">
<j:set var="id" value="${h.generateId()}"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/dropdownList.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>

<div class='tr'>
<div class='jenkins-form-item'>
<div class="setting-name help-sibling">
${attrs.title}
<f:helpLink url="${attrs.help}" featureName="${title}"/>
Expand Down
7 changes: 5 additions & 2 deletions core/src/main/resources/lib/form/entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ THE SOFTWARE.

This content is HTML (unless the boolean variable escapeEntryTitleAndDescription is set). Use h.escape if necessary.
</st:attribute>
<st:attribute name="class">
Classes to apply to the form
</st:attribute>
<st:attribute name="help">
URL to the HTML page. When this attribute is specified, the entry gets
a (?) icon on the right, and if the user clicks it, the contents of the
Expand All @@ -69,10 +72,10 @@ THE SOFTWARE.
<!-- expose this so that we can look up the @field value later from prepareDatabinding.jelly -->
<j:set var="entry" value="${attrs}" />
<j:set var="possiblyEscapedTitle" value="${escapeEntryTitleAndDescription ? h.escape(attrs.title) : attrs.title}" />
<div class='tr form-group'>
janfaracik marked this conversation as resolved.
Show resolved Hide resolved
<div class="jenkins-form-item ${attrs.class}">
<j:choose>
<j:when test="${possiblyEscapedTitle!=null}">
<div class="setting-name help-sibling">
<div class="jenkins-form-label help-sibling">
<j:out value="${possiblyEscapedTitle}" />
<f:helpLink url="${attrs.help}" featureName="${title}"/>
</div>
Expand Down
8 changes: 7 additions & 1 deletion core/src/main/resources/lib/form/form.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ THE SOFTWARE.
but in Hudson you should have it for testing and page scraping,
so this attribute is marked required.
</st:attribute>
<st:attribute name="class">
Classes to apply to the form
</st:attribute>
<st:attribute name="enctype">
@enctype of the &lt;form> HTML element.
</st:attribute>
<st:attribute name="id">
ID of the form.
</st:attribute>
<st:attribute name="target">
@target of the &lt;form> HTML element. Works like &lt;a target="...">
and controls which window the result of the submission goes to.
Expand All @@ -53,7 +59,7 @@ THE SOFTWARE.
Default: false
</st:attribute>
</st:documentation>
<form action="${action}" method="${method}" enctype="${attrs.enctype}" name="${name}" target="${attrs.target}" autocomplete="${attrs.autocomplete==true?'on':'off'}">
<form id="${id}" class="${class}" action="${action}" method="${method}" enctype="${attrs.enctype}" name="${name}" target="${attrs.target}" autocomplete="${attrs.autocomplete==true?'on':'off'}">
<div width="100%" class="${attrs.tableClass}">
<d:invokeBody/>
</div>
Expand Down
11 changes: 4 additions & 7 deletions core/src/main/resources/lib/form/helpLink.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ THE SOFTWARE.
</st:documentation>
<j:choose>
<j:when test="${attrs.url!=null}">
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%[Help]'}" />
<span class="setting-help">
<a href="#" class="help-button" helpURL="${rootURL}${attrs.url}"><l:helpIcon class="icon-help" tooltip="${altText}"/></a>
</span>
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%Help'}" />
<a href="#" class="jenkins-help-button" tooltip="${altText}" helpURL="${rootURL}${attrs.url}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caused SECURITY-2779

?
</a>
</j:when>
<j:otherwise>
<span class="setting-no-help"></span>
</j:otherwise>
</j:choose>
</j:jelly>
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/hetero-list.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ THE SOFTWARE.
<st:adjunct includes="lib.form.hetero-list.hetero-list"/>

<j:set var="targetType" value="${attrs.targetType?:it.class}"/>
<div class="hetero-list-container ${hasHeader?'with-drag-drop':''} ${attrs.oneEach?'one-each':''} ${attrs.honorOrder?'honor-order':''}">
<div class="jenkins-form-item hetero-list-container ${hasHeader?'with-drag-drop':''} ${attrs.oneEach?'one-each':''} ${attrs.honorOrder?'honor-order':''}">
<!-- display existing items -->
<j:forEach var="i" items="${attrs.items}"><!-- TODO consider customizedFields: how to distinguish default items from user-configured items? -->
<j:set var="descriptor" value="${i.descriptor}" />
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/number.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ THE SOFTWARE.

<f:possibleReadOnlyField>
<m:input xmlns:m="jelly:hudson.util.jelly.MorphTagLibrary"
class="setting-input ${attrs.checkUrl!=null?'validated':''} ${attrs.clazz}"
class="jenkins-input ${attrs.checkUrl!=null?'validated':''} ${attrs.clazz}"
name="${name}"
value="${value}"
type="number"
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/section.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ THE SOFTWARE.
<f:rowSet name="${attrs.name}">
<j:if test="${attrs.title!=null}">
<f:block>
<div class="section-header">
<div class="jenkins-section__header">
${title}
</div>
</f:block>
Expand Down
9 changes: 0 additions & 9 deletions core/src/main/resources/lib/form/section_.css

This file was deleted.

6 changes: 5 additions & 1 deletion core/src/main/resources/lib/form/textbox.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ THE SOFTWARE.
Additional CSS class(es) to add (such as client-side validation clazz="required",
"number" or "positive-number"; these may be combined, as clazz="required number").
</st:attribute>
<st:attribute name="placeholder">
Placeholder text for the text box
</st:attribute>
janfaracik marked this conversation as resolved.
Show resolved Hide resolved
<st:attribute name="checkMessage">
Override the default error message when client-side validation fails,
as with clazz="required", etc.
Expand Down Expand Up @@ -88,10 +91,11 @@ THE SOFTWARE.

<f:possibleReadOnlyField>
<m:input xmlns:m="jelly:hudson.util.jelly.MorphTagLibrary"
class="setting-input ${attrs.checkUrl!=null?'validated':''} ${attrs.autoCompleteUrl!=null?'auto-complete':null} ${attrs.clazz}"
class="jenkins-input ${attrs.checkUrl!=null?'validated':''} ${attrs.autoCompleteUrl!=null?'auto-complete':null} ${attrs.clazz}"
janfaracik marked this conversation as resolved.
Show resolved Hide resolved
name="${name}"
value="${value}"
type="text"
placeholder="${placeholder}"
ATTRIBUTES="${attrs}" EXCEPT="field clazz" />
</f:possibleReadOnlyField>
<j:if test="${customizedFields != null and attrs.field != null and value != default}">
Expand Down
102 changes: 49 additions & 53 deletions core/src/main/resources/lib/hudson/newFromList/form.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ THE SOFTWARE.
<st:attribute name="descriptors" use="required">
Collection of Descriptors to be rendered.
</st:attribute>
<st:attribute name="title" use="required">
Title for the form
</st:attribute>
<st:attribute name="nameTitle" use="required">
Caption of the text box to receive the name of the newly created item. Something like "Job name"
</st:attribute>
Expand All @@ -49,72 +52,65 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>


<j:set var="descriptors" value="${h.filterDescriptors(it,attrs.descriptors)}" />

<s:form method="post" action="${attrs.action?:'createItem'}" name="createItem">
<div class="jenkins-app-bar">
<div class="jenkins-app-bar__content">
<h1>${attrs.title}</h1>
</div>
</div>

<s:form class="jenkins-form" method="post" id="createItemForm" action="${attrs.action?:'createItem'}" name="createItem">
<s:entry title="${attrs.nameTitle}">
<s:textbox id="name" name="name" checkUrl="'${h.jsStringEscape(attrs.checkUrl)}?value='+encodeURIComponent(this.value)"
onchange="updateOk(this.form)" onkeyup="updateOk(this.form)" />
<script>$('name').focus();</script>
</s:entry>

<j:forEach var="descriptor" items="${descriptors}">
<s:block>
<input type="radio" name="mode" value="${descriptor.id}" onchange="updateOk(this.form)" onclick="updateOk(this.form)" />
<label class="attach-previous"><b>${descriptor.displayName}</b></label>
</s:block>
<s:entry>
<st:set var="instance" value="${descriptor}" />
<st:include page="newInstanceDetail.jelly" it="${descriptor}" />
</s:entry>
</j:forEach>
<j:if test="${!empty(attrs.copyNames) or attrs.showCopyOption}">
<s:block>
<input type="radio" id="copy" name="mode" value="copy" onchange="updateOk(this.form)" onclick="updateOk(this.form)" />
<label class="attach-previous"><b>${attrs.copyTitle}</b></label>
</s:block>
<s:entry>
${%Copy from}
<j:choose>
<j:when test="${attrs.copyNames}">
<!-- deprecated as of 1.402. -->
<s:editableComboBox id="from" name="from" items="${attrs.copyNames}" />
</j:when>
<j:otherwise>
<j:set var="descriptor" value="${it.descriptor}" />
<s:textbox id="from" name="from" field="copyNewItemFrom" style="width:40em" onfocus="$('copy').click()" />
</j:otherwise>
</j:choose>
</s:entry>
</j:if>
<div class="jenkins-form-item">
<fieldset class="jenkins-fieldset">
<legend class="jenkins-form-label">
${%View type}
</legend>

<j:forEach var="descriptor" items="${descriptors}">
<div class="jenkins-radio">
<input class="jenkins-radio__input" type="radio" name="mode" id="${descriptor.id}" value="${descriptor.id}" onchange="updateOk()" onclick="updateOk()" />
<label for="${descriptor.id}" class="jenkins-radio__label">
${descriptor.displayName}
</label>
<div class="jenkins-radio__description">
<st:include page="newInstanceDetail.jelly" it="${descriptor}" />
</div>
</div>
</j:forEach>

<s:bottomButtonBar>
<j:if test="${!empty(attrs.copyNames) or attrs.showCopyOption}">
<div class="jenkins-radio">
<input class="jenkins-radio__input" type="radio" id="copy" name="mode" value="copy" onchange="updateOk()" onclick="updateOk()" />
<label class="jenkins-radio__label" for="copy">${attrs.copyTitle}</label>
<div class="jenkins-radio__children">
<j:set var="descriptor" value="${it.descriptor}" />
<div class="jenkins-search">
<s:textbox placeholder="${%Type for suggestions}" clazz="jenkins-search__input" name="from" field="copyNewItemFrom" onfocus="$('copy').click()" />
<l:svgIcon href="${resURL}/images/material-icons/svg-sprite-action-symbol.svg#ic_search_24px" class="jenkins-search__icon" />
</div>
</div>
</div>
</j:if>
</fieldset>
</div>

<div class="jenkins-form-item">
<!--
when there's only one radio above, form.elements['mode]' won't return an array, which makes the script complex.
So always force non-empty array
-->
<input type="radio" name="mode" value="dummy1" style="display:none" />
<input type="radio" name="mode" value="dummy2" style="display:none" />
<input type="submit" name="Submit" value="${%OK}" id="ok" style="margin-left:5em" />
</s:bottomButtonBar>
</s:form>
<script><![CDATA[
var okButton = makeButton($('ok'),null);
<input type="submit" name="Submit" value="${%Create}" id="ok" />
</div>

function updateOk(form) {
function state() {
if($('name').value.length==0) return true;
var radio = form.elements['mode'];
if (radio.length==2) return false; // this means we only have dummy checkboxes
for(i=0;i<radio.length;i++)
if(radio[i].checked)
return false;
return true;
}

okButton.set('disabled',state(),false);
}
updateOk(okButton.getForm());
]]></script>
</j:jelly>
<st:adjunct includes="lib.hudson.newFromList.validation" />
</s:form>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
View\ type=Type
Create=Create
28 changes: 28 additions & 0 deletions core/src/main/resources/lib/hudson/newFromList/validation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function updateOk() {
function state() {
let form = document.getElementById("createItemForm");
let nameInput = document.getElementById("name");
let radios = form.querySelectorAll('input[type="radio"]');

if (nameInput.value.length === 0) {
return true;
}

// this means we only have dummy checkboxes
if (radios.length === 2) {
return true;
}

for (i = 0; i < radios.length; i++) {
if (radios[i].checked) {
return false;
}
}

return true;
}

document.getElementById("ok").disabled = state();
}

updateOk();
2 changes: 1 addition & 1 deletion test/src/test/java/hudson/model/HelpLinkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private void clickAllHelpLinks(JenkinsRule.WebClient webClient, AbstractProject
}

private void clickAllHelpLinks(HtmlPage p) throws Exception {
List<?> helpLinks = DomNodeUtil.selectNodes(p, "//a[@class='help-button']");
List<?> helpLinks = DomNodeUtil.selectNodes(p, "//a[@class='jenkins-help-button']");
assertTrue(helpLinks.size()>0);
System.out.println("Clicking "+helpLinks.size()+" help links");

Expand Down
8 changes: 4 additions & 4 deletions test/src/test/java/hudson/model/ParametersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void parameterTypes() throws Exception {

HtmlTextInput stringParameterInput = DomNodeUtil.selectSingleNode(element, ".//input[@name='value']");
assertEquals("defaultValue", stringParameterInput.getAttribute("value"));
assertEquals("string", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent());
assertEquals("string", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'jenkins-form-label')]")).getTextContent());
stringParameterInput.setAttribute("value", "newValue");

element = DomNodeUtil.selectSingleNode(form, "//div[input/@value='boolean']");
Expand All @@ -85,12 +85,12 @@ public void parameterTypes() throws Exception {
element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, ".//div[input/@value='choice']")).getParentNode();
assertNotNull(element);
assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent());
assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent());
assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'jenkins-form-label')]")).getTextContent());

element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, ".//div[input/@value='run']")).getParentNode();
assertNotNull(element);
assertEquals("run description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent());
assertEquals("run", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent());
assertEquals("run", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'jenkins-form-label')]")).getTextContent());

j.submit(form);
Queue.Item q = j.jenkins.getQueue().getItem(project);
Expand Down Expand Up @@ -120,7 +120,7 @@ public void choiceWithLTGT() throws Exception {
HtmlElement element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, ".//div[input/@value='choice']")).getParentNode();
assertNotNull(element);
assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent());
assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent());
assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'jenkins-form-label')]")).getTextContent());
HtmlOption opt = DomNodeUtil.selectSingleNode(element.getParentNode(), "div/div/select/option[@value='Choice <2>']");
assertNotNull(opt);
assertEquals("Choice <2>", opt.asText());
Expand Down
Loading