Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Aniszczyk2010-08-11 15:27:37 +0000
committerCode Review2010-08-11 15:27:37 +0000
commit9138cd985d1576625143cee74d92e12ba8503e16 (patch)
tree207a877fc533e4527bddb8105e7067c06f2b9857 /org.eclipse.egit.ui.test
parentcf72c065135b3ce68a63385aa254dd6fb5c7c7c6 (diff)
parentc72dc6177cf07b2cfdeeafca9569e073ce39adc6 (diff)
downloadegit-9138cd985d1576625143cee74d92e12ba8503e16.tar.gz
egit-9138cd985d1576625143cee74d92e12ba8503e16.tar.xz
egit-9138cd985d1576625143cee74d92e12ba8503e16.zip
Merge "Checkout branch: use common UI"
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java8
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewBranchHandlingTest.java12
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java17
3 files changed, 21 insertions, 16 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
index 0f56eb3824..ef526cce62 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
@@ -263,9 +263,11 @@ public class HistoryViewTest extends LocalRepositoryTestCase {
ContextMenuHelper.clickContextMenu(table, util
.getPluginLocalizedValue("CreateBranch.label"));
SWTBotShell dialog = bot
- .shell(UIText.BranchSelectionDialog_QuestionNewBranchTitle);
- dialog.bot().text().setText("NewBranch");
- dialog.bot().button(IDialogConstants.OK_LABEL).click();
+ .shell(UIText.CreateBranchWizard_NewBranchTitle);
+ dialog.bot().textWithId("BranchName").setText("NewBranch");
+ // for some reason, checkboxwithlabel doesn't seem to work
+ dialog.bot().checkBox().deselect();
+ dialog.bot().button(IDialogConstants.FINISH_LABEL).click();
waitInUI();
assertNotNull(repo.resolve(Constants.R_HEADS + "NewBranch"));
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewBranchHandlingTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewBranchHandlingTest.java
index 0a0edf1fcd..5c9d9986a6 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewBranchHandlingTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewBranchHandlingTest.java
@@ -97,10 +97,10 @@ public class GitRepositoriesViewBranchHandlingTest extends
.getPluginLocalizedValue("CreateBranchCommand"));
SWTBotShell createPage = bot
- .shell(UIText.RepositoriesView_NewBranchTitle);
+ .shell(UIText.CreateBranchWizard_NewBranchTitle);
createPage.activate();
// getting text with label doesn't work
- createPage.bot().text(1).setText("newLocal");
+ createPage.bot().textWithId("BranchName").setText("newLocal");
createPage.bot().checkBox(UIText.CreateBranchPage_CheckoutButton)
.deselect();
createPage.bot().button(IDialogConstants.FINISH_LABEL).click();
@@ -171,9 +171,9 @@ public class GitRepositoriesViewBranchHandlingTest extends
item.getNode("origin/stable").select();
ContextMenuHelper.clickContextMenu(tree, myUtil
.getPluginLocalizedValue("CreateBranchCommand"));
- SWTBotShell shell = bot.shell(UIText.RepositoriesView_NewBranchTitle);
+ SWTBotShell shell = bot.shell(UIText.CreateBranchWizard_NewBranchTitle);
shell.activate();
- assertEquals("stable", shell.bot().text(1).getText());
+ assertEquals("stable", shell.bot().textWithId("BranchName").getText());
shell.bot().button(IDialogConstants.FINISH_LABEL).click();
refreshAndWait();
item = myRepoViewUtil.getLocalBranchesItem(tree, clonedRepositoryFile)
@@ -257,10 +257,10 @@ public class GitRepositoriesViewBranchHandlingTest extends
.getPluginLocalizedValue("CreateBranchCommand"));
SWTBotShell createPage = bot
- .shell(UIText.RepositoriesView_NewBranchTitle);
+ .shell(UIText.CreateBranchWizard_NewBranchTitle);
createPage.activate();
assertEquals("Wrong suggested branch name", "stable", createPage
- .bot().text(1).getText());
+ .bot().textWithId("BranchName").getText());
createPage.close();
} finally {
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
index 2791ecb477..9974f58bd6 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
@@ -149,7 +149,8 @@ public class GitRepositoriesViewTest extends GitRepositoriesViewTestBase {
public void testExpandWorkDir() throws Exception {
SWTBotTree tree = getOrOpenView().bot().tree();
Repository myRepository = lookupRepository(repositoryFile);
- List<String> children = Arrays.asList(myRepository.getWorkTree().list());
+ List<String> children = Arrays
+ .asList(myRepository.getWorkTree().list());
List<String> treeChildren = myRepoViewUtil.getWorkdirItem(tree,
repositoryFile).expand().getNodes();
assertTrue(children.containsAll(treeChildren)
@@ -584,8 +585,9 @@ public class GitRepositoriesViewTest extends GitRepositoriesViewTestBase {
SWTBotTreeItem masterNode = localBranchesItem.getNode("master");
masterNode.select();
ContextMenuHelper.clickContextMenu(tree, "Create Branch...");
- SWTBotShell createBranchShell = bot.shell("Create Branch");
- createBranchShell.bot().text("").setText("abc");
+ SWTBotShell createBranchShell = bot
+ .shell(UIText.CreateBranchWizard_NewBranchTitle);
+ createBranchShell.bot().textWithId("BranchName").setText("abc");
createBranchShell.bot().checkBox().deselect();
createBranchShell.bot().button(IDialogConstants.FINISH_LABEL).click();
refreshAndWait();
@@ -616,14 +618,15 @@ public class GitRepositoriesViewTest extends GitRepositoriesViewTestBase {
// create first branch (abc)
masterNode.select();
ContextMenuHelper.clickContextMenu(tree, "Create Branch...");
- SWTBotShell createBranchShell = bot.shell("Create Branch");
- createBranchShell.bot().text("").setText("abc");
+ SWTBotShell createBranchShell = bot
+ .shell(UIText.CreateBranchWizard_NewBranchTitle);
+ createBranchShell.bot().textWithId("BranchName").setText("abc");
createBranchShell.bot().checkBox().deselect();
createBranchShell.bot().button(IDialogConstants.FINISH_LABEL).click();
// create second branch (123)
ContextMenuHelper.clickContextMenu(tree, "Create Branch...");
- createBranchShell = bot.shell("Create Branch");
- createBranchShell.bot().text("").setText("123");
+ createBranchShell = bot.shell(UIText.CreateBranchWizard_NewBranchTitle);
+ createBranchShell.bot().textWithId("BranchName").setText("123");
createBranchShell.bot().checkBox().deselect();
createBranchShell.bot().button(IDialogConstants.FINISH_LABEL).click();
refreshAndWait();

Back to the top