Skip to content

Adapt Script Console for experimental Manage Jenkins UI#2592

Merged
timja merged 5 commits intojenkinsci:masterfrom
janfaracik:test-11333
Jan 23, 2026
Merged

Adapt Script Console for experimental Manage Jenkins UI#2592
timja merged 5 commits intojenkinsci:masterfrom
janfaracik:test-11333

Conversation

@janfaracik
Copy link
Member

Testing jenkinsci/jenkins#11333

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@timja timja changed the title Test 'Adapt Script Console for experimental Manage Jenkins UI' Adapt Script Console for experimental Manage Jenkins UI Jan 23, 2026
@timja timja marked this pull request as ready for review January 23, 2026 14:36
@timja timja requested a review from a team as a code owner January 23, 2026 14:36
@timja timja enabled auto-merge (squash) January 23, 2026 14:36
@timja timja merged commit 0005e22 into jenkinsci:master Jan 23, 2026
34 checks passed
CodeMirror cm = new CodeMirror(this, "/script");
cm.set(String.format(script, args));
clickButton("Run");
find(by.css("button[value='Run']")).click();
Copy link
Member

@jtnord jtnord Jan 23, 2026

Choose a reason for hiding this comment

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

doesn't this imply that clickButton should be fixed after all this is a button and it has the text Run?
If we have multiple buttons all with the same value - then this would appear to be a UX issue as well. If we need to disambiguate the main "run" from an example script "run" then why are we not using IDs or data-test-ids

Copy link
Member

@timja timja Jan 23, 2026

Choose a reason for hiding this comment

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

The text is different, its just the button has the text Run example but because it does a contains it breaks it.

It uses a contains because some buttons have SVGs in them so its a workaround for that.

IDs or data-test-ids would work but this also works fine too.

Copy link
Member

@jtnord jtnord Jan 23, 2026

Choose a reason for hiding this comment

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

so to cope with svg we should be using innerText and if that SVG has text then it should be included in the match (the string supplied to clickButton(String)) as it is part of the button text?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants