Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Reckord2014-09-08 12:16:59 +0000
committerCarsten Reckord2014-09-08 12:16:59 +0000
commita4b582fc7729b894c0645e0baa2e68fd0f1b3131 (patch)
treebc92713030f70f71ff5ebdb001e339fc612a4633
parentb1687d93bc8a8f43e0d13a1bec9a53db04a3c961 (diff)
downloadorg.eclipse.epp.mpc-a4b582fc7729b894c0645e0baa2e68fd0f1b3131.tar.gz
org.eclipse.epp.mpc-a4b582fc7729b894c0645e0baa2e68fd0f1b3131.tar.xz
org.eclipse.epp.mpc-a4b582fc7729b894c0645e0baa2e68fd0f1b3131.zip
443493: Tests fail due to open dialog
- Some text info regarding open shells Bug: 443493 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=443493
-rw-r--r--org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/AbstractMarketplaceWizardBotTest.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/AbstractMarketplaceWizardBotTest.java b/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/AbstractMarketplaceWizardBotTest.java
index 32a825d5..dce62e3b 100644
--- a/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/AbstractMarketplaceWizardBotTest.java
+++ b/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/AbstractMarketplaceWizardBotTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.epp.mpc.tests.ui.wizard;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellIsActive;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.Matchers.*;
@@ -35,6 +36,7 @@ import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogFilter;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Widget;
@@ -53,6 +55,7 @@ import org.eclipse.swtbot.swt.finder.waits.WaitForObjectCondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotLabel;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem;
@@ -164,7 +167,17 @@ public abstract class AbstractMarketplaceWizardBotTest {
problem = "MPC wizard has open child dialog:";
}
problem+="\n Shell(\""+botShell.getText()+"\")";
-
+ try {
+ SWTBot childBot = botShell.bot();
+ Matcher<Label> matcher = widgetOfType(Label.class);
+ List<? extends Label> widgets = childBot.widgets(matcher);
+ for (Label label : widgets) {
+ String labelText = new SWTBotLabel(label, matcher).getText();
+ problem += "\n > " + labelText;
+ }
+ } catch (Exception ex) {
+ problem += "\n > Error describing shell contents: " + ex;
+ }
//kill message dialog
botShell.close();
}

Back to the top