Search in sources :

Example 1 with NewServerWizardPage

use of org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage in project jbosstools-openshift by jbosstools.

the class ServerAdapterWizardHandlingTest method openNewServerAdapterWizard.

private void openNewServerAdapterWizard() {
    NewServerWizard dialog = new NewServerWizard();
    dialog.open();
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    dialog.open();
    new WaitUntil(new JobIsKilled("Refreshing server adapter list"), TimePeriod.LONG, false);
    page.selectType(OpenShiftLabel.Others.OS3_SERVER_ADAPTER);
    dialog.next();
}
Also used : NewServerWizard(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizard) JobIsKilled(org.eclipse.reddeer.workbench.core.condition.JobIsKilled) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)

Example 2 with NewServerWizardPage

use of org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage in project jbosstools-openshift by jbosstools.

the class CDKLaunchConfigurationTest method setupServerWizardPage.

@Override
protected void setupServerWizardPage(NewMenuWizard dialog) {
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    page.selectType(SERVER_TYPE_GROUP, CDK32_SERVER_NAME);
    page.setName(getServerAdapter());
    dialog.next();
    NewCDK32ServerWizardPage containerPage = new NewCDK32ServerWizardPage();
    containerPage.setCredentials(USERNAME, PASSWORD);
    log.info("Setting hypervisor to: " + hypervisor);
    containerPage.setHypervisor(hypervisor);
    log.info("Setting binary to " + CDK32_MINISHIFT);
    containerPage.setMinishiftBinary(CDK32_MINISHIFT);
    // here comes possibility to set profile while creating server adapter
    log.info("Setting profile to: ");
    containerPage.setMinishiftProfile("");
    new WaitWhile(new SystemJobIsRunning(getJobMatcher(MINISHIFT_VALIDATION_JOB)), TimePeriod.MEDIUM, false);
}
Also used : NewCDK32ServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK32ServerWizardPage) SystemJobIsRunning(org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)

Example 3 with NewServerWizardPage

use of org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage in project jbosstools-openshift by jbosstools.

the class CDK3ServerWizardTest method testNewCDK3ServerWizard.

@Test
public void testNewCDK3ServerWizard() {
    NewCDKServerWizard dialog = (NewCDKServerWizard) CDKTestUtils.openNewServerWizardDialog();
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    page.selectType(SERVER_TYPE_GROUP, CDK3_SERVER_NAME);
    page.setName(getServerAdapter());
    dialog.next();
    NewCDK3ServerWizardPage containerPage = new NewCDK3ServerWizardPage();
    checkWizardPagewidget("Minishift Binary: ", CDK3_SERVER_NAME);
    // just check that default domain is choosen correctly
    assertTrue(containerPage.getDomain().equalsIgnoreCase(CREDENTIALS_DOMAIN));
    // needs to activate validator
    containerPage.setMinishiftBinary(EXISTING_PATH);
    // first the credentials are checked
    assertSameMessage(dialog, NO_USER);
    containerPage.setCredentials(USERNAME, PASSWORD);
    assertDiffMessage(dialog, NO_USER);
    // checking of minishift binary validation
    // test that existing folder cannot be run
    containerPage.setMinishiftBinary(EXISTING_PATH);
    assertSameMessage(dialog, CANNOT_RUN_PROGRAM);
    containerPage.setMinishiftBinary(NON_EXECUTABLE_FILE);
    assertSameMessage(dialog, NOT_EXECUTABLE);
    containerPage.setMinishiftBinary(NON_EXISTING_PATH);
    assertSameMessage(dialog, DOES_NOT_EXIST);
    containerPage.setMinishiftBinary(EXECUTABLE_FILE);
    assertSameMessage(dialog, CHECK_MINISHIFT_VERSION);
    // check compatibility of cdk version with server adapter
    containerPage.setMinishiftBinary(MOCK_CDK320);
    assertSameMessage(dialog, NOT_COMPATIBLE);
    // Positive test of proper minishift binary
    containerPage.setMinishiftBinary(MINISHIFT_PATH);
    assertDiffMessage(dialog, CHECK_MINISHIFT_VERSION);
    new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.MEDIUM, false);
    assertTrue("Expected Finish button is not enabled", dialog.isFinishEnabled());
    dialog.cancel();
}
Also used : FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) NewCDK3ServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK3ServerWizardPage) NewCDKServerWizard(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage) Test(org.junit.Test)

