diff options
author | Matthias Sohn | 2011-02-04 00:08:22 +0000 |
---|---|---|
committer | Matthias Sohn | 2011-02-04 00:08:22 +0000 |
commit | 4c879313cd1332e594b1ad20b1485bdff9533034 (patch) | |
tree | f4f39bc0febb96a993483ad0df7b0501e6f1704a | |
parent | 9b77590320c6754cc88c9e2d035d51e59ba5bee4 (diff) | |
download | egit-4c879313cd1332e594b1ad20b1485bdff9533034.tar.gz egit-4c879313cd1332e594b1ad20b1485bdff9533034.tar.xz egit-4c879313cd1332e594b1ad20b1485bdff9533034.zip |
Fix create and rename branch ui tests
The branch dialogs were improved but the corresponding tests were not
adapted appropriately.
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I7f92be2c0ab44d001946ec75334d881820109a5d
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java index 22b3202227..41a4a0ef58 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java @@ -58,6 +58,7 @@ import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner; import org.eclipse.swtbot.swt.finder.utils.TableCollection; import org.eclipse.swtbot.swt.finder.waits.ICondition; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; import org.eclipse.swtbot.swt.finder.widgets.TimeoutException; @@ -306,12 +307,13 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase { SWTBotShell dialog = openBranchDialog(); dialog.bot().button(UIText.BranchSelectionDialog_NewBranch).click(); SWTBotShell branchNameDialog = bot - .shell(UIText.BranchSelectionDialog_QuestionNewBranchTitle); - branchNameDialog.bot().text().setText("master"); - assertFalse(branchNameDialog.bot().button(IDialogConstants.OK_LABEL) + .shell(UIText.CreateBranchWizard_NewBranchTitle); + SWTBotText branchName = bot.textWithId("BranchName"); + branchName.setText("master"); + assertFalse(branchNameDialog.bot().button(IDialogConstants.FINISH_LABEL) .isEnabled()); - branchNameDialog.bot().text().setText("NewBranch"); - branchNameDialog.bot().button(IDialogConstants.OK_LABEL).click(); + branchName.setText("NewBranch"); + branchNameDialog.bot().button(IDialogConstants.FINISH_LABEL).click(); assertEquals("New Branch should be selected", "NewBranch", bot.tree() .selection().get(0, 0)); @@ -351,12 +353,13 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase { SWTBotShell dialog = openBranchDialog(); dialog.bot().button(UIText.BranchSelectionDialog_NewBranch).click(); SWTBotShell branchNameDialog = bot - .shell(UIText.BranchSelectionDialog_QuestionNewBranchTitle); - branchNameDialog.bot().text().setText("master"); - assertFalse(branchNameDialog.bot().button(IDialogConstants.OK_LABEL) + .shell(UIText.CreateBranchWizard_NewBranchTitle); + SWTBotText branchName = bot.textWithId("BranchName"); + branchName.setText("master"); + assertFalse(branchNameDialog.bot().button(IDialogConstants.FINISH_LABEL) .isEnabled()); - branchNameDialog.bot().text().setText("Unrenamed"); - branchNameDialog.bot().button(IDialogConstants.OK_LABEL).click(); + branchName.setText("Unrenamed"); + branchNameDialog.bot().button(IDialogConstants.FINISH_LABEL).click(); assertEquals("New Branch should be selected", "Unrenamed", bot.tree() .selection().get(0, 0)); |