tmf: Wait until shell is active in swtbot test
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Wed, 23 Apr 2014 05:28:47 +0000 (01:28 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Thu, 24 Apr 2014 13:44:13 +0000 (09:44 -0400)
Change-Id: Ia7a4a14048ae919717cf17ea3ec095ea212c7b1e
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/25385
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
org.eclipse.linuxtools.tmf.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/ui/swtbot/tests/TestCustomTxtWizard.java

index 067e379104650e626eef892b80988021d7260ff9..b8c91ff37492bff41ca8d8807d318a72533b7e63 100644 (file)
@@ -27,6 +27,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -68,6 +69,7 @@ import org.junit.Test;
  */
 public class TestCustomTxtWizard {
 
+    private static final String MANAGE_CUSTOM_PARSERS_SHELL_TITLE = "Manage Custom Parsers";
     private static final String PROJECT_NAME = "Test";
     private static final String EXPECTED_TEST_DEFINITION = "<Definition name=\"Test\">\n" +
             "<TimeStampOutputFormat>ss</TimeStampOutputFormat>\n" +
@@ -135,6 +137,7 @@ public class TestCustomTxtWizard {
         }
         assertNotNull(treeNode);
         treeNode.contextMenu("Manage Custom Parsers...").click();
+        fBot.waitUntil(Conditions.shellIsActive(MANAGE_CUSTOM_PARSERS_SHELL_TITLE));
         fBot.button("New...").click();
 
         fBot.textWithLabel("Log type:").setText(PROJECT_NAME);
@@ -234,6 +237,7 @@ public class TestCustomTxtWizard {
         }
         assertNotNull(treeNode);
         treeNode.contextMenu("Manage Custom Parsers...").click();
+        fBot.waitUntil(Conditions.shellIsActive(MANAGE_CUSTOM_PARSERS_SHELL_TITLE));
         fBot.list().select(fBot.list().getItems()[0]);
         fBot.button("Edit...").click();
 
This page took 0.028851 seconds and 5 git commands to generate.