Search in sources :

Example 1 with RegistryAccountsPreferencePage

use of org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage in project linuxtools by eclipse.

the class AbstractImageBotTest method deleteRegister.

protected void deleteRegister(String serverAddress) {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    RegistryAccountsPreferencePage page = new RegistryAccountsPreferencePage(dialog);
    dialog.open();
    dialog.select(page);
    page.removeRegistry(serverAddress);
    new WaitWhile(new JobIsRunning());
    dialog.ok();
}
Also used : WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) RegistryAccountsPreferencePage(org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage)

Example 2 with RegistryAccountsPreferencePage

use of org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage in project linuxtools by eclipse.

the class AbstractImageBotTest method setUpRegister.

protected void setUpRegister(String serverAddress, String email, String userName, String password) {
    WorkbenchPreferenceDialog dialog = new WorkbenchPreferenceDialog();
    RegistryAccountsPreferencePage page = new RegistryAccountsPreferencePage(dialog);
    dialog.open();
    dialog.select(page);
    page.removeRegistry(serverAddress);
    page.addRegistry(serverAddress, email, userName, password);
    try {
        new DefaultShell("New Registry Account").setFocus();
    } catch (CoreLayerException e) {
        new DefaultShell("Preferences").setFocus();
    }
    new PushButton("Apply and Close").click();
}
Also used : DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) CoreLayerException(org.eclipse.reddeer.core.exception.CoreLayerException) RegistryAccountsPreferencePage(org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage)

Aggregations

RegistryAccountsPreferencePage (org.eclipse.linuxtools.docker.reddeer.preferences.RegistryAccountsPreferencePage)2 WorkbenchPreferenceDialog (org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)2 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)1 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)1 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)1