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

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


    // when
    launchSynchronization(HEAD, HEAD, true);

    // then
    SWTBotTreeItem workingTreeItem = getExpandedWorkingTreeItem();
    assertTrue(workingTreeItem.getText().endsWith(GitModelWorkingTree_workingTree));
  }
View Full Code Here


    // when
    launchSynchronization(INITIAL_TAG, HEAD, false);

    // then
    SWTBotTreeItem changeSetTreeItem = getChangeSetTreeItem();
    assertEquals(1, changeSetTreeItem.getItems().length);
  }
View Full Code Here

    // when
    launchSynchronization(INITIAL_TAG, R_TAGS + "v0.1", false);

    // then
    SWTBotTreeItem changeSetTreeItem = getChangeSetTreeItem();
    assertEquals(1, changeSetTreeItem.getItems().length);
  }
View Full Code Here

    // when
    launchSynchronization(HEAD, HEAD + "~1", true);

    // then
    SWTBotTreeItem changeSetTreeItem = getChangeSetTreeItem();
    assertEquals(1, changeSetTreeItem.getItems().length);

    SWTBotTreeItem commitTree = waitForNodeWithText(changeSetTreeItem,
        TEST_COMMIT_MSG);
    SWTBotTreeItem projectTree = waitForNodeWithText(commitTree, PROJ1);
    assertEquals(1, projectTree.getItems().length);

    SWTBotTreeItem folderTree = waitForNodeWithText(projectTree, FOLDER);
    assertEquals(1, folderTree.getItems().length);

    SWTBotTreeItem fileTree = folderTree.getItems()[0];
    assertEquals("test.txt", fileTree.getText());
  }
View Full Code Here

    // when
    launchSynchronization(EMPTY_PROJECT, "", "", true);

    // then
    SWTBotTreeItem workingTree = getExpandedWorkingTreeItem();
    SWTBotTreeItem projectTree = waitForNodeWithText(workingTree,
        EMPTY_PROJECT);
    assertEquals(2, projectTree.getItems().length);

    SWTBotTreeItem folderTree = waitForNodeWithText(projectTree, FOLDER);
    assertEquals(2, folderTree.getItems().length);

    SWTBotTreeItem fileTree = folderTree.getItems()[0];
    assertEquals(FILE1, fileTree.getText());
    fileTree = folderTree.getItems()[1];
    assertEquals(FILE2, fileTree.getText());
  }
View Full Code Here

    // when
    launchSynchronization(INITIAL_TAG, HEAD, true);

    // then
    // asserts for Git Change Set model
    SWTBotTreeItem workingTree = getExpandedWorkingTreeItem();
    assertEquals(1, workingTree.getItems().length);
    SWTBotTreeItem proj1Node = workingTree.getItems()[0];
    assertEquals(1, proj1Node.getItems().length);
    assertEquals(".gitignore", proj1Node.getItems()[0].getText());
  }
View Full Code Here

    // when
    launchSynchronization(INITIAL_TAG, HEAD, true);

    // then
    SWTBotTreeItem workingTree = getExpandedWorkingTreeItem();
    assertEquals(1, workingTree.getNodes(name).size());
  }
View Full Code Here

    // force refresh
    proj.refreshLocal(IResource.DEPTH_INFINITE, null);
    Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);

    // then
    SWTBotTreeItem workingTree = getExpandedWorkingTreeItem();
    assertEquals(GitModelWorkingTree_workingTree, workingTree.getText());
    // WidgetNotFoundException will be thrown when node named 'new.txt' not
    // exists
    assertNotNull(workingTree.getNode(PROJ1).expand());
    assertNotNull(workingTree.getNode(PROJ1).getNode(newFileName));
  }
View Full Code Here

    // given
    changeFilesInProject();
    launchSynchronization(HEAD, HEAD, true);

    // preconditions - sync result should contain two uncommitted changes
    SWTBotTreeItem workingTree = getExpandedWorkingTreeItem();
    assertTrue(workingTree.getText().endsWith(GitModelWorkingTree_workingTree));
    assertEquals(2,
        workingTree.getItems()[0].getItems()[0].getItems().length);

    // when
    commit(PROJ1);

    // then - synchronize view should be empty
View Full Code Here

    bot.shell("Show View").bot().tree().expandNode("Git").getNode(
        "Git Repositories").doubleClick();

    SWTBotTree repositoriesTree = bot.viewByTitle("Git Repositories").bot()
        .tree();
    SWTBotTreeItem egitRoot = repositoriesTree.getAllItems()[0];
    egitRoot.expand();
    egitRoot.collapse();
    egitRoot.expand();
    SWTBotTreeItem remoteBranch = egitRoot.expandNode("Branches")
        .expandNode("Remote Branches");
    SWTBotTreeItem branchNode = remoteBranch.getNode("origin/stable-0.7");
    branchNode.select();
    branchNode.contextMenu("Synchronize").click();

    // when

    // then
    SWTBotTree syncViewTree = bot.viewByTitle("Synchronize").bot().tree();
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.