Skip to content

Commit

Permalink
[JENKINS-75008] Replace outdated poll SCM icon with play symbol (#48)
Browse files Browse the repository at this point in the history
The play symbol is used by the "Scan repository" button for multibranch
Pipelines and is used by the "Build Now" button for all jobs.  Make the
poll SCM plugin consistent with other usages by switching to the play
icon.

https://issues.jenkins.io/browse/JENKINS-75008 is the bug report

Testing done:

Created a freestyle project that uses a git repository and enabled
polling in the job definition so that the "Poll now" button was visible in
the sidepanel.  Confirmed that the button in the sidepanel was correct.
Confirmed that clicking the button in the side panel performed a poll
of the repository.

Ran the automated tests and confirmed that they pass with the changes.
  • Loading branch information
MarkEWaite authored Dec 27, 2024
1 parent 2893873 commit 8eb4e88
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public SCMTriggerItem getOwner() {
}

public String getIconFileName() {
return getACL().hasPermission(POLL) ? "/plugin/pollscm/images/24x24/clipboard-play.png" : null;
return getACL().hasPermission(POLL) ? "symbol-play" : null;
}

private ACL getACL() {
Expand Down
Binary file removed src/main/webapp/images/24x24/clipboard-play.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void getIconFileNameWithPermission() {
jenkinsMockedStatic.when(() -> Jenkins.getInstance()).thenReturn(jenkins);
when(acl.hasPermission(PollNowAction.POLL)).thenReturn(true);
String iconName = mockPollNowAction.getIconFileName();
assertEquals("/plugin/pollscm/images/24x24/clipboard-play.png", iconName);
assertEquals("symbol-play", iconName);
}
}

Expand Down

0 comments on commit 8eb4e88

Please sign in to comment.