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

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


        tree, repositoryFile).expand();
    SWTBotTreeItem masterNode = localBranchesItem.getNode("master");
    masterNode.select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue("RepoViewCreateBranch.label"));
    SWTBotShell createBranchShell = bot
        .shell(UIText.CreateBranchWizard_NewBranchTitle);
    createBranchShell.bot().textWithId("BranchName").setText("abc");
    createBranchShell.bot()
        .checkBox(UIText.CreateBranchPage_CheckoutButton).deselect();
    createBranchShell.bot().button(IDialogConstants.FINISH_LABEL).click();
    refreshAndWait();
    // delete branch
    // lookup node again. Widget might have changed due to refresh
    localBranchesItem = myRepoViewUtil.getLocalBranchesItem(
        tree, repositoryFile).expand();
View Full Code Here


        tree, repositoryFile).expand();
    SWTBotTreeItem masterNode = localBranchesItem.getNode("master");
    // create first branch (abc)
    masterNode.select();
    ContextMenuHelper.clickContextMenu(tree, "Create Branch...");
    SWTBotShell createBranchShell = bot
        .shell(UIText.CreateBranchWizard_NewBranchTitle);
    createBranchShell.bot().textWithId("BranchName").setText("abc");
    createBranchShell.bot()
        .checkBox(UIText.CreateBranchPage_CheckoutButton).deselect();
    createBranchShell.bot().button(IDialogConstants.FINISH_LABEL).click();
    // create second branch (123)
    ContextMenuHelper.clickContextMenu(tree, "Create Branch...");
    createBranchShell = bot.shell(UIText.CreateBranchWizard_NewBranchTitle);
    createBranchShell.bot().textWithId("BranchName").setText("123");
    createBranchShell.bot()
        .checkBox(UIText.CreateBranchPage_CheckoutButton).deselect();
    createBranchShell.bot().button(IDialogConstants.FINISH_LABEL).click();
    refreshAndWait();
    localBranchesItem = myRepoViewUtil.getLocalBranchesItem(tree,
        repositoryFile).expand();
    // delete both
    localBranchesItem.select("abc", "123");
View Full Code Here

    folder.getNode(FILE1).select();

    ContextMenuHelper.clickContextMenu(tree,
        myUtil.getPluginLocalizedValue("RepoViewDeleteFile.label"));

    SWTBotShell confirm = bot.shell("Delete Resources");
    confirm.bot().button(IDialogConstants.OK_LABEL).click();
    bot.waitUntil(shellCloses(confirm));
    TestUtil.joinJobs(JobFamilies.REPO_VIEW_REFRESH);

    folder = findWorkdirNode(tree, PROJ1, FOLDER);
    assertThat(folder.getNodes(), not(hasItem(FILE1)));
View Full Code Here

    folder.getNode(FILE1).select();

    ContextMenuHelper.clickContextMenu(tree,
        myUtil.getPluginLocalizedValue("RepoViewDeleteFile.label"));

    SWTBotShell confirm = bot.shell(UIText.DeleteResourcesOperationUI_confirmActionTitle);
    confirm.bot().button(IDialogConstants.OK_LABEL).click();
    bot.waitUntil(shellCloses(confirm));
    TestUtil.joinJobs(JobFamilies.REPO_VIEW_REFRESH);

    folder = findWorkdirNode(tree, PROJ2, FOLDER);
    assertThat(folder.getNodes(), not(hasItem(FILE1)));
View Full Code Here

    updateRef.update();
  }

  protected void assertClickOpens(SWTBotTree tree, String menu, String window) {
    ContextMenuHelper.clickContextMenu(tree, menu);
    SWTBotShell shell = bot.shell(window);
    shell.activate();
    shell.bot().button(IDialogConstants.CANCEL_LABEL).click();
    shell.close();
  }
