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

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


   * @throws Exception
   */
  @Test
  public void testShowProperties() throws Exception {
    SWTBotTree tree = getOrOpenView().bot().tree();
    SWTBotTreeItem item = myRepoViewUtil.getRootItem(tree, repositoryFile);
    item.select();
    ContextMenuHelper.clickContextMenuSync(tree,
        myUtil.getPluginLocalizedValue("ShowIn"),
        "Properties");
    SWTBotView propertieView = bot.viewById("org.eclipse.ui.views.PropertySheet");
    assertTrue(propertieView.isActive());
View Full Code Here


  @Test
  public void testImportWizard() throws Exception {
    deleteAllProjects();
    assertProjectExistence(PROJ1, false);
    SWTBotTree tree = getOrOpenView().bot().tree();
    SWTBotTreeItem item = myRepoViewUtil.getRootItem(tree, repositoryFile);
    String wizardTitle = NLS.bind(
        UIText.GitCreateProjectViaWizardWizard_WizardTitle,
        repositoryFile.getPath());
    // start wizard from root item
    item.select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue("ImportProjectsCommand"));
    SWTBotShell shell = bot.shell(wizardTitle);
    bot.radio(UIText.GitSelectWizardPage_ImportExistingButton).click();
    TableCollection selected = shell.bot().tree().selection();
View Full Code Here

    assertTrue(tree.selection().get(0, 0).startsWith(REPO1));

    SWTBotView view = TestUtil.showExplorerView();
    SWTBotTree projectExplorerTree = view.bot().tree();

    SWTBotTreeItem item = getProjectItem(projectExplorerTree, PROJ1)
        .expand().getNode(FOLDER).expand().getNode(FILE1);
    view.show();
    item.doubleClick();

    item = getProjectItem(projectExplorerTree, PROJ1).expand()
        .getNode(FOLDER).expand().getNode(FILE2);
    view.show();
    item.doubleClick();
    // now we should have two editors

    // the selection should be still be root
    assertTrue(tree.selection().get(0, 0).startsWith(REPO1));
View Full Code Here

        .button(IDialogConstants.NO_LABEL).click();
  }

  private void assertTreeLineContent(SWTBotTree tree, int rowIndex,
      String file) {
    SWTBotTreeItem treeItem = tree.getAllItems()[rowIndex];
    assertEquals(file, treeItem.cell(1));
  }
View Full Code Here

    IndexDiffCache cache = Activator.getDefault().getIndexDiffCache();
    cache.getIndexDiffCacheEntry(testRepository.getRepository());
    TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);

    SWTBotTree packageExplorer = TestUtil.getExplorerTree();
    SWTBotTreeItem project1 = getProjectItem(packageExplorer, PROJ1)
        .select();

    SWTBotTreeItem folderNode = project1.expand().getNode(FOLDER);
    SWTBotTreeItem fileNode = folderNode.expand().getNode(FILE1);
    fileNode.select();
    ContextMenuHelper.clickContextMenu(packageExplorer,
        util.getPluginLocalizedValue("TeamMenu.label"),
        util.getPluginLocalizedValue("MergeToolAction.label"));

    CompareEditorTester compareEditor = CompareEditorTester
View Full Code Here

    newContent = getTestFileContent();
    assertEquals(oldContent, newContent);

    SWTBotShell mergeDialog = openMergeDialog();

    SWTBotTreeItem remoteBranches = mergeDialog.bot().tree()
        .getTreeItem(REMOTE_BRANCHES).expand();
    TestUtil.getChildNode(remoteBranches, "origin/master").select();
    mergeDialog.bot().button(UIText.MergeTargetSelectionDialog_ButtonMerge)
        .click();
    bot.shell(UIText.MergeAction_MergeResultTitle).close();
View Full Code Here

    return rw.parseCommit(id);
  }

  private void mergeBranch(String branchToMerge, boolean squash) throws Exception {
    SWTBotShell mergeDialog = openMergeDialog();
    SWTBotTreeItem localBranches = mergeDialog.bot().tree()
        .getTreeItem(LOCAL_BRANCHES).expand();
    TestUtil.getChildNode(localBranches, branchToMerge).select();
    if (squash)
      mergeDialog.bot().radio(UIText.MergeTargetSelectionDialog_MergeTypeSquashButton).click();
    mergeDialog.bot().button(UIText.MergeTargetSelectionDialog_ButtonMerge).click();
View Full Code Here

    assertSynchronizeNoChange();

    // use the tag -> should have a change
    dialog = openCompareWithDialog(compareWithRefActionLabel, dialogTitle);
    SWTBotTreeItem tags = dialog.bot().tree().getTreeItem(TAGS).expand();
    TestUtil.getChildNode(tags, "SomeTag").select();

    jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
View Full Code Here

    assertFalse(tree.isEnabled());
    box.click();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    SWTBotTreeItem item = tree.getAllItems()[0];
    assertFalse(item.isChecked());
    item.check();
    assertTrue(item.isChecked());

    configurationDialog.close();
    getDialog();
    box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);

    tree = findTree();
    assertFalse(box.isChecked());
    assertFalse(tree.isEnabled());
    box.click();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    item = tree.getAllItems()[0];
    assertFalse(item.isChecked());
    item.check();
    assertTrue(item.isChecked());

    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
    getDialog();
    box = configurationDialog.bot().checkBox(
        UIText.GitTraceConfigurationDialog_PlatformSwitchCheckbox);

    tree = findTree();
    assertTrue(box.isChecked());
    assertTrue(tree.isEnabled());

    item = tree.getAllItems()[0];
    assertTrue(item.isChecked());

    configurationDialog.bot().button(
        UIText.GitTraceConfigurationDialog_DefaultButton).click();

    assertFalse(item.isChecked());
    box.click();
    configurationDialog.bot().button(IDialogConstants.OK_LABEL).click();
  }
View Full Code Here

   * @return the bale
   * @throws Exception
   */
  private SWTBotTable getHistoryViewTable(String... path) throws Exception {
    SWTBotTree projectExplorerTree = TestUtil.getExplorerTree();
    SWTBotTreeItem explorerItem;
    SWTBotTreeItem projectItem = getProjectItem(projectExplorerTree, path[0]);
    if (path.length == 1)
      explorerItem = projectItem;
    else if (path.length == 2)
      explorerItem = TestUtil.getChildNode(projectItem.expand(), path[1]);
    else {
      SWTBotTreeItem childItem = TestUtil.getChildNode(
          projectItem.expand(), path[1]);
      explorerItem = TestUtil.getChildNode(childItem.expand(), path[2]);
    }
    explorerItem.select();
    ContextMenuHelper.clickContextMenuSync(projectExplorerTree, "Team",
        "Show in History");
    // join GenerateHistoryJob
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.