@Override
 public void finish() {
   log.info("Finishing '" + title + "' Dialog");
   new OkButton().click();
   new WaitWhile(new ShellWithTextIsActive(title), TimePeriod.NORMAL);
   AbstractWait.sleep(TimePeriod.SHORT);
 }
 private void clearAllDriverLibraries() {
   if (new DefaultList().getListItems().length > 0) {
     new PushButton("Clear All").click();
   } else {
     log.info("No drivers to clean, skipped");
   }
 }
  @After
  public void cleanUp() {
    OpenShiftExplorerView explorer = new OpenShiftExplorerView();
    explorer.open();

    OpenShift3Connection connection = null;
    try {
      connection = explorer.getOpenShift3Connection();
    } catch (JFaceLayerException ex) {
      // There is no connection with such username, nothing happens
    }

    if (connection != null) {
      connection.select();
      connection.expand();

      new WaitWhile(new JobIsRunning(), TimePeriod.LONG);

      List<OpenShiftProject> projects = connection.getAllProjects();
      if (!projects.isEmpty()) {
        for (OpenShiftProject project : projects) {
          log.info("Removing OpenShift project");
          project.delete();
          connection.refresh();
        }
      }
    }
  }
 private void deployProject(String deployableProject, ProjectExplorer explorer) {
   log.info("DEPLOYING " + deployableProject);
   explorer.activate();
   Project project = explorer.getProject(deployableProject);
   project.select();
   new ContextMenu("Run As", "1 Run on Server").select();
   new WizardDialog().finish();
 }
 public CreateDriverDialog setDriverClass(String driverClass) {
   log.info("Set driver class to: '" + driverClass + "'");
   new DefaultTabItem("Properties").activate();
   new DefaultTreeItem(new DefaultTree(0), "General", "Driver Class").doubleClick();
   new DefaultText().setText(driverClass);
   activate();
   return this;
 }
 public CreateDriverDialog setConnectionUrl(String connectionUrl) {
   log.info("Set driver connection url to: '" + connectionUrl + "'");
   new DefaultTabItem("Properties").activate();
   new DefaultTreeItem(new DefaultTree(0), "General", "Connection URL").doubleClick();
   new DefaultText().setText(connectionUrl);
   activate();
   return this;
 }
 public CreateDriverDialog setDatabaseName(String databaseName) {
   log.info("Set driver database name to: '" + databaseName + "'");
   new DefaultTabItem("Properties").activate();
   new DefaultTreeItem(new DefaultTree(0), "General", "Database Name").doubleClick();
   new DefaultText().setText(databaseName);
   activate();
   return this;
 }
示例#8
0
 @Test
 public void logTest() {
   log.debug("debug");
   log.error("error");
   log.fatal("fatal");
   log.warn("info");
   log.info("info");
 }
 public CreateDriverDialog addDriver(String path) {
   log.info("Set driver path to: '" + path + "'");
   new DefaultTabItem("JAR List").activate();
   clearAllDriverLibraries();
   addItem(path);
   addItem(path);
   removeDriverLibrary(path);
   return this;
 }
示例#10
0
 @Test
 public void menuWithMnemonicTest() {
   log.info("menu with mnemonic test");
   new DefaultShell();
   Menu m = new ShellMenu("File", "New", "Other...");
   m.select();
   Shell s = new DefaultShell("New");
   s.close();
 }
示例#11
0
 @Test
 public void preferencesMenuTest() {
   log.info("Preferences menu test");
   new DefaultShell();
   Menu m = new ShellMenu("Window", "Preferences");
   m.select();
   Shell s = new DefaultShell("Preferences");
   s.close();
 }
 public ViewDialog chceckSupportUpdateIsSystemTable(boolean supportTable, boolean isSystemTable) {
   log.info("Setting checkboxes to ");
   new DefaultTabItem("Properties").activate();
   if (!new CheckBox("Supports Update").isChecked() && supportTable) {
     new CheckBox("Supports Update").click();
   }
   if (!new CheckBox("Is System Table").isChecked() && isSystemTable) {
     new CheckBox("Is System Table").click();
   }
   return this;
 }
 public CreateDriverDialog setDriverClassGeneric(String driverClass) {
   log.info("Set driver class to: '" + driverClass + "'");
   new DefaultTabItem("Properties").activate();
   new DefaultTreeItem(new DefaultTree(0), "General", "Driver Class").doubleClick();
   new PushButton("...").click();
   new DefaultShell("Available Classes from Jar List");
   new DefaultText().setText(driverClass);
   new PushButton("OK").click();
   activate();
   return this;
 }
示例#14
0
 @Test
 public void aboutMenuTest() {
   log.info("About menu test");
   new DefaultShell();
   @SuppressWarnings("unchecked")
   Menu m =
       new ShellMenu(
           new WithMnemonicTextMatcher("Help"), new WithTextMatcher(new RegexMatcher("About.*")));
   m.select();
   Shell s = new DefaultShell();
   s.close();
 }
示例#15
0
  @Test
  public void regexMenuTest() {

    log.info("regex menu test");
    try {
      RegexMatcher[] regexMatchers = {new RegexMatcher("Win.*"), new RegexMatcher("Pref.*")};
      WithTextMatchers m = new WithTextMatchers(regexMatchers);
      new ShellMenu(m.getMatchers());
    } catch (SWTLayerException e) {
      fail("there should be no exception");
    }
  }
