Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Baumgart2011-02-17 17:09:08 +0000
committerMatthias Sohn2011-02-21 00:09:52 +0000
commit55e21b6e7943b206b819be558f14b637db4658ea (patch)
treeaaf5e8cb7195c02f2c49c7192db446c359cf7c94
parentb2ec5166701df49179a3571c3b329976c316f1d8 (diff)
downloadegit-55e21b6e7943b206b819be558f14b637db4658ea.tar.gz
egit-55e21b6e7943b206b819be558f14b637db4658ea.tar.xz
egit-55e21b6e7943b206b819be558f14b637db4658ea.zip
Fix failing GitRepositoriesViewTest
GitRepositoriesViewTest failed due to a focus handling problem. Change-Id: Ifb75c3942d38573682b8eac26fa1701f9aaa49d2 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java9
1 files changed, 8 insertions, 1 deletions
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 cf78ac110d..de26779474 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
@@ -36,6 +36,7 @@ import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotPerspective;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.utils.TableCollection;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -323,7 +324,13 @@ public class GitRepositoriesViewTest extends GitRepositoriesViewTestBase {
shell = bot.shell(wizardTitle);
// try import existing project first
bot.radio(UIText.GitSelectWizardPage_ImportExistingButton).click();
- shell.bot().button(IDialogConstants.NEXT_LABEL).click();
+ SWTBotButton button = shell.bot().button(IDialogConstants.NEXT_LABEL);
+ // Set focus on the next button. If this is not done, Wizard Framework restores
+ // the focus to the "Import as &General Project" radio button. Setting the focus on
+ // the radio button selects the button and causes the test to fail.
+ // See also SWTBot Bug 337465
+ button.setFocus();
+ button.click();
waitInUI();
shell.bot().tree().getAllItems()[0].check();
// add to working set

Back to the top