Author: vpakan(a)redhat.com
Date: 2010-07-08 09:19:50 -0400 (Thu, 08 Jul 2010)
New Revision: 23312
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java
Log:
Restore Maximazed Editors when test is finished.
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java
===================================================================
---
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java 2010-07-08
13:19:13 UTC (rev 23311)
+++
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java 2010-07-08
13:19:50 UTC (rev 23312)
@@ -60,6 +60,8 @@
private static final int NODES_NODE_CHILDREN_COUNT = 7;
private static final int CONNECTIONS_NODE_CHILDREN_COUNT = 1;
private static final int ROOT_NODE_CHILDREN_COUNT = 3;
+
+ private boolean isEditorMaximized = false;
/**
* Tests Rule Flow
*/
@@ -107,6 +109,7 @@
.menu(IDELabel.Menu.NAVIGATION)
.menu(IDELabel.Menu.MAXIMIZE_ACTIVE_VIEW_OR_EDITOR)
.click();
+ isEditorMaximized = true;
SWTGefBot gefBot = new SWTGefBot();
SWTBotGefEditor gefEditor = gefBot.gefEditor(ruleFlowFileName);
final Control editorControl = (Control)gefEditor.getWidget();
@@ -167,6 +170,7 @@
.menu(IDELabel.Menu.NAVIGATION)
.menu(IDELabel.Menu.MAXIMIZE_ACTIVE_VIEW_OR_EDITOR)
.click();
+ isEditorMaximized = false;
gefEditor.save();
gefEditor.close();
checkEmptyRFFile(DroolsAllBotTests.DROOLS_PROJECT_NAME , ruleFlowFileName);
@@ -435,4 +439,20 @@
return errorDescription;
}
+
+ protected void tearDown(){
+ if (isEditorMaximized){
+ // Restore maximized editor
+ bot.menu(IDELabel.Menu.WINDOW)
+ .menu(IDELabel.Menu.NAVIGATION)
+ .menu(IDELabel.Menu.MAXIMIZE_ACTIVE_VIEW_OR_EDITOR)
+ .click();
+ isEditorMaximized = false;
+ }
+ try {
+ super.tearDown();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
\ No newline at end of file
Show replies by date