View Full Code Here

    touchAndSubmit(null);
  }

  @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

    TestUtil.waitUntilTableHasRowWithText(tagDialog.bot(), table, "SomeTag", 10000);
  }

  @Test
  public void testCreateTag() throws Exception {
    SWTBotShell tagDialog = openTagDialog();
    tagDialog.bot().textWithLabel(UIText.CreateTagDialog_tagName).setText(
        "SomeTag");
    assertFalse("Ok should be disabled",
        tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton)
            .isEnabled());
    tagDialog.bot().button(UIText.CreateTagDialog_clearButton)
        .click();
    tagDialog.bot().textWithLabel(UIText.CreateTagDialog_tagName).setText(
        "AnotherTag");
    assertFalse("Ok should be disabled",
        tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton)
            .isEnabled());
    tagDialog.bot().styledTextWithLabel(UIText.CreateTagDialog_tagMessage)
        .setText("Here's the message text");
    tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton).click();
    waitInUI();
    assertTrue(lookupRepository(repositoryFile).getTags().keySet()
        .contains("AnotherTag"));
  }
View Full Code Here

        .contains("AnotherTag"));
  }

  @Test
  public void testCreateTagAndStartPush() throws Exception {
    SWTBotShell tagDialog = openTagDialog();
    SWTBotButton button = tagDialog.bot()
        .button(UIText.CreateTagDialog_CreateTagAndStartPushButton);
    assertFalse("'Create Tag And Start Push' should be disabled",
        button.isEnabled());
    tagDialog.bot().textWithLabel(UIText.CreateTagDialog_tagName)
        .setText("tag-to-push");
    tagDialog.bot().styledTextWithLabel(UIText.CreateTagDialog_tagMessage)
        .setText("Tag to push");
    button.click();

    SWTBotShell pushTagsWizard = bot
        .shell(UIText.PushTagsWizard_WindowTitle);
    pushTagsWizard.close();
  }
View Full Code Here

    String[] menuPath = new String[] {
        util.getPluginLocalizedValue("TeamMenu.label"),
        util.getPluginLocalizedValue("AdvancedMenu.label"),
        util.getPluginLocalizedValue("TagAction_label") };
    ContextMenuHelper.clickContextMenu(projectExplorerTree, menuPath);
    SWTBotShell dialog = bot.shell(UIText.CreateTagDialog_NewTag);
    return dialog;
  }
View Full Code Here

    return dialog;
  }

  @Test
  public void testChangeTagMessage() throws Exception {
    SWTBotShell tagDialog = openTagDialog();
    assertFalse("Ok should be disabled",
        tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton)
            .isEnabled());
    tagDialog.bot().textWithLabel(UIText.CreateTagDialog_tagName).setText(
        "MessageChangeTag");
    assertFalse("Ok should be disabled",
        tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton)
            .isEnabled());
    tagDialog.bot().styledTextWithLabel(UIText.CreateTagDialog_tagMessage)
        .setText("Here's the first message");
    tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton).click();
    waitInUI();
    assertTrue(lookupRepository(repositoryFile).getTags().keySet()
        .contains("MessageChangeTag"));
    tagDialog = openTagDialog();
    tagDialog.bot().tableWithLabel(UIText.CreateTagDialog_existingTags)
        .getTableItem("MessageChangeTag").select();
    assertFalse("Ok should be disabled",
        tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton)
            .isEnabled());
    String oldText = tagDialog.bot().styledTextWithLabel(
        UIText.CreateTagDialog_tagMessage).getText();
    assertEquals("Wrong message text", "Here's the first message", oldText);
    tagDialog.bot().checkBox(UIText.CreateTagDialog_overwriteTag).click();
    tagDialog.bot().styledTextWithLabel(UIText.CreateTagDialog_tagMessage)
        .setText("New message");
    tagDialog.bot().button(UIText.CreateTagDialog_CreateTagButton).click();
    tagDialog = openTagDialog();
    tagDialog.bot().tableWithLabel(UIText.CreateTagDialog_existingTags)
        .getTableItem("MessageChangeTag").select();
    String newText = tagDialog.bot().styledTextWithLabel(
        UIText.CreateTagDialog_tagMessage).getText();
    assertEquals("Wrong message text", "New message", newText);
    tagDialog.close();
  }
View Full Code Here

TOP

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

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.