use of org.eclipse.egit.ui.common.RepoRemoteBranchesPage in project egit by eclipse.
the class GitCloneWizardTest method canCloneARemoteRepo.
@Test
public void canCloneARemoteRepo() throws Exception {
destRepo = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile(), "test1");
importWizard.openWizard();
RepoPropertiesPage propertiesPage = importWizard.openRepoPropertiesPage();
RepoRemoteBranchesPage remoteBranches = propertiesPage.nextToRemoteBranches(r.getUri());
cloneRepo(destRepo, remoteBranches);
bot.button("Cancel").click();
}
use of org.eclipse.egit.ui.common.RepoRemoteBranchesPage in project egit by eclipse.
the class GitCloneWizardTest method alteringSomeParametersDuringClone.
@Test
public void alteringSomeParametersDuringClone() throws Exception {
destRepo = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile(), "test2");
importWizard.openWizard();
RepoPropertiesPage repoProperties = importWizard.openRepoPropertiesPage();
RepoRemoteBranchesPage remoteBranches = repoProperties.nextToRemoteBranches(r.getUri());
remoteBranches.deselectAllBranches();
remoteBranches.assertErrorMessage("At least one branch must be selected.");
remoteBranches.assertNextIsDisabled();
remoteBranches.selectBranches(SampleTestRepository.FIX);
remoteBranches.assertNextIsEnabled();
WorkingCopyPage workingCopy = remoteBranches.nextToWorkingCopy();
workingCopy.setDirectory(destRepo.toString());
workingCopy.assertBranch(SampleTestRepository.FIX);
workingCopy.setRemoteName("src");
workingCopy.waitForCreate();
// Some random sampling to see we got something. We do not test
// the integrity of the repository here. Only a few basic properties
// we'd expect from a clone made this way, that would possibly
// not hold true given other parameters in the GUI.
Repository repository = FileRepositoryBuilder.create(new File(destRepo, Constants.DOT_GIT));
assertNotNull(repository.resolve("src/" + SampleTestRepository.FIX));
// we didn't clone that one
assertNull(repository.resolve("src/master"));
// and a local master initialized from origin/master (default!)
assertEquals(repository.resolve("stable"), repository.resolve("src/stable"));
// A well known tag
assertNotNull(repository.resolve(Constants.R_TAGS + SampleTestRepository.v2_0_name).name());
// lots of refs
assertTrue(repository.getAllRefs().size() >= 4);
bot.button("Cancel").click();
}
use of org.eclipse.egit.ui.common.RepoRemoteBranchesPage in project egit by eclipse.
the class GitCloneWizardTest method clonedRepositoryShouldExistOnFileSystem.
@Test
public void clonedRepositoryShouldExistOnFileSystem() throws Exception {
importWizard.openWizard();
RepoPropertiesPage repoProperties = importWizard.openRepoPropertiesPage();
RepoRemoteBranchesPage remoteBranches = repoProperties.nextToRemoteBranches(r.getUri());
remoteBranches.assertRemoteBranches(SampleTestRepository.FIX, Constants.MASTER);
WorkingCopyPage workingCopy = remoteBranches.nextToWorkingCopy();
workingCopy.assertWorkingCopyExists();
bot.button("Cancel").click();
}
Aggregations