Skip to content
Permalink
Browse files
[JENKINS-50023] Fix TopLevelItem#renameTo after JENKINS-22936
  • Loading branch information
raul-arabaolaza committed Mar 9, 2018
1 parent 2a6b4ce commit f18d77a684925e40b80a1498fec9da576f7b79c2
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/main/java/org/jenkinsci/test/acceptance/po/TopLevelItem.java
@@ -43,12 +43,12 @@ public TopLevelItem(PageObject context, URL url, String name) {
*/
@CheckReturnValue
public <T extends TopLevelItem> T renameTo(final String newName) {
configure();
open();
String oldName = name;
control("/name").set(newName);
save();
waitFor(by.button("Yes")).click();

control(by.href("/job/" + oldName + "/confirm-rename")).click();
WebElement renameButton = waitFor(by.button("Rename"));
control(by.name("newName")).set(newName);
renameButton.click();
try {
return (T) newInstance(getClass(),
injector, new URL(url.toExternalForm().replace(oldName, newName)), newName);

0 comments on commit f18d77a

Please sign in to comment.