Search in sources :

Example 1 with OpenShift3PreferencePage

use of org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage in project jbosstools-openshift by jbosstools.

the class OCBinaryLocationTest method openDialogAndSelectPage.

@Before
public void openDialogAndSelectPage() {
    dialog = new WorkbenchPreferenceDialog();
    page = new OpenShift3PreferencePage(dialog);
    dialog.open();
    dialog.select(page);
}
Also used : OpenShift3PreferencePage(org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) Before(org.junit.Before)

Example 2 with OpenShift3PreferencePage

use of org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage in project jbosstools-openshift by jbosstools.

the class TestUtils method setOCBinaryPath.

private static void setOCBinaryPath(boolean setUp) {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    OpenShift3PreferencePage page = new OpenShift3PreferencePage(dialog);
    dialog.open();
    dialog.select(page);
    if (setUp) {
        page.setOCLocation(OpenShiftCommandLineToolsRequirement.getDefaultOCLocation());
    } else {
        page.clearOCLocation();
    }
    page.apply();
    dialog.ok();
}
Also used : OpenShift3PreferencePage(org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)

Example 3 with OpenShift3PreferencePage

use of org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage in project jbosstools-openshift by jbosstools.

the class OpenShiftCommandLineToolsRequirement method openDialogAndSelectPage.

private void openDialogAndSelectPage() {
    dialog = new WorkbenchPreferenceDialog();
    page = new OpenShift3PreferencePage(dialog);
    dialog.open();
    dialog.select(page);
}
Also used : OpenShift3PreferencePage(org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)

Example 4 with OpenShift3PreferencePage

use of org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage in project jbosstools-openshift by jbosstools.

the class CDKTestUtils method setOCToPreferences.

public static void setOCToPreferences(String ocPath) {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    OpenShift3PreferencePage page = new OpenShift3PreferencePage(dialog);
    dialog.open();
    dialog.select(page);
    page.setOCLocation(ocPath);
    try {
        new WaitUntil(new ControlIsEnabled(new PushButton("Apply")), TimePeriod.DEFAULT);
    } catch (WaitTimeoutExpiredException exc) {
        fail("WaitTimeoutExpiredException occured while processing oc binary on path " + ocPath);
    }
    page.apply();
    dialog.cancel();
}
Also used : OpenShift3PreferencePage(org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) WaitTimeoutExpiredException(org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

WorkbenchPreferenceDialog (org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)4 OpenShift3PreferencePage (org.jboss.tools.openshift.reddeer.preference.page.OpenShift3PreferencePage)4 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)1 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 Before (org.junit.Before)1