.getPluginLocalizedValue("RepoViewRenameBranch.label"));
refreshAndWait();
SWTBotShell renameDialog = bot
.shell(UIText.BranchRenameDialog_WindowTitle);
SWTBotText newBranchNameText = renameDialog.bot().textWithLabel(UIText.BranchRenameDialog_NewNameLabel);
newBranchNameText.setText("invalid~name");
renameDialog.bot().text(" " + // the text is now in the error message, and the MessageAreaDialog seems to add a space
NLS.bind(UIText.ValidationUtils_InvalidRefNameMessage,
"refs/heads/invalid~name"));
assertFalse(renameDialog.bot().button(IDialogConstants.OK_LABEL)
.isEnabled());
newBranchNameText.setText("newmaster");
renameDialog.bot().button(IDialogConstants.OK_LABEL).click();
refreshAndWait();
item = myRepoViewUtil.getLocalBranchesItem(tree, clonedRepositoryFile)
.expand();
assertEquals("newmaster", item.getNode(0).select().getText());
ContextMenuHelper.clickContextMenu(tree, myUtil
.getPluginLocalizedValue("RepoViewRenameBranch.label"));
refreshAndWait();
renameDialog = bot.shell(UIText.BranchRenameDialog_WindowTitle);
newBranchNameText = renameDialog.bot().text(0);
newBranchNameText.setText("master");
renameDialog.bot().button(IDialogConstants.OK_LABEL).click();
refreshAndWait();
item = myRepoViewUtil.getLocalBranchesItem(tree, clonedRepositoryFile)