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

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


    assertEquals(8, syncViewTree.getAllItems().length);
  }

  protected SWTBotTreeItem getChangeSetTreeItem() {
    SWTBotTree syncViewTree = bot.viewByTitle("Synchronize").bot().tree();
    SWTBotTreeItem changeSetItem = waitForNodeWithText(syncViewTree,
        UIText.GitChangeSetModelProviderLabel);
    return changeSetItem;
  }
View Full Code Here


  }

  protected CompareEditorTester getCompareEditorForFileInGitChangeSet(
      String fileName,
      boolean includeLocalChanges) {
    SWTBotTreeItem changeSetTreeItem = getChangeSetTreeItem();

    SWTBotTreeItem rootTree;
    if (includeLocalChanges)
      rootTree = waitForNodeWithText(changeSetTreeItem,
          GitModelWorkingTree_workingTree);
    else
      rootTree = waitForNodeWithText(changeSetTreeItem, TEST_COMMIT_MSG);

    SWTBotTreeItem projNode = waitForNodeWithText(rootTree, PROJ1);
    return getCompareEditor(projNode, fileName);
  }
View Full Code Here

    return getCompareEditor(projNode, fileName);
  }

  protected CompareEditorTester getCompareEditorForNonWorkspaceFileInGitChangeSet(
      final String fileName) {
    SWTBotTreeItem changeSetTreeItem = getChangeSetTreeItem();

    SWTBotTreeItem rootTree = waitForNodeWithText(changeSetTreeItem,
          GitModelWorkingTree_workingTree);
    waitForNodeWithText(rootTree, fileName).doubleClick();

    return CompareEditorTester.forTitleContaining(fileName);
  }
View Full Code Here

    return CompareEditorTester.forTitleContaining(fileName);
  }

  private SWTBotTreeItem getExpandedWorkingTreeItem() {
    SWTBotTreeItem changeSetTreeItem = getChangeSetTreeItem();
    String workingTreeNodeNameString = getWorkingTreeNodeName(changeSetTreeItem);
    SWTBotTreeItem node = changeSetTreeItem.getNode(workingTreeNodeNameString);
    // Full expansion
    return node.doubleClick();
  }
View Full Code Here

  private void selectRepositoryNode() throws Exception {
    SWTBotView repositoriesView = TestUtil
        .showView(RepositoriesView.VIEW_ID);
    SWTBotTree tree = repositoriesView.bot().tree();

    SWTBotTreeItem repoNode = repoViewUtil
        .getRootItem(tree, repositoryFile);
    repoNode.select();
  }
View Full Code Here

    String stable = getTestFileContent();
    checkoutAndVerify(new String[] { LOCAL_BRANCHES, "master" });
    String master = getTestFileContent();
    assertFalse(stable.equals(master));
    SWTBotShell resetDialog = openResetDialog();
    SWTBotTreeItem localBranches = resetDialog.bot().tree()
        .getTreeItem(LOCAL_BRANCHES).expand();
    TestUtil.getChildNode(localBranches, "stable").select();
    resetDialog.bot().radio(
        UIText.ResetTargetSelectionDialog_ResetTypeHardButton).click();
View Full Code Here

    TestUtil.joinJobs(JobFamilies.CHECKOUT);
    assertNotNull(lookupRepository(repositoryFile).resolve("newBranch"));

    SWTBotShell deleteBranchDialog = openDeleteBranchDialog();
    SWTBotTreeItem localBranches = deleteBranchDialog.bot().tree()
        .getTreeItem(LOCAL_BRANCHES).expand();
    TestUtil.getChildNode(localBranches, "newBranch").select();
    deleteBranchDialog.bot().button(IDialogConstants.OK_LABEL).click();

    TestUtil.joinJobs(JobFamilies.CHECKOUT);
View Full Code Here

        .button(UIText.CreateBranchPage_SourceSelectButton).click();

    SWTBotShell sourceSelectionDialog = bot
        .shell(UIText.CreateBranchPage_SourceSelectionDialogTitle);
    SWTBotTree tree = sourceSelectionDialog.bot().tree();
    SWTBotTreeItem tags = tree
        .expandNode(UIText.RepositoriesViewLabelProvider_TagsNodeText);
    TestUtil.getChildNode(tags, "SomeTag").select();
    sourceSelectionDialog.bot().button(IDialogConstants.OK_LABEL).click();

    SWTBotLabel sourceLabel = createBranchDialog.bot().label(3);
View Full Code Here

  @Test
  public void testRenameBranch() throws Exception {
    SWTBotShell dialog = openRenameBranchDialog();

    SWTBotTreeItem localBranches = dialog.bot().tree()
        .getTreeItem(LOCAL_BRANCHES).expand();
    TestUtil.getChildNode(localBranches, "stable").select();
    dialog.bot().button(UIText.RenameBranchDialog_RenameButtonLabel)
        .click();
    // rename stable to renamed
    SWTBotShell newNameDialog = bot
        .shell(UIText.RenameBranchDialog_RenameBranchDialogNewNameInputWindowTitle);
    newNameDialog.bot().text().setText("master");
    assertFalse(newNameDialog.bot().button(IDialogConstants.OK_LABEL)
        .isEnabled());

    newNameDialog.bot().text().setText("renamed");
    newNameDialog.bot().button(IDialogConstants.OK_LABEL).click();

    TestUtil.joinJobs(JobFamilies.CHECKOUT);

    dialog = openRenameBranchDialog();
    SWTBotTreeItem localBranches2 = dialog.bot().tree().getTreeItem(LOCAL_BRANCHES).expand();
    TestUtil.getChildNode(localBranches2, "renamed").select();
    dialog.bot().button(UIText.RenameBranchDialog_RenameButtonLabel)
        .click();
    // rename renamed to stable
    newNameDialog = bot
        .shell(UIText.RenameBranchDialog_RenameBranchDialogNewNameInputWindowTitle);

    newNameDialog.bot().text().setText("stable");
    newNameDialog.bot().button(IDialogConstants.OK_LABEL).click();

    TestUtil.joinJobs(JobFamilies.CHECKOUT);
    dialog = openRenameBranchDialog();
    SWTBotTreeItem localBranches3 = dialog.bot().tree()
        .getTreeItem(LOCAL_BRANCHES).expand();
    TestUtil.getChildNode(localBranches3, "stable").select();
    dialog.close();
  }
View Full Code Here

      throws IOException, Exception {
    SWTBotShell dialog = openCheckoutBranchDialog();
    TableCollection tc = dialog.bot().tree().selection();
    assertEquals("Wrong selection count", 0, tc.rowCount());

    SWTBotTreeItem parentNode = dialog.bot().tree()
        .getTreeItem(nodeTexts[0]).expand();
    TestUtil.getChildNode(parentNode, nodeTexts[1]).select();
    tc = dialog.bot().tree().selection();
    assertEquals("Wrong selection count", 1, tc.rowCount());
    assertTrue("Wrong item selected", tc.get(0, 0).startsWith(nodeTexts[1]));
View Full Code Here

TOP

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

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.