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

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


        .expand();
    item.getNode("origin/stable").select();
    ContextMenuHelper.clickContextMenu(tree,
        myUtil.getPluginLocalizedValue("CreateBranchCommand"));

    SWTBotShell createPage = bot
        .shell(UIText.CreateBranchWizard_NewBranchTitle);
    createPage.activate();
    assertEquals("Wrong suggested branch name", "stable", createPage.bot()
        .textWithId("BranchName").getText());
    createPage.close();
    // checkout master again

    myRepoViewUtil.getLocalBranchesItem(tree, clonedRepositoryFile)
        .expand().getNode("master").select();
    ContextMenuHelper.clickContextMenu(tree,
View Full Code Here


    item.getNode("master").select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue("RepoViewRenameBranch.label"));
    refreshAndWait();

    SWTBotShell renameDialog = bot
        .shell(UIText.BranchRenameDialog_WindowTitle);
    SWTBotText newBranchNameText = renameDialog.bot().textWithLabel(UIText.BranchRenameDialog_NewNameLabel);
    newBranchNameText.setText("invalid~name");

    renameDialog.bot().text(" " + // the text is now in the error message, and the MessageAreaDialog seems to add a space
        NLS.bind(UIText.ValidationUtils_InvalidRefNameMessage,
            "refs/heads/invalid~name"));
    assertFalse(renameDialog.bot().button(IDialogConstants.OK_LABEL)
        .isEnabled());
    newBranchNameText.setText("newmaster");
    renameDialog.bot().button(IDialogConstants.OK_LABEL).click();

    refreshAndWait();

    item = myRepoViewUtil.getLocalBranchesItem(tree, clonedRepositoryFile)
        .expand();
    assertEquals("newmaster", item.getNode(0).select().getText());

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

    renameDialog = bot.shell(UIText.BranchRenameDialog_WindowTitle);
    newBranchNameText = renameDialog.bot().text(0);

    newBranchNameText.setText("master");
    renameDialog.bot().button(IDialogConstants.OK_LABEL).click();

    refreshAndWait();

    item = myRepoViewUtil.getLocalBranchesItem(tree, clonedRepositoryFile)
        .expand();
View Full Code Here

    String title = NLS.bind(
        UIText.MergeTargetSelectionDialog_TitleMergeWithBranch,
        FileRepositoryBuilder.create(clonedRepositoryFile).getBranch());

    SWTBotShell mergeDialog = bot.shell(title);
    // TODO do some merge here
    mergeDialog.close();
  }
View Full Code Here

    localItem.expand().getNode("configTest").select();

    ContextMenuHelper.clickContextMenu(view.bot().tree(),
        myUtil.getPluginLocalizedValue("ConfigurBranchCommand.label"));

    SWTBotShell configureBranchDialog = bot
        .shell(UIText.BranchConfigurationDialog_BranchConfigurationTitle);
    assertEquals(MessageFormat.format(
        UIText.BranchConfigurationDialog_EditBranchConfigMessage,
        "configTest"), configureBranchDialog.bot().text().getText());
    assertEquals(
        "refs/heads/master",
        configureBranchDialog
            .bot()
            .comboBoxWithLabel(
                UIText.BranchConfigurationDialog_UpstreamBranchLabel)
            .getText());
    assertEquals(
        "origin",
        configureBranchDialog
            .bot()
            .comboBoxWithLabel(
                UIText.BranchConfigurationDialog_RemoteLabel)
            .getText());
    assertFalse(configureBranchDialog.bot()
        .checkBox(UIText.BranchConfigurationDialog_RebaseLabel)
        .isChecked());

    configureBranchDialog.bot()
        .checkBox(UIText.BranchConfigurationDialog_RebaseLabel)
        .select();
    // add a listener to wait for the configuration changed event
    final AtomicBoolean changed = new AtomicBoolean();
    ConfigChangedListener listener =
    new ConfigChangedListener() {
      public void onConfigChanged(ConfigChangedEvent event) {
        changed.set(true);
      }
    };
    ListenerHandle handle = repo.getConfig().addChangeListener(listener);
    // only now click ok
    configureBranchDialog.bot().button("OK").click();

    // cleanup behind ourselves
    handle.remove();
    if (!changed.get())
      fail("We should have received a config change event");
View Full Code Here

        "ResetToFirst").select();

    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue("ResetCommand"));

    SWTBotShell resetDialog = bot.shell(UIText.ResetCommand_WizardTitle);
    resetDialog.bot().radio(
        UIText.ResetTargetSelectionDialog_ResetTypeHardButton).click();
    resetDialog.bot().button(IDialogConstants.FINISH_LABEL).click();
    TestUtil.joinJobs(JobFamilies.RESET);

    bot.shell(UIText.ResetTargetSelectionDialog_ResetQuestion).bot()
        .button(IDialogConstants.YES_LABEL).click();
View Full Code Here

    SWTBotTree tree = getOrOpenView().bot().tree();
    myRepoViewUtil.getTagsItem(tree, repositoryFile).select();
    ContextMenuHelper.clickContextMenu(tree,
        myUtil.getPluginLocalizedValue("RepoViewCreateTag.label"));
    String shellTitle = UIText.CreateTagDialog_NewTag;
    SWTBotShell createDialog = bot.shell(shellTitle).activate();
    TestUtil.joinJobs(JobFamilies.FILL_TAG_LIST);
    createDialog.bot().textWithLabel(UIText.CreateTagDialog_tagName)
        .setText(name);
    createDialog.bot()
        .styledTextWithLabel(UIText.CreateTagDialog_tagMessage)
        .setText(message);
    createDialog.bot().button(UIText.CreateTagDialog_CreateTagButton)
        .click();
    TestUtil.joinJobs(JobFamilies.TAG);
  }
View Full Code Here

    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    SWTBotShell shell = bot
        .shell(UIText.RepositoriesView_ConfirmProjectDeletion_WindowTitle);
    shell.bot().button(IDialogConstants.YES_LABEL).click();
    refreshAndWait();
    assertEmpty();
    assertProjectExistence(PROJ1, false);
  }
View Full Code Here

    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    SWTBotShell shell = bot
        .shell(UIText.RepositoriesView_ConfirmProjectDeletion_WindowTitle);
    shell.bot().button(IDialogConstants.NO_LABEL).click();
    refreshAndWait();
    assertEmpty();
    assertProjectExistence(PROJ1, true);
  }
View Full Code Here

    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    SWTBotShell shell = bot
        .shell(UIText.RepositoriesView_ConfirmProjectDeletion_WindowTitle);
    shell.bot().button(IDialogConstants.CANCEL_LABEL).click();
    refreshAndWait();
    assertHasRepo(repositoryFile);
    assertProjectExistence(PROJ1, true);
  }
View Full Code Here

    getOrOpenView()
        .toolbarButton(
            myUtil
                .getPluginLocalizedValue("RepoViewAddRepository.tooltip"))
        .click();
    SWTBotShell shell = bot
        .shell(UIText.RepositorySearchDialog_AddGitRepositories);
    shell.bot().textWithLabel(UIText.RepositorySearchDialog_directory)
        .setText(getTestDirectory().getPath());
    shell.bot().button(UIText.RepositorySearchDialog_Search).click();
    shell.bot().button(IDialogConstants.FINISH_LABEL).click();
    refreshAndWait();
    assertHasRepo(repositoryFile);
  }
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.