Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDariusz Luksza2011-05-08 23:06:11 +0000
committerStefan Lay2011-05-12 09:32:45 +0000
commitb9c5c1358047ee1e527eb806868e5998f3596483 (patch)
tree4c0a901d6070ba06f17fcccd85c0e4146152350c /org.eclipse.egit.ui.test/src/org/eclipse/egit
parent04f2817e06f35890425785c85cc88085acf7a69c (diff)
downloadegit-b9c5c1358047ee1e527eb806868e5998f3596483.tar.gz
egit-b9c5c1358047ee1e527eb806868e5998f3596483.tar.xz
egit-b9c5c1358047ee1e527eb806868e5998f3596483.zip
Simplify 'create new branch' workflow
Immediately show 'create new branch' wizard where the base branch can be immediately selected instead of opening a separate dialog for this purpose. Change-Id: I1e7bd6226a4de4c31aa3e66f7b03188cb471d600 Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/BranchAndResetActionTest.java29
1 files changed, 14 insertions, 15 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 e192351cff..e0e7eead71 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
@@ -301,11 +301,9 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase {
@Test
public void testCreateDeleteBranch() throws Exception {
assertNull(lookupRepository(repositoryFile).resolve("newBranch"));
- SWTBotShell dialog = openCreateBranchDialog();
- dialog.bot().tree().getTreeItem(LOCAL_BRANCHES).expand().getNode("master").select();
- dialog.bot().button(UIText.CreateBranchDialog_OKButtonText).click();
- SWTBotShell newBranchDialog = bot.shell(UIText.CreateBranchWizard_NewBranchTitle);
+ SWTBotShell newBranchDialog = openCreateBranchDialog();
+ newBranchDialog.bot().comboBoxWithId("BaseBranch").setSelection(0);
newBranchDialog.bot().textWithId("BranchName").setText("newBranch");
newBranchDialog.bot().checkBox(UIText.CreateBranchPage_CheckoutButton).deselect();
newBranchDialog.bot().button(IDialogConstants.FINISH_LABEL).click();
@@ -335,17 +333,18 @@ public class BranchAndResetActionTest extends LocalRepositoryTestCase {
}
private SWTBotShell openCreateBranchDialog() {
- SWTBotTree projectExplorerTree = bot.viewById(
- "org.eclipse.jdt.ui.PackageExplorer").bot().tree();
- getProjectItem(projectExplorerTree, PROJ1).select();
- String[] menuPath = new String[] {
- util.getPluginLocalizedValue("TeamMenu.label"),
- util.getPluginLocalizedValue("SwitchToMenu.label"),
- UIText.SwitchToMenu_NewBranchMenuLabel };
- ContextMenuHelper.clickContextMenu(projectExplorerTree, menuPath);
- SWTBotShell dialog = bot.shell(UIText.CreateBranchDialog_WindowTitle);
- return dialog;
- }
+ SWTBotTree projectExplorerTree = bot.viewById(
+ "org.eclipse.jdt.ui.PackageExplorer").bot().tree();
+ getProjectItem(projectExplorerTree, PROJ1).select();
+ String[] menuPath = new String[] {
+ util.getPluginLocalizedValue("TeamMenu.label"),
+ util.getPluginLocalizedValue("SwitchToMenu.label"),
+ UIText.SwitchToMenu_NewBranchMenuLabel };
+ ContextMenuHelper.clickContextMenu(projectExplorerTree, menuPath);
+ SWTBotShell dialog = bot
+ .shell(UIText.CreateBranchWizard_NewBranchTitle);
+ return dialog;
+ }
private SWTBotShell openRenameBranchDialog() {
SWTBotTree projectExplorerTree = bot.viewById(

Back to the top