Author: yzhishko
Date: 2009-06-30 05:41:11 -0400 (Tue, 30 Jun 2009)
New Revision: 16277
Modified:
workspace/yzhishko/org.jboss.tools.jsf.ui.auto.test/src/org/jboss/tools/jsf/ui/auto/test/cssdialog/jbide/JBIDE3890Test.java
workspace/yzhishko/org.jboss.tools.ui.auto.test/src/org/jboss/tools/ui/auto/test/JBTSWTBotTestCase.java
workspace/yzhishko/org.jboss.tools.vpe.ui.auto.test/src/org/jboss/tools/vpe/ui/auto/test/VPEAutoTestCase.java
Log:
New method waitForJobs() has been added as a new delay mechanism.
Modified:
workspace/yzhishko/org.jboss.tools.jsf.ui.auto.test/src/org/jboss/tools/jsf/ui/auto/test/cssdialog/jbide/JBIDE3890Test.java
===================================================================
---
workspace/yzhishko/org.jboss.tools.jsf.ui.auto.test/src/org/jboss/tools/jsf/ui/auto/test/cssdialog/jbide/JBIDE3890Test.java 2009-06-30
08:57:31 UTC (rev 16276)
+++
workspace/yzhishko/org.jboss.tools.jsf.ui.auto.test/src/org/jboss/tools/jsf/ui/auto/test/cssdialog/jbide/JBIDE3890Test.java 2009-06-30
09:41:11 UTC (rev 16277)
@@ -26,9 +26,9 @@
SWTBotEclipseEditor editor = bot.editorByTitle("hello.jsp").toTextEditor();
editor.selectLine(10);
editor.insertText("<body id=\"bodyId\">");
- delay();
+ waitForJobs();
editor.save();
- longDelay();
+ waitForJobs();
SWTBotMultiPageEditor multiPageEditor =
bot.multiPageEditorByTitle("hello.jsp");
performContentTest("test.xml", multiPageEditor);
}
Modified:
workspace/yzhishko/org.jboss.tools.ui.auto.test/src/org/jboss/tools/ui/auto/test/JBTSWTBotTestCase.java
===================================================================
---
workspace/yzhishko/org.jboss.tools.ui.auto.test/src/org/jboss/tools/ui/auto/test/JBTSWTBotTestCase.java 2009-06-30
08:57:31 UTC (rev 16276)
+++
workspace/yzhishko/org.jboss.tools.ui.auto.test/src/org/jboss/tools/ui/auto/test/JBTSWTBotTestCase.java 2009-06-30
09:41:11 UTC (rev 16277)
@@ -6,6 +6,7 @@
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
@@ -96,6 +97,10 @@
protected void delay() {
bot.sleep(1000);
}
+
+ protected void shortDelay(){
+ bot.sleep(3000);
+ }
protected void longDelay() {
bot.sleep(10000);
@@ -141,4 +146,11 @@
}
}
+ protected void waitForJobs(){
+ delay();
+ while (!Job.getJobManager().isIdle()) {
+ delay();
+ }
+ }
+
}
Modified:
workspace/yzhishko/org.jboss.tools.vpe.ui.auto.test/src/org/jboss/tools/vpe/ui/auto/test/VPEAutoTestCase.java
===================================================================
---
workspace/yzhishko/org.jboss.tools.vpe.ui.auto.test/src/org/jboss/tools/vpe/ui/auto/test/VPEAutoTestCase.java 2009-06-30
08:57:31 UTC (rev 16276)
+++
workspace/yzhishko/org.jboss.tools.vpe.ui.auto.test/src/org/jboss/tools/vpe/ui/auto/test/VPEAutoTestCase.java 2009-06-30
09:41:11 UTC (rev 16277)
@@ -84,7 +84,7 @@
} catch (Exception e2) {
}
}
-
+ waitForJobs();
}
protected void performContentTest(String expectedVPEContent, SWTBotMultiPageEditor
editor) throws Throwable{
Show replies by date