use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project egit by eclipse.
the class GlobalConfigurationPageTest method testCanCreateSameEntryValue.
@Test
public void testCanCreateSameEntryValue() throws Exception {
config.setString(TESTSECTION, null, TESTNAME, "already");
config.save();
getGitConfigurationPreferencePage();
preferencePage.bot().button(UIText.ConfigurationEditorComponent_AddButton).click();
SWTBotShell addDialog = bot.shell(UIText.AddConfigEntryDialog_AddConfigTitle);
addDialog.activate();
addDialog.bot().textWithLabel(UIText.AddConfigEntryDialog_KeyLabel).setText(TESTSECTION + "." + TESTNAME);
addDialog.bot().textWithLabel(UIText.AddConfigEntryDialog_ValueLabel).setText("true");
assertTrue(addDialog.bot().button(IDialogConstants.OK_LABEL).isEnabled());
addDialog.close();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project egit by eclipse.
the class GlobalConfigurationPageTest method afterTest.
@AfterClass
public static void afterTest() throws Exception {
configFile.delete();
SystemReader.setInstance(null);
// reset saved preferences state
SWTBotShell preferencePage = new Eclipse().openPreferencePage(null);
preferencePage.bot().tree(0).getTreeItem("General").select();
preferencePage.bot().button(IDialogConstants.OK_LABEL).click();
TestUtil.processUIEvents();
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project egit by eclipse.
the class SmartImportWizardTest method setBotAndAtivateShell.
@Before
public void setBotAndAtivateShell() {
SWTBotShell[] shells = bot.shells();
for (SWTBotShell shell : shells) {
if (isEclipseShell(shell)) {
shell.activate();
return;
}
}
fail("No active Eclipse shell found!");
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project egit by eclipse.
the class EGitTestCase method activateShell.
@Before
public void activateShell() {
SWTBotShell[] shells = bot.shells();
for (SWTBotShell shell : shells) {
if (Eclipse.isEclipseShell(shell)) {
shell.activate();
return;
}
}
fail("No active Eclipse shell found!");
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotShell in project egit by eclipse.
the class LocalRepositoryTestCase method assertClickOpens.
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();
}
Aggregations