Adapt Script Console for experimental Manage Jenkins UI#2592
Adapt Script Console for experimental Manage Jenkins UI#2592timja merged 5 commits intojenkinsci:masterfrom
Conversation
| CodeMirror cm = new CodeMirror(this, "/script"); | ||
| cm.set(String.format(script, args)); | ||
| clickButton("Run"); | ||
| find(by.css("button[value='Run']")).click(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Testing jenkinsci/jenkins#11333
Testing done
Submitter checklist