Package org.eclipse.swtbot.swt.finder.widgets

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTable


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotTable table(int index) {
    Matcher matcher = allOf(widgetOfType(Table.class));
    return new SWTBotTable((Table) widget(matcher, index), matcher);
  }
View Full Code Here


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotTable tableWithLabelInGroup(String label, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(Table.class), withLabel(label), inGroup(inGroup));
    return new SWTBotTable((Table) widget(matcher, index), matcher);
  }
View Full Code Here

  }

  @Test
  public void testTagDialogShowExistingTags() throws Exception {
    SWTBotShell tagDialog = openTagDialog();
    SWTBotTable table = tagDialog.bot().tableWithLabel(
        UIText.CreateTagDialog_existingTags);
    TestUtil.waitUntilTableHasRowWithText(tagDialog.bot(), table, "SomeTag", 10000);
  }
View Full Code Here

    clickReplaceWith(menuLabel);
    bot.shell(UIText.DiscardChangesAction_confirmActionTitle).bot()
        .button(IDialogConstants.OK_LABEL).click();
    selectDialog = bot.shell(UIText.CommitSelectDialog_WindowTitle);
    // Select first parent, which should be the master commit
    SWTBotTable table = selectDialog.bot().table();
    assertEquals("Master commit", table.cell(0, 1));
    table.select(0);
    executeReplace(selectDialog);

    String replacedContent = getTestFileContent();
    assertThat(replacedContent, not(contentAfterMerge));
  }
View Full Code Here

  @Test
  @Ignore
  public void testRebaseAlreadyUpToDate() throws Exception {
    Repository repo = lookupRepository(repoFile);
    Ref stable = repo.getRef("stable");
    SWTBotTable table = getHistoryViewTable(PROJ1);
    SWTBotTableItem stableItem = getTableItemWithId(table, stable.getObjectId());

    stableItem.contextMenu(UIText.GitHistoryPage_rebaseMenuItem).click();
    TestUtil.joinJobs(JobFamilies.REBASE);
  }
View Full Code Here

    return bot.table(0).rowCount();
  }

  public boolean containsRepo(String projectName) {
    SWTBotTable table = bot.table(0);
    int repoCount = configuredRepoCount();

    for (int i = 0; i < repoCount; i++) {
      String rowName = table.getTableItem(i).getText();
      if (rowName.contains(projectName))
        return true;
    }
    return false;
  }
View Full Code Here

  public void selectAndCloneRepository(String repoName) throws Exception {
    SWTBotShell importShell = bot.shell("Import Projects from Git")
        .activate();

    SWTBotTable table = bot.table(0);
    for (int i = 0; i < table.rowCount(); i++) {
      String rowName = table.getTableItem(i).getText();
      if (rowName != null && rowName.startsWith(repoName)) {
        table.select(i);
        break;
      }
    }
    // TODO investigate why we need Thread.sleep here
    bot.button("Next >").click();
View Full Code Here

    }
  }

  @Test
  public void testOpenHistoryOnProject() throws Exception {
    SWTBotTable table = getHistoryViewTable(PROJ1);
    int rowCount = table.rowCount();
    assertTrue(table.rowCount() > 0);
    assertEquals(table.getTableItem(rowCount - 1).getText(1),
        "Initial commit");
  }
View Full Code Here

  @Test
  public void testAddBranch() throws Exception {
    Repository repo = lookupRepository(repoFile);
    assertNull(repo.resolve(Constants.R_HEADS + "NewBranch"));
    SWTBotTable table = getHistoryViewTable(PROJ1);
    SWTBotTableItem item = table.getTableItem(0);
    item.select();
    ContextMenuHelper.clickContextMenu(table,
        UIText.GitHistoryPage_CreateBranchMenuLabel);
    SWTBotShell dialog = bot
        .shell(UIText.CreateBranchWizard_NewBranchTitle);
View Full Code Here

  @Test
  public void testAddTag() throws Exception {
    Repository repo = lookupRepository(repoFile);
    assertNull(repo.resolve(Constants.R_TAGS + "NewTag"));
    final SWTBotTable table = getHistoryViewTable(PROJ1);
    table.getTableItem(0).select();
    final RevCommit[] commit = new RevCommit[1];

    Display.getDefault().syncExec(new Runnable() {

      public void run() {
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.