use of org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard in project jbosstools-openshift by jbosstools.
the class ImportApplicationWizardGitTest method testNoRepoRemote.
@Test
public void testNoRepoRemote() {
createRepo();
service.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
ImportApplicationWizard importWizard = new ImportApplicationWizard();
assertProjectExistsErrorInWizard(importWizard);
GitCloningWizardPage gitCloningWizardPage = new GitCloningWizardPage();
gitCloningWizardPage.useExistingRepository(true);
assertGitRemoteErrorInWizzard(importWizard);
importWizard.cancel();
}
use of org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard in project jbosstools-openshift by jbosstools.
the class ServerSettingsWizardPage method importProject.
public ImportApplicationWizard importProject() {
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
new PushButton("Import...").click();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
return new ImportApplicationWizard();
}
use of org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard in project jbosstools-openshift by jbosstools.
the class ServerAdapterFromResourceTest method importProject.
@BeforeClass
public static void importProject() {
explorer = new OpenShiftExplorerView();
explorer.open();
project = explorer.getOpenShift3Connection(connectionReq.getConnection()).getProject(DatastoreOS3.TEST_PROJECT);
project.getServicesWithName(OpenShiftResources.NODEJS_SERVICE).get(0).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
ImportApplicationWizard appWizard = new ImportApplicationWizard();
try {
CheckBox checkBox = new CheckBox("Do not clone - use existing repository");
if (checkBox.isEnabled()) {
checkBox.toggle(true);
LOGGER.debug("Using existing project, skipping import");
}
} catch (RedDeerException ex) {
LOGGER.debug("No existing project found, importing");
}
try {
appWizard.finish();
} catch (WaitTimeoutExpiredException ex) {
// When running test in suite, it needs to be selected correct build config(in OpenShift instance could be more build configs)
appWizard.selectExistingBuildConfiguration(OpenShiftResources.NODEJS_APP_DEPLOYMENT_CONFIG);
appWizard.finish();
}
new WaitUntil(new OpenShiftResourceExists(Resource.DEPLOYMENT, OpenShiftResources.NODEJS_APP_REPLICATION_CONTROLLER, ResourceState.UNSPECIFIED, DatastoreOS3.TEST_PROJECT, connectionReq.getConnection()), TimePeriod.LONG);
}
use of org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard in project jbosstools-openshift by jbosstools.
the class ImportApplicationWizardGitTest method testNotMatchingRepoRemote.
@Test
public void testNotMatchingRepoRemote() {
Git repo = createRepo();
setRemote(repo);
service.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
ImportApplicationWizard importWizard = new ImportApplicationWizard();
assertProjectExistsErrorInWizard(importWizard);
GitCloningWizardPage gitCloningWizardPage = new GitCloningWizardPage();
gitCloningWizardPage.useExistingRepository(true);
assertGitRemoteErrorInWizzard(importWizard);
importWizard.cancel();
}
use of org.jboss.tools.openshift.reddeer.wizard.importapp.ImportApplicationWizard in project jbosstools-openshift by jbosstools.
the class ImportApplicationWizardTest method testImportOpenShift3AppViaOpenshiftViewTwice.
@Test
public void testImportOpenShift3AppViaOpenshiftViewTwice() {
testImportOpenShift3AppViaOpenshiftView();
ImportApplicationWizard importWizard = OpenShiftUtils.openImportApplicationWizardFromOpenshiftView(project);
GitCloningWizardPage gitWizardPage = new GitCloningWizardPage();
assertTrue("There should be an error in the wizard (There already is a project with specified name)", gitWizardPage.projectExists());
gitWizardPage.useExistingRepository(true);
importWizard.finishAndOverrideExisting();
assertProjectExistsInProjectView(OpenShiftResources.NODEJS_GIT_NAME);
}
Aggregations