Author: vpakan(a)redhat.com
Date: 2012-10-10 09:35:54 -0400 (Wed, 10 Oct 2012)
New Revision: 44412
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2MoveParticipantTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2RenameParticipantTest.java
Log:
Improve waiting for events to finish
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java 2012-10-10
12:03:04 UTC (rev 44411)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java 2012-10-10
13:35:54 UTC (rev 44412)
@@ -5,6 +5,7 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public abstract class JSF2AbstractRefactorTest extends JSFAutoTestCase {
@@ -82,13 +83,14 @@
SWTBotEclipseEditor editor = bot.editorByTitle(
JSF2_Test_Page_Name + ".xhtml").toTextEditor(); //$NON-NLS-1$
editor.setFocus();
- bot.sleep(2000);
+ bot.sleep(Timing.time3S());
bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.menu("Edit").menu("Delete").click();
//$NON-NLS-1$//$NON-NLS-2$
- bot.sleep(2000);
+ bot.sleep(Timing.time3S());
editor.setText(loadFileContent("refactor/jsf2TestPage.html")); //$NON-NLS-1$
- bot.sleep(2000);
- editor.saveAndClose();
+ bot.sleep(Timing.time3S());
+ editor.save();
+ editor.close();
}
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2MoveParticipantTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2MoveParticipantTest.java 2012-10-10
12:03:04 UTC (rev 44411)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2MoveParticipantTest.java 2012-10-10
13:35:54 UTC (rev 44412)
@@ -3,7 +3,9 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JSF2MoveParticipantTest extends JSF2AbstractRefactorTest {
@@ -38,14 +40,16 @@
tree
.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
bot.menu("Refactor").menu("Move...").click(); //$NON-NLS-1$
//$NON-NLS-2$
- innerBot = bot.shell("Move").bot(); //$NON-NLS-1$
+ SWTBotShell shMove = bot.shell("Move").activate();
+ innerBot = shMove.bot(); //$NON-NLS-1$
tree = innerBot.tree();
tree
.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp1").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
bot.button("Preview >").click(); //$NON-NLS-1$
checkPreview();
bot.button("OK").click(); //$NON-NLS-1$
- delay();
+ bot.sleep(Timing.time3S());
+ util.waitForNonIgnoredJobs(Timing.time3S());
}
private void createDistResFolder() throws Exception {
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2RenameParticipantTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2RenameParticipantTest.java 2012-10-10
12:03:04 UTC (rev 44411)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2RenameParticipantTest.java 2012-10-10
13:35:54 UTC (rev 44412)
@@ -3,6 +3,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JSF2RenameParticipantTest extends JSF2AbstractRefactorTest {
@@ -21,6 +22,7 @@
tree
.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
bot.menu("Refactor").menu("Rename...").click(); //$NON-NLS-1$
//$NON-NLS-2$
+ bot.shell(IDELabel.Shell.RENAME_RESOURCE).activate();
bot.textWithLabel("New name:").setText("echo1.xhtml");
//$NON-NLS-1$ //$NON-NLS-2$
bot.button("Preview >").click(); //$NON-NLS-1$
checkPreview();
Show replies by date