Skip to content

Commit ca08444

Browse files
authored
Adds id and testid for item overflow button (#26092)
1 parent 8c32c24 commit ca08444

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/src/main/resources/lib/layout/job-subpage.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ THE SOFTWARE.
103103
</j:when>
104104
</j:choose>
105105

106-
<l:overflowButton>
106+
<l:overflowButton id="more-item-actions">
107107
<dd:custom>
108108
<div class="app-build-overflow">
109109
<j:set var="mode" value="side-panel" />

core/src/main/resources/lib/layout/overflowButton.jelly

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ THE SOFTWARE.
4444
<st:attribute name="id">
4545
Optional ID for the button
4646
</st:attribute>
47+
<st:attribute name="testid">
48+
Optional test id for the button. Will be rendered as `data-testid`. Defaults to id if provided or empty.
49+
</st:attribute>
4750

4851
Displays a button which when clicked displays a dropdown of the component's children
4952
</st:documentation>
5053

5154
<button class="jenkins-button ${attrs.clazz}"
5255
tooltip="${attrs.containsKey('tooltip') ? attrs.tooltip : '%More actions'}"
5356
id="${attrs.id}"
57+
data-testid="${attrs.containsKey('testId') ? attrs.testid : attrs.containsKey('id') ? attrs.id : ''}"
5458
type="button" data-dropdown="true">
5559
<j:choose>
5660
<j:when test="${attrs.containsKey('icon')}">

0 commit comments

Comments
 (0)