Esempio n. 1
0
  @Test
  public void finish() {
    assertTrue("Finish button should be enabled", wizardDialog.isFinishEnabled());
    wizardDialog.finish();

    Shell shell = new DefaultShell();
    assertTrue(shell.getText().equals(new WorkbenchShell().getText()));
  }
Esempio n. 2
0
  @Test
  public void next() {
    assertTrue("Next button should be enabled", wizardDialog.isNextEnabled());
    wizardDialog.next();

    CLabel label = new DefaultCLabel();
    assertThat(label.getText(), is("B"));
  }
Esempio n. 3
0
  @Test
  public void back() {
    wizardDialog.next();
    assertTrue("Back button should be enabled", wizardDialog.isBackEnabled());
    wizardDialog.back();

    CLabel label = new DefaultCLabel();
    assertThat(label.getText(), is("A"));
  }
  @Before
  public void prepare() {
    newProject(PROJECT_NAME);

    ProjectExplorer pe = new ProjectExplorer();
    pe.selectProjects(PROJECT_NAME); // this will set context for forge
    WizardDialog wd = getWizardDialog("ejb-setup", "(EJB: Setup).*");
    new LabeledCombo("EJB Version:").setSelection(EJB_VERSION);
    wd.finish(TimePeriod.getCustom(600));
  }
Esempio n. 5
0
  @Test
  public void cancel() {
    wizardDialog.cancel();

    Shell shell = new DefaultShell();
    assertTrue(shell.getText().equals(new WorkbenchShell().getText()));
  }
  @Override
  public void processAdditionalWizardPages(WizardDialog dialog) {
    dialog.next();
    dialog.next();
    dialog.next();
    new LabeledCombo("Type:")
        .setSelection(
            JBossPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER.toString());
    dialog.next();
    dialog.next();
    new LabeledCombo("Database Type:").setSelection("HSQL");
    new LabeledCombo("Connection profile:").setSelection(SWTTestExt.configuredState.getDB().name);
    dialog.next();
    new LabeledCombo("Type:")
        .setSelection(
            JBossJSFPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER.toString());

    processWizardPageJSFPortletCapabilities();
  }
Esempio n. 7
0
 @Test
 public void getPageDescription() {
   final String currentPageDescription = wizardDialog.getPageDescription();
   assertTrue(
       "Expected current page description is '"
           + TestingWizard.PAGE_DESCRIPTION
           + "'"
           + "\nbut current page description is '"
           + currentPageDescription
           + "'",
       TestingWizard.PAGE_DESCRIPTION.equals(currentPageDescription));
 }
Esempio n. 8
0
 @Test
 public void getPageTitle() {
   final String currentPageTitle = wizardDialog.getPageTitle();
   assertTrue(
       "Expected current page title is '"
           + TestingWizard.PAGE_TITLE
           + "'"
           + "\nbut current page title is '"
           + currentPageTitle
           + "'",
       TestingWizard.PAGE_TITLE.equals(currentPageTitle));
 }
Esempio n. 9
0
 @Test
 public void finish_notEnabled() {
   wizard.setFinishEnabled(false);
   assertFalse("Finish button should be disabled", wizardDialog.isFinishEnabled());
 }
Esempio n. 10
0
 @Test
 public void back_notEnabled() {
   assertFalse("Back button should be disabled", wizardDialog.isBackEnabled());
 }
Esempio n. 11
0
 @Test
 public void next_notEnabled() {
   wizardDialog.next();
   assertFalse("Next button should be disabled", wizardDialog.isNextEnabled());
 }