From a4a605f089eac37b2a455f9fe84ce21caf6f0f03 Mon Sep 17 00:00:00 2001 From: Mathias Kinzler Date: Thu, 6 May 2010 13:55:08 +0200 Subject: [PATCH] Fix UI Tests for Git Clone Bug: 311838 Change-Id: I13258edb78d0e0359424d0c4aedbca89358bdc68 Signed-off-by: Mathias Kinzler Signed-off-by: Matthias Sohn --- .../src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java | 2 -- .../org/eclipse/egit/ui/wizards/clone/GitImportRepoWizard.java | 8 ++++++-- .../src/org/eclipse/egit/ui/wizards/clone/WorkingCopyPage.java | 4 ---- .../src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java | 7 ++++++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java index 65d424e6..a818745b 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitCloneWizardTest.java @@ -193,7 +193,6 @@ public class GitCloneWizardTest { workingCopy.assertDirectory(destRepo.toString()); workingCopy.assertBranch("master"); workingCopy.assertRemoteName("origin"); - workingCopy.doNotImportProjectsAfterClone(); workingCopy.waitForCreate(); // Some random sampling to see we got something. We do not test @@ -253,7 +252,6 @@ public class GitCloneWizardTest { workingCopy.setDirectory(destRepo.toString()); workingCopy.assertBranch("historical/pre-eclipse"); workingCopy.setRemoteName("src"); - workingCopy.doNotImportProjectsAfterClone(); workingCopy.waitForCreate(); // Some random sampling to see we got something. We do not test diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitImportRepoWizard.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitImportRepoWizard.java index 07147142..e4841516 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitImportRepoWizard.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/GitImportRepoWizard.java @@ -20,11 +20,15 @@ public class GitImportRepoWizard { bot.menu("File").menu("Import...").click(); bot.shell("Import").activate(); - bot.tree().expandNode("Git").select("Git Repository"); + bot.tree().expandNode("Git").select("Projects from Git"); bot.button("Next >").click(); - bot.shell("Import Git Repository").activate(); + bot.shell("Import Projects from Git").activate(); + + bot.button("Clone...").click(); + + bot.shell("Clone Git Repository").activate(); return new RepoPropertiesPage(); } diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/WorkingCopyPage.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/WorkingCopyPage.java index eb91efcb..2a627c57 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/WorkingCopyPage.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/clone/WorkingCopyPage.java @@ -31,10 +31,6 @@ public class WorkingCopyPage { assertText(remoteName, bot.textWithLabel("Remote name:")); } - public void doNotImportProjectsAfterClone() { - bot.checkBox("Import projects after clone").deselect(); - } - public void waitForCreate() { bot.button("Finish").click(); diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java index a9229e07..163561b0 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/GitCloneWizard.java @@ -105,11 +105,16 @@ public class GitCloneWizard extends Wizard { @Override public boolean performFinish() { - return performClone(false); + try { + return performClone(false); + } finally { + setWindowTitle(UIText.GitCloneWizard_title); + } } boolean performClone(boolean background) { final URIish uri = cloneSource.getSelection().getURI(); + setWindowTitle(NLS.bind(UIText.GitCloneWizard_jobName, uri.toString())); final boolean allSelected; final Collection selectedBranches; if (validSource.isSourceRepoEmpty()) { -- 2.11.4.GIT