示例#16
0
  @Test
  public void unavailableMenuTest() {
    log.info("unavailable regex menu test");
    try {
      RegexMatcher[] regexMatchers = {new RegexMatcher("Win.*"), new RegexMatcher("Prefz.*")};
      WithTextMatchers m = new WithTextMatchers(regexMatchers);
      new ShellMenu(m.getMatchers());
      fail("exception should be thrown");
    } catch (SWTLayerException e) { // do nothing

    }
  }
 public void ok() {
   new PushButton("Apply").click();
   try {
     new DefaultShell("Update project required");
     new PushButton("Yes").click();
     new DefaultShell("Preferences");
   } catch (SWTLayerException ex) {
     log.info("Update project required shell was not found.");
   } finally {
     new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
     new WorkbenchPreferenceDialog().ok();
   }
 }
 public ViewDialog addColumn(String name, String dataType, String length) {
   log.info("Adding column " + name + " " + dataType + " " + length);
   new DefaultTabItem("Columns").activate();
   new PushButton("Add").click();
   DefaultTable table = new DefaultTable();
   table.getItem(table.rowCount() - 1).select();
   // TODO TEIIDDES-2903
   new PushButton("Edit...").click();
   AbstractWait.sleep(TimePeriod.SHORT);
   new DefaultShell("Edit Column");
   new LabeledText("Name").setText(name);
   new LabeledCombo("Data Type").setSelection(dataType);
   new LabeledText("Length").setText(length);
   new OkButton().click();
   AbstractWait.sleep(TimePeriod.SHORT);
   this.activate();
   return this;
 }
 @Override
 public boolean shouldRun(FrameworkMethod method) {
   boolean skipUnfixedIssues =
       Boolean.valueOf(System.getProperty("reddeer.skipUnfixedIssues", "false"));
   if (!skipUnfixedIssues) {
     return true;
   }
   JiraClient jiraClient = new JiraClient();
   for (Annotation annotation : method.getMethod().getDeclaredAnnotations()) {
     if (annotation instanceof Jira) {
       String issueId = ((Jira) annotation).value();
       if (!jiraClient.isIssueClosed(issueId)) {
         log.info(
             "Issue '" + issueId + "' is still open, skipping test '" + method.getName() + "'");
         return false;
       }
     }
   }
   return true;
 }
  protected static Collection<Quickstart> createQuickstartsList() {
    ArrayList<Quickstart> resultList = new ArrayList<Quickstart>();
    ArrayList<String> specificQuickstarts = new ArrayList<String>();
    if (System.getProperty("specificQuickstarts") != null
        && !System.getProperty("specificQuickstarts").trim().equals("${specificQuickstarts}")) {
      specificQuickstarts =
          new ArrayList<String>(
              Arrays.asList(System.getProperty("specificQuickstarts").trim().split(",")));
    }
    File file = new File(System.getProperty("examplesLocation"));
    FileFilter directoryFilter =
        new FileFilter() {

          @Override
          public boolean accept(File arg0) {
            return arg0.isDirectory();
          }
        };
    for (File f : file.listFiles(directoryFilter)) {
      // if (f.getAbsolutePath().contains("picketlink") ||
      // f.getAbsolutePath().contains("wsat")) { // JBIDE-18497
      // // Picketlink
      // // quickstart
      // // is
      // // not
      // // working
      // QuickstartsReporter.getInstance().addError(new
      // Quickstart("Picketlink", f.getAbsolutePath()),
      // "Picketlink was skipped due to JBIDE-18497");
      // continue;
      // }
      if (!f.getPath().contains("/.")) {
        if (specificQuickstarts.size() == 0 || specificQuickstarts.contains(f.getName())) {
          log.info("PROCESSING " + f.getAbsolutePath());
          Quickstart qstart = new Quickstart(f.getName(), f.getAbsolutePath());
          resultList.add(qstart);
        }
      }
    }
    return resultList;
  }
 @Override
 public void finish() {
   log.info("Finishing '" + title + "' Dialog");
   new PushButton("OK").click();
 }
 public ViewDialog setDescription(String value) {
   log.info("Setting description to '" + value + "'");
   new DefaultTabItem("Properties").activate();
   new DefaultStyledText().setText(value);
   return this;
 }
 /**
  * Sets Android SDK Location to androidSDKLocation
  *
  * @param androidSDKLocation
  */
 public void setAndroidSDKLocation(String androidSDKLocation) {
   log.info("Setting Android SDK Location to: " + androidSDKLocation);
   findAdnroidSDKLocation().setText("");
   KeyboardFactory.getKeyboard().type(androidSDKLocation);
 }
 public ViewDialog setCardinality(String value) {
   log.info("Setting cardinality to '" + value + "'");
   new DefaultTabItem("Properties").activate();
   new LabeledText("Cardinality").setText(value);
   return this;
 }
 public ViewDialog setNameInSource(String name) {
   log.info("Setting name is source to '" + name + "'");
   new LabeledText("Name In Source").setText(name);
   return this;
 }
 public ViewDialog setName(String name) {
   log.info("Setting table name to '" + name + "'");
   new LabeledText("Name").setText(name);
   return this;
 }
 public CreateDriverDialog() {
   super("New Driver Definition");
   log.info("New Driver Definition dialog is opened");
 }
 /** First must be run selectTemplate */
 public CreateDriverDialog setName(String name) {
   log.info("Set driver name to: '" + name + "'");
   activate();
   new LabeledText("Driver name:").setText(name);
   return this;
 }
 private void unDeployModule(String moduleName, Server server) {
   log.info("UNDEPLOYING MODULE" + moduleName + " ON SERVER " + server.getLabel());
   ServerModule serverModule = server.getModule(new RegexMatcher(".*" + moduleName + ".*"));
   serverModule.remove();
   new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
 }