use of org.eclipse.ui.internal.dialogs.AboutDialog in project jbosstools-integration-tests by jbosstools.
the class SeamPluginsTest method testSeamIsNotPresent.
@Test
public void testSeamIsNotPresent() {
log.info("Navigate to installation details");
WorkbenchShell ws = new WorkbenchShell();
ws.maximize();
// for OSX (MacOS) use eclipse API to open About dialog
if (RunningPlatform.isOSX()) {
log.info("Open " + HELP_BUTTON + " -> " + ABOUT_MENU_BUTTON + "directly on Mac OSX");
Display.asyncExec(new Runnable() {
@Override
public void run() {
@SuppressWarnings("restriction") AboutDialog dialog = new AboutDialog(ws.getSWTWidget());
dialog.open();
}
});
} else {
new ShellMenuItem(new WithTextMatcher(new RegexMatcher(HELP_BUTTON)), new WithTextMatcher(new RegexMatcher(ABOUT_MENU_BUTTON))).select();
}
new DefaultShell(new WithTextMatcher(new RegexMatcher(ABOUT_MENU_BUTTON)));
new PushButton("Installation Details").click();
new DefaultShell(new WithTextMatcher(new RegexMatcher(".*Installation Details")));
new DefaultCTabItem("Plug-ins").activate();
new DefaultText().setText("seam");
Table pluginsTable = new DefaultTable();
List<TableItem> items = pluginsTable.getItems();
int columntIndex = pluginsTable.getHeaderIndex("Plug-in Id");
List<String> foundSeamPlugins = new ArrayList<String>();
for (TableItem ti : items) {
String pluginId = ti.getText(columntIndex);
if (pluginId.equals("org.jboss.tools.cdi.xml") || pluginId.equals("org.jboss.tools.cdi.xml.ui") || pluginId.equals("org.jboss.tools.cdi.seam.solder.core") || pluginId.equals("org.jboss.tools.seam.reddeer")) {
// these seam plugins can exist in default installation (seam3 or reddeer)
} else {
foundSeamPlugins.add(pluginId);
}
}
new PushButton("Close").click();
new PushButton("Close").click();
if (!foundSeamPlugins.isEmpty()) {
fail("seam plugins " + foundSeamPlugins + " is/are present but all seam2 plugins should be removed");
}
}
use of org.eclipse.ui.internal.dialogs.AboutDialog in project eclipse.platform.ui by eclipse-platform.
the class UIDialogs method testAbout.
@Test
public void testAbout() {
Dialog dialog = null;
dialog = new AboutDialog(getShell());
DialogCheck.assertDialog(dialog);
}
use of org.eclipse.ui.internal.dialogs.AboutDialog in project jbosstools-integration-tests by jbosstools.
the class InstallationDetailsTest method setup.
@Before
public void setup() {
log.info("Navigate to installation details");
WorkbenchShell ws = new WorkbenchShell();
ws.maximize();
// for OSX (MacOS) use eclipse API to open About dialog
if (RunningPlatform.isOSX()) {
log.info("Open " + HELP_BUTTON + " -> " + ABOUT_MENU_BUTTON + "directly on Mac OSX");
Display.asyncExec(new Runnable() {
@Override
public void run() {
@SuppressWarnings("restriction") AboutDialog dialog = new AboutDialog(ws.getSWTWidget());
dialog.open();
}
});
} else {
new ShellMenuItem(new WithTextMatcher(new RegexMatcher(HELP_BUTTON)), new WithTextMatcher(new RegexMatcher(ABOUT_MENU_BUTTON))).select();
}
about = new DefaultShell(new WithTextMatcher(new RegexMatcher(ABOUT_MENU_BUTTON)));
// get styled text from help
DefaultStyledText dt = new DefaultStyledText();
String text = dt.getText();
// TODO use
// org.eclipse.core.runtime.Platform.getBundle("org.jbosstools").getVersion();
int versionIndex = 0;
jbossToolsVersion = text.substring(versionIndex = text.indexOf("Version:") + 9, text.indexOf("Build id", ++versionIndex));
log.info("JBossTools version: " + jbossToolsVersion);
assertFalse("The JBossTools version value is empty!", jbossToolsVersion.isEmpty());
new PushButton(new WithTextMatcher(new RegexMatcher(MODAL_DIALOG_ABOUT_DEVSTUDIO_INSTALLATION_DETAILS_BUTTON))).click();
// validate that shell opened
installationDetails = new DefaultShell(new WithTextMatcher(new RegexMatcher(MODAL_DIALOG_ABOUT_DEVSTUDIO_INSTALLATION_DETAILS_TITLE)));
CTabFolder tabFolder = new DefaultCTabItem(MODAL_DIALOG_CONFIG_MENU_BUTTON).getFolder();
String[] labels = tabFolder.getTabItemLabels();
Boolean isTabPresent = Arrays.stream(labels).anyMatch(MODAL_DIALOG_CONFIG_MENU_BUTTON::equals);
assertTrue("Tab item '" + MODAL_DIALOG_CONFIG_MENU_BUTTON + "' is missing", isTabPresent);
new DefaultCTabItem(MODAL_DIALOG_CONFIG_MENU_BUTTON).activate();
new WaitWhile(new JobIsRunning(new RegexMatcher("Fetching configuration"), true), TimePeriod.LONG);
}
use of org.eclipse.ui.internal.dialogs.AboutDialog in project eclipse.platform.ui by eclipse-platform.
the class UIDialogsAuto method testAbout.
@Test
public void testAbout() {
Dialog dialog = null;
dialog = new AboutDialog(getShell());
DialogCheck.assertDialogTexts(dialog);
}
Aggregations