use of org.jboss.tools.openshift.reddeer.view.resources.ServerAdapter in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method clean.
@After
public void clean() {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
pe.deleteAllProjects();
try {
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new ServerAdapter(Version.OPENSHIFT3, OpenShiftResources.NODEJS_SERVICE).delete();
} catch (OpenShiftToolsException ex) {
// do nothing, adapter does not exists
}
}
use of org.jboss.tools.openshift.reddeer.view.resources.ServerAdapter in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method setUp.
@Before
public void setUp() {
TestUtils.setUpOcBinary();
TestUtils.cleanupGitFolder(OpenShiftResources.NODEJS_GIT_NAME);
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
this.connection = explorer.getOpenShift3Connection(requiredConnection.getConnection());
this.project = connection.getProject(requiredProject.getProjectName());
this.project.expand();
// import application
this.project.getService(OpenShiftResources.NODEJS_SERVICE).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.IMPORT_APPLICATION).select();
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
// setup server adapter
explorer.activate();
this.project.getService(OpenShiftResources.NODEJS_SERVICE).select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_ADAPTER_FROM_EXPLORER).select();
new DefaultShell(OpenShiftLabel.Shell.SERVER_ADAPTER_SETTINGS);
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(""), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
assertTrue("OpenShift 3 server adapter was not created.", new ServerAdapterExists(Version.OPENSHIFT3, OpenShiftResources.NODEJS_SERVICE, "Service").test());
// restart in debug
this.adapter = new ServerAdapter(Version.OPENSHIFT3, OpenShiftResources.NODEJS_SERVICE, "Service");
this.adapter.select();
new ContextMenuItem("Restart in Debug").select();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
}
Aggregations