Author: jpeterka
Date: 2011-06-02 12:59:56 -0400 (Thu, 02 Jun 2011)
New Revision: 31777
Modified:
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java
Log:
[jbpm-bot-test] deploy sequence added
Modified:
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java
===================================================================
---
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java 2011-06-02
16:51:20 UTC (rev 31776)
+++
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/src/org/jboss/tools/jbpm/ui/bot/test/JBPMDeployTest.java 2011-06-02
16:59:56 UTC (rev 31777)
@@ -12,6 +12,7 @@
import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.jboss.tools.jbpm.ui.bot.test.suite.JBPMTest;
import org.jboss.tools.jbpm.ui.bot.test.suite.Project;
@@ -51,10 +52,36 @@
item.setFocus();
bot.menu("jBPM").menu("Ping Server").click();
+
+ try {
+ bot.sleep(TIME_1S);
+ bot.shell("Password Required").activate();
+ bot.text("User name:").setText("admin");
+ bot.text("Password:").setText("admin");
+ bot.button("OK").click();
+ bot.sleep(TIME_1S);
+ } catch (WidgetNotFoundException e) {
+ // do nothing
+ log.info("jBPM already authenticated");
+ }
+
+ // Confirm ping message dialog
+ bot.sleep(TIME_1S);
+ bot.shell("Ping Server Successful").activate();
+ bot.button("OK").click();
+ bot.sleep(TIME_1S);
- //bot.text(0).setText("admin");
- //bot.text(1).setText("admin");
- //bot.clickButton(IDELabel.Button.OK);
- //bot.sleep(TIME_10S);
+
+ // Deploy
+ bot.menu("jBPM").menu("Deploy Process").click();
+ // Confirm deployed message dialog
+ bot.sleep(TIME_1S);
+ bot.shell("Deployment Successful").activate();
+ bot.button("OK").click();
+ bot.sleep(TIME_1S);
+
+ log.info("Process deployed");
+
+ // TODO - check via jpdl console
}
}