Example 4 with NewServerWizardPage

use of org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage in project jbosstools-openshift by jbosstools.

the class CDKServerAdapterAbstractTest method setupNewServerWizardPage.

private static void setupNewServerWizardPage(NewMenuWizard dialog, String serverAdapter, String... serverPath) {
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    // set first dialog page
    page.selectType(serverPath);
    page.setHostName(SERVER_HOST);
    page.setName(serverAdapter);
    dialog.next();
}
Also used : NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)

Example 5 with NewServerWizardPage

use of org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage in project jbosstools-openshift by jbosstools.

the class MinishiftServerWizardTest method testNewMinishiftServerWizard.

@Test
public void testNewMinishiftServerWizard() {
    NewCDKServerWizard dialog = (NewCDKServerWizard) CDKTestUtils.openNewServerWizardDialog();
    NewServerWizardPage page = new NewServerWizardPage(dialog);
    page.selectType(SERVER_TYPE_GROUP, MINISHIFT_SERVER_NAME);
    page.setName(getServerAdapter());
    dialog.next();
    NewMinishiftServerWizardPage containerPage = new NewMinishiftServerWizardPage();
    checkWizardPagewidget("Minishift Binary: ", MINISHIFT_SERVER_NAME);
    assertTrue(containerPage.getMinishiftProfile().getText().contains("minishift"));
    // checking of minishift binary validation
    // test that existing folder cannot be run
    containerPage.setMinishiftBinary(EXISTING_PATH);
    assertSameMessage(dialog, CANNOT_RUN_PROGRAM);
    containerPage.setMinishiftBinary(NON_EXECUTABLE_FILE);
    assertSameMessage(dialog, NOT_EXECUTABLE);
    containerPage.setMinishiftBinary(NON_EXISTING_PATH);
    assertSameMessage(dialog, DOES_NOT_EXIST);
    containerPage.setMinishiftBinary(EXECUTABLE_FILE);
    assertSameMessage(dialog, CHECK_MINISHIFT_VERSION);
    // check compatibility of cdk version with server adapter
    containerPage.setMinishiftBinary(MOCK_CDK311);
    assertSameMessage(dialog, NOT_COMPATIBLE);
    // check compatibility of cdk version with server adapter
    containerPage.setMinishiftBinary(MOCK_CDK320);
    assertSameMessage(dialog, NOT_COMPATIBLE);
    // check compatibility of cdk version with server adapter
    containerPage.setMinishiftBinary(MOCK_MINISHIFT131);
    assertSameMessage(dialog, NOT_COMPATIBLE);
    // Positive test of proper minishift binary
    containerPage.setMinishiftBinary(MINISHIFT_PATH);
    assertDiffMessage(dialog, CHECK_MINISHIFT_VERSION);
    new WaitUntil(new ControlIsEnabled(new FinishButton()), TimePeriod.MEDIUM, false);
    assertTrue("Expected Finish button is not enabled", dialog.isFinishEnabled());
    dialog.cancel();
}
Also used : NewMinishiftServerWizardPage(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewMinishiftServerWizardPage) FinishButton(org.eclipse.reddeer.swt.impl.button.FinishButton) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) NewCDKServerWizard(org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) NewServerWizardPage(org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage) Test(org.junit.Test)

Aggregations

NewServerWizardPage (org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizardPage)11 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)4 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)4 SystemJobIsRunning (org.jboss.tools.cdk.reddeer.core.condition.SystemJobIsRunning)4 NewCDKServerWizard (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDKServerWizard)4 Test (org.junit.Test)4 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)3 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)3 NewCDK32ServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK32ServerWizardPage)3 NewServerWizard (org.eclipse.reddeer.eclipse.wst.server.ui.wizard.NewServerWizard)2 NewCDK3ServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewCDK3ServerWizardPage)2 NewMinishiftServerWizardPage (org.jboss.tools.cdk.reddeer.server.ui.wizard.NewMinishiftServerWizardPage)2 JobIsKilled (org.eclipse.reddeer.workbench.core.condition.JobIsKilled)1 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)1