use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton in project egit by eclipse.
the class StagingViewTester method setAmend.
public void setAmend(boolean amend) {
SWTBotToolbarToggleButton button = stagingView.bot().toolbarToggleButtonWithTooltip(UIText.StagingView_Ammend_Previous_Commit);
selectToolbarToggle(button, amend);
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton in project egit by eclipse.
the class HistoryViewTest method initFilter.
/**
* @param filter
* 0: none, 1: repository, 2: project, 3: folder
* @throws Exception
*/
private void initFilter(int filter) throws Exception {
getHistoryViewTable(PROJ1);
SWTBotView view = bot.viewById(IHistoryView.VIEW_ID);
SWTBotToolbarToggleButton folder = (SWTBotToolbarToggleButton) view.toolbarButton(UIText.GitHistoryPage_AllInParentTooltip);
SWTBotToolbarToggleButton project = (SWTBotToolbarToggleButton) view.toolbarButton(UIText.GitHistoryPage_AllInProjectTooltip);
SWTBotToolbarToggleButton repo = (SWTBotToolbarToggleButton) view.toolbarButton(UIText.GitHistoryPage_AllInRepoTooltip);
switch(filter) {
case 0:
if (folder.isChecked())
folder.click();
if (project.isChecked())
project.click();
if (repo.isChecked())
repo.click();
break;
case 1:
if (!repo.isChecked())
repo.click();
break;
case 2:
if (!project.isChecked())
project.click();
break;
case 3:
if (!folder.isChecked())
folder.click();
break;
default:
break;
}
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton in project egit by eclipse.
the class CommitNonWSChangesTest method testCommitDeletedProject.
@Test
public void testCommitDeletedProject() throws Exception {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJ1);
project.delete(true, false, null);
clickOnCommit();
SWTBotShell commitDialog = bot.shell(UIText.CommitDialog_CommitChanges);
SWTBotToolbarToggleButton showUntracked = commitDialog.bot().toolbarToggleButtonWithTooltip(UIText.CommitDialog_ShowUntrackedFiles);
if (!showUntracked.isChecked())
showUntracked.select();
SWTBotTree tree = commitDialog.bot().tree();
assertEquals("Wrong row count", 4, tree.rowCount());
assertTreeLineContent(tree, 0, "GeneralProject/.project");
assertTreeLineContent(tree, 1, "GeneralProject/folder/test.txt");
assertTreeLineContent(tree, 2, "GeneralProject/folder/test2.txt");
assertTreeLineContent(tree, 3, "ProjectWithoutDotProject/.project");
commitDialog.bot().textWithLabel(UIText.CommitDialog_Author).setText(TestUtil.TESTAUTHOR);
commitDialog.bot().textWithLabel(UIText.CommitDialog_Committer).setText(TestUtil.TESTCOMMITTER);
commitDialog.bot().styledTextWithLabel(UIText.CommitDialog_CommitMessage).setText("Delete Project GeneralProject");
selectAllCheckboxes(tree);
commitDialog.bot().button(UIText.CommitDialog_Commit).click();
// wait until commit is completed
Job.getJobManager().join(JobFamilies.COMMIT, null);
String[] paths = { "ProjectWithoutDotProject/.project", "ProjectWithoutDotProject/folder/test.txt", "ProjectWithoutDotProject/folder/test2.txt" };
TestUtil.assertRepositoryContainsFiles(repository, paths);
// check there is nothing to commit
clickOnCommit();
bot.shell(UIText.CommitAction_noFilesToCommit).bot().button(IDialogConstants.NO_LABEL).click();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton in project egit by eclipse.
the class CommitDialogTester method setShowUntracked.
public void setShowUntracked(boolean untracked) {
SWTBotToolbarToggleButton button = commitDialog.bot().toolbarToggleButtonWithTooltip(UIText.CommitDialog_ShowUntrackedFiles);
selectToolbarToggle(button, untracked);
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton in project egit by eclipse.
the class CommitDialogTester method setAmend.
public void setAmend(boolean amend) {
SWTBotToolbarToggleButton button = commitDialog.bot().toolbarToggleButtonWithTooltip(UIText.CommitDialog_AmendPreviousCommit);
selectToolbarToggle(button, amend);
}
Aggregations