use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class TemplateParametersTest method testModifyTemplateParameter.
@Test
public void testModifyTemplateParameter() {
new DefaultTable().getItem(SOURCE_REPOSITORY_URL).select();
new PushButton(OpenShiftLabel.Button.EDIT).click();
new DefaultShell(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER);
new DefaultText().setText(PERSONAL_GIT_REPO_URI);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.EDIT_TEMPLATE_PARAMETER));
new DefaultShell(OpenShiftLabel.Shell.NEW_APP_WIZARD);
assertTrue("New value of git repo URI has not been modified successfully.", new DefaultTable().getItem(SOURCE_REPOSITORY_URL).getText(1).equals(PERSONAL_GIT_REPO_URI));
new PushButton(OpenShiftLabel.Button.RESET).click();
try {
new WaitUntil(new TableContainsItem(new DefaultTable(), SOURCE_REPOSITORY_URL_VALUE, 1), TimePeriod.DEFAULT);
} catch (WaitTimeoutExpiredException ex) {
fail("Value for git repo URI has not been reset.");
}
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class LabelsTest method openResourceLabelShell.
private void openResourceLabelShell() {
new PushButton(OpenShiftLabel.Button.ADD).click();
new DefaultShell(OpenShiftLabel.Shell.RESOURCE_LABEL);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class DeleteProjectTest method testDeleteProjectViaManageProjectsShell.
@Test
public void testDeleteProjectViaManageProjectsShell() {
projectExists = true;
OpenShiftExplorerView explorer = new OpenShiftExplorerView();
explorer.open();
OpenShift3Connection connection = explorer.getOpenShift3Connection(connectionReq.getConnection());
connection.select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.EDIT_OS_PROJECTS).select();
new DefaultShell(OpenShiftLabel.Shell.MANAGE_OS_PROJECTS);
new DefaultTable().getItem(PROJECT_NAME).select();
new PushButton(OpenShiftLabel.Button.REMOVE).click();
new DefaultShell(OpenShiftLabel.Shell.DELETE_RESOURCE);
new OkButton().click();
projectExists = false;
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_OS_PROJECT), TimePeriod.LONG);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ControlIsEnabled(new PushButton("Refresh...")), TimePeriod.DEFAULT);
new PushButton("Refresh...").click();
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
new WaitUntil(new ProjectDoesNotExistInManageOSProject(new DefaultShell(OpenShiftLabel.Shell.MANAGE_OS_PROJECTS), PROJECT_NAME), TimePeriod.LONG);
assertFalse("There should not be present project in the table.", new DefaultTable().containsItem(PROJECT_NAME));
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.MANAGE_OS_PROJECTS), TimePeriod.LONG);
assertFalse("Project is still presented in OpenShift explorer under a connection.", connection.projectExists(PROJECT_NAME));
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method testPodPathWidgetAccessibility.
@Test
public void testPodPathWidgetAccessibility() {
openNewServerAdapterWizard();
next();
new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
new CheckBox("Use inferred Pod Deployment Path").toggle(false);
LabeledText podPath = new LabeledText("Pod Deployment Path: ");
String podDeploymentPath = "/opt/eap/standalone/deployments/";
podPath.setText("");
assertFalse("Next button should be disable if pod path is empty is selected.", nextButtonIsEnabled());
podPath.setText(podDeploymentPath);
assertTrue("Next button should be reeenabled if pod path is correctly filled in.", nextButtonIsEnabled());
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-openshift by jbosstools.
the class ServerAdapterWizardHandlingTest method testSourcePathWidgetAccessibility.
@Test
public void testSourcePathWidgetAccessibility() {
openNewServerAdapterWizard();
new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
next();
new PushButton(OpenShiftLabel.Button.ADVANCED_OPEN).click();
LabeledText srcPath = new LabeledText("Source Path: ");
String srcPathText = srcPath.getText();
srcPath.setText("");
assertFalse("Next button should be disable if source path is empty is selected.", nextButtonIsEnabled());
srcPath.setText(srcPathText);
assertTrue("Next button should be reeenabled if source path is correctly filled in.", nextButtonIsEnabled());
srcPath.setText("invalid path");
assertFalse("Next button should be disabled if source path is invalid or not existing.", nextButtonIsEnabled());
srcPath.setText(srcPathText);
assertTrue("Next button should be reeenabled if source path is correctly filled in.", nextButtonIsEnabled());
}
Aggregations