Author: jgargula
Date: 2012-05-09 08:46:44 -0400 (Wed, 09 May 2012)
New Revision: 40869
Modified:
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/resources/project.properties
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DomainSpecificLanguageEditorTest.java
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java
Log:
Minor changes to tests (closing subclipse windows, checking DebugException)
Modified:
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/resources/project.properties
===================================================================
---
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/resources/project.properties 2012-05-09
09:19:08 UTC (rev 40868)
+++
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/resources/project.properties 2012-05-09
12:46:44 UTC (rev 40869)
@@ -1,3 +1,3 @@
use-external-drools-runtime=true
guvnor-repository-url=/jboss-brms/org.drools.guvnor.Guvnor/webdav
-external-drools-runtime-home=/home/vpakan/tmp/drools
+external-drools-runtime-home=/home/jgargula/Programs/drools-runtime
Modified:
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
===================================================================
---
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2012-05-09
09:19:08 UTC (rev 40868)
+++
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2012-05-09
12:46:44 UTC (rev 40869)
@@ -15,6 +15,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.drools.ui.bot.test.smoke.DecisionTableTest;
import org.jboss.tools.drools.ui.bot.test.smoke.DomainSpecificLanguageEditorTest;
import org.jboss.tools.drools.ui.bot.test.smoke.DroolsRulesEditorTest;
@@ -163,6 +164,13 @@
break;
}
}
+ for (SWTBotShell shell : bot.shells()) {
+ if (IDELabel.Shell.SUBCLIPSE_USAGE.equals(shell.getText())) {
+ shell.bot().checkBox().deselect();
+ shell.bot().button(IDELabel.Button.OK).click();
+ break;
+ }
+ }
eclipse.openPerspective(PerspectiveType.JAVA);
eclipse.maximizeActiveShell();
Modified:
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DomainSpecificLanguageEditorTest.java
===================================================================
---
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DomainSpecificLanguageEditorTest.java 2012-05-09
09:19:08 UTC (rev 40868)
+++
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DomainSpecificLanguageEditorTest.java 2012-05-09
12:46:44 UTC (rev 40869)
@@ -124,9 +124,11 @@
drlDroolsEditor.insertText(lineNumber,0,">");
}
drlDroolsEditor.selectLine(18);
- bot.sleep(Timing.time1S());
- KeyboardHelper.pressKeyCode(bot.getDisplay(),(int)SWT.DEL);
- bot.sleep(Timing.time1S());
+ // pressing DELETE was malfunctioning
+ bot.menu(IDELabel.Menu.EDIT).menu(IDELabel.Menu.DELETE).click();
+ //bot.sleep(Timing.time1S());
+ //KeyboardHelper.pressKeyCode(bot.getDisplay(),(int)SWT.DEL);
+ //bot.sleep(Timing.time1S());
drlDroolsEditor.insertText(18, 0, " Message m of type Message.GOODBYE
contains myMessage");
drlDroolsEditor.save();
util.waitForJobs(Timing.time10S(), JobName.BUILDING_WS);
Modified:
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java
===================================================================
---
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java 2012-05-09
09:19:08 UTC (rev 40868)
+++
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java 2012-05-09
12:46:44 UTC (rev 40869)
@@ -2,6 +2,8 @@
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withLabel;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -130,7 +132,14 @@
public void agendaTest() {
bot.editorByTitle(RULES_FILE).show();
eclipse.stepOver();
+ // Some hacks to read output stream and check exception
+ PrintStream defaultOutputStream = System.out;
+ ByteArrayOutputStream pipeOut = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(pipeOut));
openView(IDELabel.View.AGENDA);
+ System.setOut(defaultOutputStream);
+ String output = new String(pipeOut.toByteArray());
+ System.out.print(output);
HashSet<Activation> expectedSet = new HashSet<Activation>(2);
// indicies are not compared
expectedSet.add(new Activation(0, "Bye Bye"));
@@ -150,6 +159,7 @@
eclipse.finishDebug();
assertTrue(CONSOLE_TEXT_MESSAGE_1 + EXPECTED_CONSOLE_TEXT_1 +
EXPECTED_CONSOLE_TEXT_2 + CONSOLE_TEXT_MESSAGE_2
+ console.getConsoleText(), (EXPECTED_CONSOLE_TEXT_1 +
EXPECTED_CONSOLE_TEXT_2).equals(console.getConsoleText()));
+ assertFalse("Opening agenda view throws DebugException",
output.contains("DebugException"));
}
/**
@@ -230,6 +240,7 @@
auditView.toolbarButton("Clear Log").click();
assertEquals("Tree should be empty, but it was not.", 0,
auditView.bot().tree().getAllItems().length);
+ packageExplorer.selectTreeItem(PROJECT_NAME,
null).contextMenu(IDELabel.Menu.REFRESH).click();
}
/**
Show replies by date