Author: lzoubek(a)redhat.com
Date: 2011-08-17 10:39:34 -0400 (Wed, 17 Aug 2011)
New Revision: 34010
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
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/JSF2AttributeRenameTest.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
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/FacesConfigCodeCompletionTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MinMaxPanesTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextEditingActionsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextSelectionTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/ManipulatingELValueTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/SubstitutedELTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/BorderForUnknownTagsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PromptForTagAttributesDuringTagInsertTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowResourceBundlesUsageasELexpressionsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CoreHTMLTagsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/JSFTagsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/MarkersTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeAllStringsDialogTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java
Log:
fixing vpe bot tests to run with ReqAwareSuite
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -73,7 +73,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
// Restore page state before tests
if (editor != null) {
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -54,13 +54,13 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
//$NON-NLS-1$
+ tree.expandNode(JBT_TEST_PROJECT_NAME). //$NON-NLS-1$
expandNode("WebContent").expandNode("pages").getNode(CSS_FILE_NAME+".css").doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
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$
} catch (WidgetNotFoundException e) {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").getNode("pages").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").getNode("pages").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
open.newObject(ActionItem.NewObject.WebCSS.LABEL);
bot.shell("New CSS File").activate(); //$NON-NLS-1$
bot.textWithLabel("File name:").setText(CSS_FILE_NAME); //$NON-NLS-1$
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -20,13 +20,13 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
//$NON-NLS-1$
+ tree.expandNode(JBT_TEST_PROJECT_NAME). //$NON-NLS-1$
getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
//$NON-NLS-1$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).select(); //$NON-NLS-1$
open.newObject(ActionItem.NewObject.WebCSS.LABEL);
bot.shell("New CSS File").activate(); //$NON-NLS-1$
bot.textWithLabel("File name:").setText(CSS_FILE_NAME); //$NON-NLS-1$
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -20,13 +20,13 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
//$NON-NLS-1$
+ tree.expandNode(JBT_TEST_PROJECT_NAME). //$NON-NLS-1$
getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
//$NON-NLS-1$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).select(); //$NON-NLS-1$
open.newObject(ActionItem.NewObject.WebCSS.LABEL);
bot.shell("New CSS File").activate(); //$NON-NLS-1$
bot.textWithLabel("File name:").setText(CSS_FILE_NAME); //$NON-NLS-1$
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -20,13 +20,13 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
//$NON-NLS-1$
+ tree.expandNode(JBT_TEST_PROJECT_NAME). //$NON-NLS-1$
getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
//$NON-NLS-1$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).select(); //$NON-NLS-1$
open.newObject(ActionItem.NewObject.WebCSS.LABEL); //$NON-NLS-1$//$NON-NLS-2$
//$NON-NLS-3$
bot.shell("New CSS File").activate(); //$NON-NLS-1$
bot.textWithLabel("File name:").setText(CSS_FILE_NAME); //$NON-NLS-1$
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -17,13 +17,13 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
//$NON-NLS-1$
+ tree.expandNode(JBT_TEST_PROJECT_NAME). //$NON-NLS-1$
getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
//$NON-NLS-1$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).select(); //$NON-NLS-1$
open.newObject(ActionItem.NewObject.WebCSS.LABEL); //$NON-NLS-1$//$NON-NLS-2$
//$NON-NLS-3$
bot.shell("New CSS File").activate(); //$NON-NLS-1$
bot.textWithLabel("File name:").setText(CSS_FILE_NAME); //$NON-NLS-1$
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -20,13 +20,13 @@
SWTBot innerBot= bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
//$NON-NLS-1$
+ tree.expandNode(JBT_TEST_PROJECT_NAME). //$NON-NLS-1$
getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
//$NON-NLS-1$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).select(); //$NON-NLS-1$
open.newObject(ActionItem.NewObject.WebCSS.LABEL);; //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
bot.shell("New CSS File").activate(); //$NON-NLS-1$
bot.textWithLabel("File name:").setText(CSS_FILE_NAME); //$NON-NLS-1$
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 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -16,33 +16,33 @@
.bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").select();
//$NON-NLS-1$ //$NON-NLS-2$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).expandNode("WebContent").select();
//$NON-NLS-1$ //$NON-NLS-2$
bot.menu("File").menu("New").menu("Folder").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("resources");
//$NON-NLS-1$ //$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
}
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ 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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("File").menu("New").menu("Folder").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("mycomp"); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
}
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ 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$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("File").menu("New").menu("Folder").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("mycomp"); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
}
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ tree.getTreeItem(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("File").menu("New").menu("Other...").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.shell("New").activate(); //$NON-NLS-1$
tree = bot.tree();
@@ -67,10 +67,10 @@
.bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").
//$NON-NLS-1$ //$NON-NLS-2$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").
//$NON-NLS-1$ //$NON-NLS-2$
getNode(JSF2_Test_Page_Name + ".xhtml").doubleClick(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
//$NON-NLS-1$
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME).select(); //$NON-NLS-1$
bot.menu("File").menu("New").menu("Other...").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.shell("New").activate(); //$NON-NLS-1$
tree = bot.tree();
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -33,7 +33,7 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
delay();
SWTBotEclipseEditor editor = bot.editorByTitle(
JSF2_Test_Page_Name + ".xhtml").toTextEditor(); //$NON-NLS-1$
@@ -43,7 +43,7 @@
editor.close();
innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
tree = innerBot.tree();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
delay();
editor = bot.editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
assertEquals(
@@ -56,7 +56,7 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
SWTBotEclipseEditor editor = bot
.editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$
//$NON-NLS-2$
@@ -68,15 +68,15 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).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$
+ 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("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
@@ -86,8 +86,8 @@
private void checkPreview() throws IOException {
delay();
SWTBotTree tree = bot.tree();
- tree.expandNode("Composite attribute name
changes").expandNode("echo.xhtml - " +
projectProperties.getProperty("JSFProjectName") +
"/WebContent/resources/mycomp").expandNode("Rename composite attribute
name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- tree.expandNode("Composite attribute name
changes").expandNode("jsf2TestPage.xhtml - " +
projectProperties.getProperty("JSFProjectName") +
"/WebContent").expandNode("Rename composite attribute"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode("Composite attribute name
changes").expandNode("echo.xhtml - " + JBT_TEST_PROJECT_NAME +
"/WebContent/resources/mycomp").expandNode("Rename composite attribute
name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode("Composite attribute name
changes").expandNode("jsf2TestPage.xhtml - " + JBT_TEST_PROJECT_NAME +
"/WebContent").expandNode("Rename composite attribute"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
SWTBotStyledText styledText = bot.styledText(0);
assertEquals(
loadFileContent("refactor/compositeComponent.html"), styledText.getText());
//$NON-NLS-1$
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 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2MoveParticipantTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -21,7 +21,7 @@
.bot();
SWTBotTree tree = innerBot.tree();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ .expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
delay();
SWTBotEclipseEditor editor = bot.editorByTitle(
JSF2_Test_Page_Name + ".xhtml").toTextEditor(); //$NON-NLS-1$
@@ -36,12 +36,12 @@
.bot();
SWTBotTree tree = innerBot.tree();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ .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$
tree = innerBot.tree();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp1").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ .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$
@@ -55,11 +55,11 @@
SWTBotTree tree = innerBot.tree();
try {
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp1").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ .expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp1").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} catch (WidgetNotFoundException e) {
tree
.getTreeItem(
- projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("File").menu("New").menu("Folder").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("mycomp1");
//$NON-NLS-1$ //$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
@@ -68,18 +68,18 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
delay();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ .expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp1").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ .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.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
@@ -90,7 +90,7 @@
delay();
SWTBotTree tree = bot.tree();
tree
- .expandNode("Rename composite URI
changes").expandNode("jsf2TestPage.xhtml - " +
projectProperties.getProperty("JSFProjectName") +
"/WebContent").expandNode("Rename composite URI"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ .expandNode("Rename composite URI
changes").expandNode("jsf2TestPage.xhtml - " + JBT_TEST_PROJECT_NAME +
"/WebContent").expandNode("Rename composite URI"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
}
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 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2RenameParticipantTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -19,7 +19,7 @@
.bot();
SWTBotTree tree = innerBot.tree();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).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$
+ .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.textWithLabel("New name:").setText("echo1.xhtml");
//$NON-NLS-1$ //$NON-NLS-2$
bot.button("Preview >").click(); //$NON-NLS-1$
@@ -33,7 +33,7 @@
.bot();
SWTBotTree tree = innerBot.tree();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ .expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
delay();
SWTBotEclipseEditor editor = bot.editorByTitle(
JSF2_Test_Page_Name + ".xhtml").toTextEditor(); //$NON-NLS-1$
@@ -44,17 +44,17 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ .expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode(JSF2_Test_Page_Name
+ ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo1.xhtml").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ .expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo1.xhtml").select();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
@@ -65,7 +65,7 @@
delay();
SWTBotTree tree = bot.tree();
tree
- .expandNode("Rename composite component
changes").expandNode("jsf2TestPage.xhtml - " +
projectProperties.getProperty("JSFProjectName") +
"/WebContent").expandNode("Rename composite component"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ .expandNode("Rename composite component
changes").expandNode("jsf2TestPage.xhtml - " + JBT_TEST_PROJECT_NAME +
"/WebContent").expandNode("Rename composite component"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -82,7 +82,7 @@
bot.textWithLabel("web.xml Location:*").setText(webXmlFileLocation);
bot.button(WidgetVariables.NEXT_BUTTON).click();
- SWTJBTExt.addServerToServerViewOnWizardPage(bot, JBOSS_SERVER_GROUP,
JBOSS_SERVER_TYPE);
+ // SWTJBTExt.addServerToServerViewOnWizardPage(bot, JBOSS_SERVER_GROUP,
JBOSS_SERVER_TYPE);
bot.sleep(1000L);
bot.button(IDELabel.Button.FINISH).click();
eclipse.closeWarningWindowIfOpened(true);
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -391,7 +391,7 @@
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
editor.saveAndClose();
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/FacesConfigCodeCompletionTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/FacesConfigCodeCompletionTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/FacesConfigCodeCompletionTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -30,7 +30,7 @@
private SWTBotEditor facesConfigEditor;
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
facesConfigEditor = eclipse.openFile(VPEAutoTestCase.JBT_TEST_PROJECT_NAME,
"WebContent",
@@ -40,7 +40,7 @@
.selectPage(IDELabel.FacesConfigEditor.SOURCE_TAB_LABEL);
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
if (facesConfigEditor != null){
facesConfigEditor.saveAndClose();
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/MarkersTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -73,14 +73,14 @@
}
}
@Override
- protected void setUp() throws Exception {
+public void setUp() throws Exception {
super.setUp();
openPage(TEST_PAGE);
editor = SWTTestExt.bot.swtBotEditorExtByTitle(TEST_PAGE);
originalEditorText = editor.getText();
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
editor.saveAndClose();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -4,6 +4,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.vpe.ui.bot.test.editor.BlockCommentTest;
import org.jboss.tools.vpe.ui.bot.test.editor.EditingActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.InsertActionsTest;
@@ -89,95 +90,97 @@
import org.jboss.tools.vpe.ui.bot.test.wizard.ImportUnknownTagsWizardTest;
import org.jboss.tools.vpe.ui.bot.test.wizard.NewXHTMLPageWizardTest;
import org.jboss.tools.vpe.ui.bot.test.wizard.VPESourceCodeTemplatesPreferencePageTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses ({
+ VisualEditorContextMenuTest.class,
+ EditingActionsTest.class,
+ NewXHTMLPageWizardTest.class,
+ CodeCompletionTest.class,
+ ExternalizeStringsDialogTest.class,
+ CancelTagLibDefenitionTest.class,
+ ImportTagsFromTLDFileTest.class,
+ ToggleCommentTest.class,
+ BlockCommentTest.class,
+ ChangeEditorTabForTheFirstOpenPageTest.class,
+ JBIDE4556Test.class,
+ VerificationOfNameSpacesTest.class,
+ BorderForUnknownTagsTest.class,
+ ShowResourceBundlesUsageasELexpressionsTest.class,
+ ShowSelectionTagBarTest.class,
+ AlwaysHideSelectionBarWithoutPromptTest.class,
+ ShowNonVisualTagsTest.class,
+ AddSubstitutedELExpressionFolderScopeTest.class,
+ EditorSynchronizationTest.class,
+ JSPPageCreationTest.class,
+ XHTMLPageCreationTest.class,
+ RenameFacesConfigFileTest.class,
+ RenameJSPFileTest.class,
+ RenameXHTMLFileTest.class,
+ ImportUnknownTagsWizardTest.class,
+ VPESourceCodeTemplatesPreferencePageTest.class,
+ JspFileEditingTest.class,
+ ManagePaletteGroupsTest.class,
+ PaletteEditorTest.class,
+ ToolbarTextFormattingTest.class,
+ InsertActionsTest.class,
+ TextEditingActionsTest.class,
+ PromptForTagAttributesDuringTagInsertTest.class,
+ IncludedTagLibsTest.class,
+ SubstitutedELExressionsTest.class,
+ MinMaxPanesTest.class,
+ EditingELValueTest.class,
+ ManipulatingELValueTest.class,
+ SelectionBarTest.class,
+ IncludedCssFilesTest.class,
+ GlobalELVariablesTest.class,
+ IncludedCssFilesJSPTest.class,
+ StylesOnThePageTest.class,
+ TextSelectionTest.class,
+ CoreHTMLTagsTest.class,
+ JSFTagsTest.class,
+ ColumnsTagTest.class,
+ ComboBoxTagTest.class,
+ FileUploadTagTest.class,
+ InplaceInputTagTest.class,
+ InplaceSelectInputTagTest.class,
+ PickListTagTest.class,
+ ProgressTagTest.class,
+ PanelMenuTagTest.class,
+ ListShuttleTagTest.class,
+ DataDefinitionTagTest.class,
+ EditorTagTest.class,
+ TreeTagTest.class,
+ CalendarTagTest.class,
+ PanelTagTest.class,
+ DataTableTagTest.class,
+ SpacerTagTest.class,
+ DataScrollerTagTest.class,
+ ColumnTagTest.class,
+ ActionParamTagTest.class,
+ AjaxValidatorTagTest.class,
+ BeanValidatorTagTest.class,
+ ColumnGroupTagTest.class,
+ DataGridTagTest.class,
+ VirtualEarthTagTest.class,
+ DataListTagTest.class,
+ DataOrderedListTagTest.class,
+ ExtendedDataTableTagTest.class,
+ ToolbarAndToolbarGroupTagTest.class,
+ TogglePanelAndToogleControlTagTest.class,
+ CommandButtonTagTest.class,
+ CommandLinkTagTest.class,
+ HtmlCommandLinkTagTest.class,
+ IncludeTagTest.class,
+ AjaxInvisibleTagsTest.class,
+ LogTagTest.class,
+ OpenOnTest.class,
+ XhtmlFilePerformanceTest.class,
+ MarkersTest.class,
+ JBIDE9445Test_DuplicateSourceMenu.class
+})
public class VPEAllBotTests extends SWTBotTestCase{
- public static Test suite(){
- TestSuite suite = new TestSuite("VPE All Tests"); //$NON-NLS-1$
- suite.addTestSuite(VisualEditorContextMenuTest.class);
- suite.addTestSuite(EditingActionsTest.class);
- suite.addTestSuite(NewXHTMLPageWizardTest.class);
- suite.addTestSuite(CodeCompletionTest.class);
- suite.addTestSuite(ExternalizeStringsDialogTest.class);
- suite.addTestSuite(CancelTagLibDefenitionTest.class);
- suite.addTestSuite(ImportTagsFromTLDFileTest.class);
- suite.addTestSuite(ToggleCommentTest.class);
- suite.addTestSuite(BlockCommentTest.class);
- suite.addTestSuite(ChangeEditorTabForTheFirstOpenPageTest.class);
- suite.addTestSuite(JBIDE4556Test.class);
- suite.addTestSuite(VerificationOfNameSpacesTest.class);
- suite.addTestSuite(BorderForUnknownTagsTest.class);
- suite.addTestSuite(ShowResourceBundlesUsageasELexpressionsTest.class);
- suite.addTestSuite(ShowSelectionTagBarTest.class);
- suite.addTestSuite(AlwaysHideSelectionBarWithoutPromptTest.class);
- suite.addTestSuite(ShowNonVisualTagsTest.class);
- suite.addTestSuite(AddSubstitutedELExpressionFolderScopeTest.class);
- suite.addTestSuite(EditorSynchronizationTest.class);
- suite.addTestSuite(JSPPageCreationTest.class);
- suite.addTestSuite(XHTMLPageCreationTest.class);
- suite.addTestSuite(RenameFacesConfigFileTest.class);
- suite.addTestSuite(RenameJSPFileTest.class);
- suite.addTestSuite(RenameXHTMLFileTest.class);
- suite.addTestSuite(ImportUnknownTagsWizardTest.class);
- suite.addTestSuite(VPESourceCodeTemplatesPreferencePageTest.class);
- suite.addTestSuite(JspFileEditingTest.class);
- suite.addTestSuite(ManagePaletteGroupsTest.class);
- suite.addTestSuite(PaletteEditorTest.class);
- suite.addTestSuite(ToolbarTextFormattingTest.class);
- suite.addTestSuite(InsertActionsTest.class);
- suite.addTestSuite(TextEditingActionsTest.class);
- suite.addTestSuite(PromptForTagAttributesDuringTagInsertTest.class);
- suite.addTestSuite(IncludedTagLibsTest.class);
- suite.addTestSuite(SubstitutedELExressionsTest.class);
- suite.addTestSuite(MinMaxPanesTest.class);
- suite.addTestSuite(EditingELValueTest.class);
- suite.addTestSuite(ManipulatingELValueTest.class);
- suite.addTestSuite(SelectionBarTest.class);
- suite.addTestSuite(IncludedCssFilesTest.class);
- suite.addTestSuite(GlobalELVariablesTest.class);
- suite.addTestSuite(IncludedCssFilesJSPTest.class);
- suite.addTestSuite(StylesOnThePageTest.class);
- suite.addTestSuite(TextSelectionTest.class);
- suite.addTestSuite(CoreHTMLTagsTest.class);
- suite.addTestSuite(JSFTagsTest.class);
- suite.addTestSuite(ColumnsTagTest.class);
- suite.addTestSuite(ComboBoxTagTest.class);
- suite.addTestSuite(FileUploadTagTest.class);
- suite.addTestSuite(InplaceInputTagTest.class);
- suite.addTestSuite(InplaceSelectInputTagTest.class);
- suite.addTestSuite(PickListTagTest.class);
- suite.addTestSuite(ProgressTagTest.class);
- suite.addTestSuite(PanelMenuTagTest.class);
- suite.addTestSuite(ListShuttleTagTest.class);
- suite.addTestSuite(DataDefinitionTagTest.class);
- suite.addTestSuite(EditorTagTest.class);
- suite.addTestSuite(TreeTagTest.class);
- suite.addTestSuite(CalendarTagTest.class);
- suite.addTestSuite(PanelTagTest.class);
- suite.addTestSuite(DataTableTagTest.class);
- suite.addTestSuite(SpacerTagTest.class);
- suite.addTestSuite(DataScrollerTagTest.class);
- suite.addTestSuite(ColumnTagTest.class);
- suite.addTestSuite(ActionParamTagTest.class);
- suite.addTestSuite(AjaxValidatorTagTest.class);
- suite.addTestSuite(BeanValidatorTagTest.class);
- suite.addTestSuite(ColumnGroupTagTest.class);
- suite.addTestSuite(DataGridTagTest.class);
- suite.addTestSuite(VirtualEarthTagTest.class);
- suite.addTestSuite(DataListTagTest.class);
- suite.addTestSuite(DataOrderedListTagTest.class);
- suite.addTestSuite(ExtendedDataTableTagTest.class);
- suite.addTestSuite(ToolbarAndToolbarGroupTagTest.class);
- suite.addTestSuite(TogglePanelAndToogleControlTagTest.class);
- suite.addTestSuite(CommandButtonTagTest.class);
- suite.addTestSuite(CommandLinkTagTest.class);
- suite.addTestSuite(HtmlCommandLinkTagTest.class);
- suite.addTestSuite(IncludeTagTest.class);
- suite.addTestSuite(AjaxInvisibleTagsTest.class);
- suite.addTestSuite(LogTagTest.class);
- suite.addTestSuite(OpenOnTest.class);
- suite.addTestSuite(XhtmlFilePerformanceTest.class);
- suite.addTestSuite(MarkersTest.class);
- suite.addTestSuite(JBIDE9445Test_DuplicateSourceMenu.class);
- return new TestSetup(suite);
- }
+
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -18,6 +18,7 @@
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
@@ -25,16 +26,24 @@
import org.jboss.tools.vpe.ui.bot.test.Activator;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JBossToolsWebJSFJSFProject;
import org.jboss.tools.vpe.editor.xpl.CustomSashForm;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.wizards.SWTBotWizard;
import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
import org.jboss.tools.ui.bot.test.SWTBotJSPMultiPageEditor;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.VpeEditorPart;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
+import org.junit.After;
+import org.junit.Before;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -42,105 +51,31 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-public abstract class VPEAutoTestCase extends JBTSWTBotTestCase{
-
- protected static Properties projectProperties;
+@SWTBotTestRequires(server = @Server(state = ServerState.Present),
+ clearProjects=false,
+ clearWorkspace=false,
+ perspective="Web Development"
+ )
+public abstract class VPEAutoTestCase extends JBTSWTBotTestCase {
+
protected static final String TEST_PAGE = "inputUserName.jsp"; //$NON-NLS-1$
protected static final String FACELETS_TEST_PAGE = "inputname.xhtml";
//$NON-NLS-1$
- protected static String PROJECT_PROPERTIES = "projectProperties.properties";
//$NON-NLS-1$
protected static String JSF2_TEST_PAGE = "inputname.xhtml"; //$NON-NLS-1$
-
+
+ protected final static String JBT_TEST_PROJECT_NAME = "JBIDETestProject";
//$NON-NLS-1$
+ protected final static String FACELETS_TEST_PROJECT_NAME =
"FaceletsTestProject"; //$NON-NLS-1$
+ protected final static String JSF2_TEST_PROJECT_NAME = "JSF2TestProject";
//$NON-NLS-1$
+
/**
- * Variable defines JBoss EAP 4.3 server location on a file system
- */
-
- protected final static String JBOSS_EAP_HOME;
- protected final static String JBT_TEST_PROJECT_NAME;
- protected final static String FACELETS_TEST_PROJECT_NAME;
- protected final static String JSF2_TEST_PROJECT_NAME;
- protected final static String JBOSS_SERVER_GROUP;
- protected final static String JBOSS_SERVER_TYPE;
- protected final static String JBOSS_SERVER_RUNTIME_TYPE;
- protected final static String JBOSS_AS_FOR_JSF2_HOME;
- protected final static String JBOSS_AS_FOR_JSF2_SERVER_GROUP;
- protected final static String JBOSS_AS_FOR_JSF2_SERVER_TYPE;
- protected final static String JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE;
-
- /* (non-Javadoc)
- * This static block read properties from
- * org.jboss.tools.vpe.ui.bot.test/resources/projectProperties.properties file
- * and set up parameters for project which you would like to create. You may change a
number of parameters
- * in static block and their values in property file.
- */
-
- static {
- try {
- InputStream inputStream =
VPEAutoTestCase.class.getResourceAsStream("/"+PROJECT_PROPERTIES);
//$NON-NLS-1$
- projectProperties = new TestProperties();
- projectProperties.load(inputStream);
- inputStream.close();
- }
- catch (IOException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Can't load
properties from " + PROJECT_PROPERTIES + " file", e); //$NON-NLS-1$
//$NON-NLS-2$
- Activator.getDefault().getLog().log(status);
- e.printStackTrace();
- }
- catch (IllegalStateException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Property file
" + PROJECT_PROPERTIES + " was not found", e); //$NON-NLS-1$ //$NON-NLS-2$
- Activator.getDefault().getLog().log(status);
- e.printStackTrace();
- }
- if (projectProperties.containsKey("JBossEap5.x")){
- JBOSS_EAP_HOME = projectProperties.getProperty("JBossEap5.x");
//$NON-NLS-1$
- JBOSS_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_EAP_5_x;
- JBOSS_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_EAP_5_x;
- JBOSS_SERVER_TYPE = IDELabel.ServerType.JBOSS_EAP_5_x;
- }else if (projectProperties.containsKey("JBossEap5.0")){
- JBOSS_EAP_HOME = projectProperties.getProperty("JBossEap5.0");
//$NON-NLS-1$
- JBOSS_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_EAP_5_0;
- JBOSS_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_EAP_5_0;
- JBOSS_SERVER_TYPE = IDELabel.ServerType.JBOSS_EAP_5_0;
- }
- else {
- JBOSS_EAP_HOME = projectProperties.getProperty("JBossEap4.3");
//$NON-NLS-1$
- JBOSS_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_EAP_4_3;
- JBOSS_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_EAP_4_3;
- JBOSS_SERVER_TYPE = IDELabel.ServerType.JBOSS_EAP_4_3;
- }
- // Setup JSF2 project related properties
- if (projectProperties.containsKey("JBossASForJSF2")){
- JBOSS_AS_FOR_JSF2_HOME =
projectProperties.getProperty("JBossASForJSF2");
- String version =
projectProperties.getProperty("JBossASForJSF2Version","6.0");
- if (version.equals("6.0")){
- JBOSS_AS_FOR_JSF2_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_0;
- }
- else{
- throw new RuntimeException("Unsupported version of JBoss AS runtime for JSF2
[version=" + version +
- "location='" + JBOSS_AS_FOR_JSF2_HOME + "'
specified.");
- }
- }
- else{
- JBOSS_AS_FOR_JSF2_HOME = JBOSS_EAP_HOME;
- JBOSS_AS_FOR_JSF2_SERVER_GROUP = JBOSS_SERVER_GROUP;
- JBOSS_AS_FOR_JSF2_SERVER_TYPE = JBOSS_SERVER_TYPE;
- JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = JBOSS_SERVER_RUNTIME_TYPE;
- }
- JBT_TEST_PROJECT_NAME = projectProperties.getProperty("JSFProjectName");
//$NON-NLS-1$
- FACELETS_TEST_PROJECT_NAME =
projectProperties.getProperty("FaceletsProjectName"); //$NON-NLS-1$
- JSF2_TEST_PROJECT_NAME = projectProperties.getProperty("JSF2ProjectName");
//$NON-NLS-1$
- }
-
- /**
* @see #clearWorkbench()
* @see #createJSFProject(String)
*/
-
- protected void setUp() throws Exception {
+ @Before
+ public void setUp() throws Exception {
super.setUp();
clearWorkbench();
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
+ .bot();
SWTBotTree tree = innerBot.tree();
/*
* Test JSF project
@@ -159,83 +94,54 @@
createFaceletsProject(FACELETS_TEST_PROJECT_NAME);
}
/*
- * Test JSF2 project
- */
- try {
- tree.getTreeItem(JSF2_TEST_PROJECT_NAME);
- } catch (WidgetNotFoundException e) {
- createJSF2Project(JSF2_TEST_PROJECT_NAME);
- }
+ * Test JSF2 project
+ */
+ try {
+ tree.getTreeItem(JSF2_TEST_PROJECT_NAME);
+ } catch (WidgetNotFoundException e) {
+ // FIXME uncomment
+ //createJSF2Project(JSF2_TEST_PROJECT_NAME);
+ }
}
-
+
/**
- * Tears down the fixture. Verify Error Log. Close all dialogs which may be not closed
- * after test executing.
+ * Tears down the fixture. Verify Error Log. Close all dialogs which may be
+ * not closed after test executing.
+ *
* @see #clearWorkbench()
*/
-
- @Override
- protected void tearDown() throws Exception {
- clearWorkbench();
- new SWTJBTExt(bot).removeProjectFromServers(JBT_TEST_PROJECT_NAME);
+
+ @After
+ public void tearDown() throws Exception {
+ clearWorkbench();
+ new SWTJBTExt(bot).removeProjectFromServers(JBT_TEST_PROJECT_NAME);
super.tearDown();
}
-
+
/**
* Create JSF Project with <b>jsfProjectName</b>
- * @param jsfProjectName - name of created project
+ *
+ * @param jsfProjectName
+ * - name of created project
*/
- protected void createJSFProject(String jsfProjectName){
- bot.menu("File").menu("New").menu("Other...").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- bot.shell("New").activate(); //$NON-NLS-1$
- SWTBotTree tree = bot.tree();
- delay();
- tree.expandNode("JBoss Tools
Web").expandNode("JSF").select("JSF Project"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
- bot.button("Next >").click(); //$NON-NLS-1$
- bot.textWithLabel("Project Name*").setText(jsfProjectName); //$NON-NLS-1$
- bot.comboBoxWithLabel("Template*").setSelection("JSFKickStartWithoutLibs");
//$NON-NLS-1$ //$NON-NLS-2$
- bot.button("Next >").click(); //$NON-NLS-1$
- try {
- bot.comboBoxWithLabel("Runtime*").setSelection("JBoss EAP 4.3
Runtime"); //$NON-NLS-1$ //$NON-NLS-2$
- delay();
- bot.button("Finish").click(); //$NON-NLS-1$
- try {
- bot.button("Yes").click(); //$NON-NLS-1$
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e) {
- }
- } catch (Exception e) {
- bot.button(0).click();
- delay();
- SWTBotTree innerTree = bot.tree();
- delay();
- innerTree.expandNode(JBOSS_SERVER_GROUP).select(JBOSS_SERVER_RUNTIME_TYPE);
//$NON-NLS-1$ //$NON-NLS-2$
- bot.sleep(Timing.time1S());
- bot.button("Next >").click(); //$NON-NLS-1$
- bot.sleep(Timing.time1S());
- bot.textWithLabel("Home Directory").setText(JBOSS_EAP_HOME); //$NON-NLS-1$
- bot.sleep(Timing.time1S());
- bot.button("Finish").click(); //$NON-NLS-1$
- bot.sleep(Timing.time10S());
- bot.button("Finish").click(); //$NON-NLS-1$
- bot.sleep(Timing.time10S());
- try {
- bot.button("Yes").click(); //$NON-NLS-1$
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e2) {
- }
- }
- waitForBlockingJobsAcomplished(60*1000L, BUILDING_WS);
+ protected void createJSFProject(String jsfProjectName) {
+ SWTBot wiz = open.newObject(JBossToolsWebJSFJSFProject.LABEL);
+ wiz.textWithLabel("Project Name*").setText(jsfProjectName); //$NON-NLS-1$
+ wiz.comboBoxWithLabel("Template*").setSelection("JSFKickStartWithoutLibs");
//$NON-NLS-1$ //$NON-NLS-2$
+ wiz.button("Next >").click(); //$NON-NLS-1$
+ wiz.comboBoxWithLabel("Runtime:*").setSelection(SWTTestExt.configuredState.getServer().name);
//$NON-NLS-1$ //$NON-NLS-2$
+ open.finish(wiz);
+ waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
setException(null);
}
-
+
/**
* Create Facelets Project with <b>faceletsProjectName</b>
- * @param faceletsProjectName - name of created project
+ *
+ * @param faceletsProjectName
+ * - name of created project
*/
- protected void createFaceletsProject(String faceletsProjectName){
+ protected void createFaceletsProject(String faceletsProjectName) {
bot.menu("File").menu("New").menu("Other...").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.shell("New").activate(); //$NON-NLS-1$
SWTBotTree tree = bot.tree();
@@ -246,63 +152,54 @@
bot.comboBoxWithLabel("JSF Environment*").setSelection("JSF 1.2 with
Facelets"); //$NON-NLS-1$ //$NON-NLS-2$
bot.comboBoxWithLabel("Template*").setSelection("FaceletsKickStartWithoutLibs");
//$NON-NLS-1$ //$NON-NLS-2$
bot.button("Next >").click(); //$NON-NLS-1$
+
+ bot.comboBoxWithLabel("Runtime:*").setSelection(SWTTestExt.configuredState.getServer().name);
//$NON-NLS-1$ //$NON-NLS-2$
+ delay();
+ bot.button("Finish").click(); //$NON-NLS-1$
try {
- bot.comboBoxWithLabel("Runtime*").setSelection("JBoss EAP 4.3
Runtime"); //$NON-NLS-1$ //$NON-NLS-2$
- delay();
- bot.button("Finish").click(); //$NON-NLS-1$
- try {
- bot.button("Yes").click(); //$NON-NLS-1$
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e) {
- }
- } catch (Exception e) {
- bot.button(0).click();
- SWTBotTree innerTree = bot.tree();
- delay();
- innerTree.expandNode(JBOSS_SERVER_GROUP).select(JBOSS_SERVER_RUNTIME_TYPE);
- delay();
- bot.button("Next >").click(); //$NON-NLS-1$
- bot.textWithLabel("Home Directory").setText(JBOSS_EAP_HOME); //$NON-NLS-1$
- bot.button("Finish").click(); //$NON-NLS-1$
- delay();
- bot.button("Finish").click(); //$NON-NLS-1$
- try {
- bot.button("Yes").click(); //$NON-NLS-1$
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e2) {
- }
+ bot.button("Yes").click(); //$NON-NLS-1$
+ openErrorLog();
+ openPackageExplorer();
+ } catch (WidgetNotFoundException e) {
}
- waitForBlockingJobsAcomplished(60*1000L, BUILDING_WS);
+
+ waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
setException(null);
}
-
+
/**
- * Test content of elements from <b>editor</b> by IDs.<p>
+ * Test content of elements from <b>editor</b> by IDs.
+ * <p>
* Tested elements from source editor should have id's attributes that
* correspond to expected one from <b>expectedVPEContentFile</b>.
- * @param expectedVPEContentFile - file name, for example,
<i>"ShowNonVisualTags.xml"</i>
- * with expected VPE DOM Elements and id's attributes correspond to source
<b>editor</b> element
- * @param editor - {@link JSPMultiPageEditor} that contains source code with tested
elements and current id.
+ *
+ * @param expectedVPEContentFile
+ * - file name, for example,
<i>"ShowNonVisualTags.xml"</i> with
+ * expected VPE DOM Elements and id's attributes correspond to
+ * source <b>editor</b> element
+ * @param editor
+ * - {@link JSPMultiPageEditor} that contains source code with
+ * tested elements and current id.
* @throws Throwable
* @see SWTBotJSPMultiPageEditor
* @see Throwable
*/
@Deprecated
- protected void performContentTestByIDs(String expectedVPEContentFile,
SWTBotJSPMultiPageEditor editor) throws Throwable{
-
+ protected void performContentTestByIDs(String expectedVPEContentFile,
+ SWTBotJSPMultiPageEditor editor) throws Throwable {
+
JSPMultiPageEditor multiPageEditor = editor.getJspMultiPageEditor();
assertNotNull(multiPageEditor);
-
+
VpeController controller = TestUtil.getVpeController(multiPageEditor);
-
+
String expectedVPEContentFilePath = getPathToResources(expectedVPEContentFile);
-
- File xmlTestFile = new File (expectedVPEContentFilePath);
-
+
+ File xmlTestFile = new File(expectedVPEContentFilePath);
+
Document xmlTestDocument = TestDomUtil.getDocument(xmlTestFile);
- assertNotNull("Can't get test file, possibly file not exists
"+xmlTestFile,xmlTestDocument); //$NON-NLS-1$
+ assertNotNull(
+ "Can't get test file, possibly file not exists " + xmlTestFile,
xmlTestDocument); //$NON-NLS-1$
List<String> ids = TestDomUtil.getTestIds(xmlTestDocument);
@@ -314,16 +211,16 @@
if (getException() != null) {
throw getException();
}
-
+
}
-
+
private void compareElements(VpeController controller,
Document xmlTestDocument, String elementId, String xmlTestId)
throws ComparisonException {
// get element by id
nsIDOMElement vpeElement = findElementById(controller, elementId);
- assertNotNull("Cann't find element with id="+elementId,vpeElement);
//$NON-NLS-1$
+ assertNotNull("Cann't find element with id=" + elementId, vpeElement);
//$NON-NLS-1$
// get test element by id - get <test id="..." > element and get his
// first child
@@ -354,41 +251,40 @@
return (nsIDOMElement) nodeMapping.getVisualNode();
}
-
+
private Element findSourceElementById(VpeController controller,
String elementId) {
return getSourceDocument(controller).getElementById(elementId);
}
-
+
private Document getSourceDocument(VpeController controller) {
return controller.getSourceBuilder().getSourceDocument();
}
-
+
protected String getPathToResources(String testPage) throws IOException {
- String filePath = FileLocator
- .toFileURL(
- Platform.getBundle(Activator.PLUGIN_ID)
- .getEntry("/"))
- .getFile()+
- "resources/"
- +
- testPage; //$NON-NLS-1$//$NON-NLS-2$
+ String filePath = FileLocator.toFileURL(
+ Platform.getBundle(Activator.PLUGIN_ID).getEntry("/"))
+ .getFile()
+ + "resources/" + testPage; //$NON-NLS-1$//$NON-NLS-2$
File file = new File(filePath);
if (!file.exists()) {
- filePath =
FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile()+testPage;
//$NON-NLS-1$
+ filePath = FileLocator
+ .toFileURL(
+ Platform.getBundle(Activator.PLUGIN_ID).getEntry(
+ "/")).getFile() + testPage; //$NON-NLS-1$
}
return filePath;
}
-
+
@Override
protected void activePerspective() {
if (!bot.perspectiveByLabel("Web Development").isActive()) { //$NON-NLS-1$
bot.perspectiveByLabel("Web Development").activate(); //$NON-NLS-1$
}
}
-
- protected void openPalette(){
+
+ protected void openPalette() {
try {
bot.viewByTitle(WidgetVariables.PALETTE);
} catch (WidgetNotFoundException e) {
@@ -400,15 +296,16 @@
bot.button("OK").click(); //$NON-NLS-1$
}
}
-
+
/**
- * Close all dialogs and editors, which may be not closed
- * after test executing.
+ * Close all dialogs and editors, which may be not closed after test
+ * executing.
+ *
* @see #isUnuseDialogOpened()
* @see #closeUnuseDialogs()
*/
-
- protected void clearWorkbench(){
+
+ protected void clearWorkbench() {
while (isUnuseDialogOpened()) {
closeUnuseDialogs();
}
@@ -419,264 +316,295 @@
}
}
}
-
+
/**
- * Test content for elements from all VPE DOM that are nested with
<i>BODY</i> descriptor
- * @param expectedVPEContentFile - file name, for example,
<i>"VerificationOfNameSpaces.xml"</i>
- * with expected VPE DOM Elements that are nested with <i>BODY</i>
descriptor
- * @param editor - {@link JSPMultiPageEditor} that contains source code of currently
tested page.
+ * Test content for elements from all VPE DOM that are nested with
+ * <i>BODY</i> descriptor
+ *
+ * @param expectedVPEContentFile
+ * - file name, for example,
+ * <i>"VerificationOfNameSpaces.xml"</i> with expected
VPE DOM
+ * Elements that are nested with <i>BODY</i> descriptor
+ * @param editor
+ * - {@link JSPMultiPageEditor} that contains source code of
+ * currently tested page.
* @throws Throwable
*/
-
- protected void performContentTestByDocument(String expectedVPEContentFile,
SWTBotJSPMultiPageEditor editor) throws Throwable{
+
+ protected void performContentTestByDocument(String expectedVPEContentFile,
+ SWTBotJSPMultiPageEditor editor) throws Throwable {
JSPMultiPageEditor multiPageEditor = editor.getJspMultiPageEditor();
assertNotNull(multiPageEditor);
-
- nsIDOMDocument visualDocument =
((VpeEditorPart)multiPageEditor.getVisualEditor()).getVisualEditor().getDomDocument();
-
+
+ nsIDOMDocument visualDocument = ((VpeEditorPart) multiPageEditor
+ .getVisualEditor()).getVisualEditor().getDomDocument();
+
String expectedVPEContentFilePath = getPathToResources(expectedVPEContentFile);
-
- File xmlTestFile = new File (expectedVPEContentFilePath);
-
+
+ File xmlTestFile = new File(expectedVPEContentFilePath);
+
Document xmlTestDocument = TestDomUtil.getDocument(xmlTestFile);
- assertNotNull("Can't get test file, possibly file not exists
"+xmlTestFile,xmlTestDocument); //$NON-NLS-1$
-
+ assertNotNull(
+ "Can't get test file, possibly file not exists " + xmlTestFile,
xmlTestDocument); //$NON-NLS-1$
+
compareDocuments(visualDocument, xmlTestDocument);
}
-
- private void compareDocuments (nsIDOMDocument visualDocument, Document xmlTestDocument)
throws ComparisonException{
- nsIDOMNode visualBodyNode =
visualDocument.getElementsByTagName("BODY").item(0); //$NON-NLS-1$
- Node testBodyNode = xmlTestDocument.getElementsByTagName("BODY").item(0);
//$NON-NLS-1$
+
+ private void compareDocuments(nsIDOMDocument visualDocument,
+ Document xmlTestDocument) throws ComparisonException {
+ nsIDOMNode visualBodyNode = visualDocument
+ .getElementsByTagName("BODY").item(0); //$NON-NLS-1$
+ Node testBodyNode = xmlTestDocument
+ .getElementsByTagName("BODY").item(0); //$NON-NLS-1$
TestDomUtil.compareNodes(visualBodyNode, testBodyNode);
}
/**
* Try to close all unnecessary dialogs, that could prevent next tests fails
*/
-
+
protected abstract void closeUnuseDialogs();
/**
* Verify if any dialog that should be closed is opened
*/
-
+
protected abstract boolean isUnuseDialogOpened();
+
/**
* Opens page pageName
+ *
* @param pageName
*/
- protected void openPage(String pageName){
- openPage(pageName,VPEAutoTestCase.JBT_TEST_PROJECT_NAME);
- }
+ protected void openPage(String pageName) {
+ openPage(pageName, VPEAutoTestCase.JBT_TEST_PROJECT_NAME);
+ }
+
/**
- * Opens page pageName from projectName
- * @param pageName
- * @param projectName
- */
- protected void openPage(String pageName , String projectName){
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- tree.expandNode(projectName)
- .expandNode("WebContent")
- .expandNode("pages")
- .getNode(pageName)
- .doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$
- bot.sleep(Timing.time3S());
- }
+ * Opens page pageName from projectName
+ *
+ * @param pageName
+ * @param projectName
+ */
+ protected void openPage(String pageName, String projectName) {
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
+ .bot();
+ SWTBotTree tree = innerBot.tree();
+ tree.expandNode(projectName).expandNode("WebContent")
+ .expandNode("pages").getNode(pageName).doubleClick(); //$NON-NLS-1$
//$NON-NLS-2$
+ bot.sleep(Timing.time3S());
+ }
+
/**
* Opens Test Page
*/
- protected void openPage(){
- openPage(VPEAutoTestCase.TEST_PAGE,VPEAutoTestCase.JBT_TEST_PROJECT_NAME);
- }
+ protected void openPage() {
+ openPage(VPEAutoTestCase.TEST_PAGE,
+ VPEAutoTestCase.JBT_TEST_PROJECT_NAME);
+ }
+
/**
* Creates new empty JSP page within test project
+ *
* @param pageName
- * @param subDirs - complete path to page location within workspace
+ * @param subDirs
+ * - complete path to page location within workspace
*/
- protected void createJspPage (String pageName , String... subDirs){
- SWTBotTreeItem tiPageParent = null;
- if (subDirs == null || subDirs.length == 0) {
- tiPageParent = packageExplorer.selectTreeItem("pages", new String[]
{VPEAutoTestCase.JBT_TEST_PROJECT_NAME,"WebContent"});
- }
- else{
- String[] subPath = Arrays.copyOfRange(subDirs, 0, subDirs.length - 1);
- tiPageParent = packageExplorer.selectTreeItem(subDirs[subDirs.length - 1],
subPath);
- }
- tiPageParent.expand();
- try {
- tiPageParent.getNode(pageName).doubleClick();
- } catch (WidgetNotFoundException e) {
- open.newObject(ActionItem.NewObject.WebJSP.LABEL);
- bot.shell(IDELabel.Shell.NEW_JSP_FILE).activate();
- bot.textWithLabel(ActionItem.NewObject.WebJSP.TEXT_FILE_NAME).setText(pageName);
- bot.button(IDELabel.Button.NEXT).click();
- bot.table().select(IDELabel.NewJSPFileDialog.JSP_TEMPLATE);
- bot.button(IDELabel.Button.FINISH).click();
- }
- bot.sleep(Timing.time2S());
+ protected void createJspPage(String pageName, String... subDirs) {
+ SWTBotTreeItem tiPageParent = null;
+ if (subDirs == null || subDirs.length == 0) {
+ tiPageParent = packageExplorer.selectTreeItem("pages",
+ new String[] { VPEAutoTestCase.JBT_TEST_PROJECT_NAME,
+ "WebContent" });
+ } else {
+ String[] subPath = Arrays.copyOfRange(subDirs, 0,
+ subDirs.length - 1);
+ tiPageParent = packageExplorer.selectTreeItem(
+ subDirs[subDirs.length - 1], subPath);
+ }
+ tiPageParent.expand();
+ try {
+ tiPageParent.getNode(pageName).doubleClick();
+ } catch (WidgetNotFoundException e) {
+ open.newObject(ActionItem.NewObject.WebJSP.LABEL);
+ bot.shell(IDELabel.Shell.NEW_JSP_FILE).activate();
+ bot.textWithLabel(ActionItem.NewObject.WebJSP.TEXT_FILE_NAME)
+ .setText(pageName);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.table().select(IDELabel.NewJSPFileDialog.JSP_TEMPLATE);
+ bot.button(IDELabel.Button.FINISH).click();
+ }
+ bot.sleep(Timing.time2S());
}
+
/**
* Deletes page pageName
+ *
* @param pageName
*/
- protected void deletePage(String pageName){
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent")
//$NON-NLS-1$
- .expandNode("pages").getNode("testPage.jsp").select();
//$NON-NLS-1$//$NON-NLS-2$
- bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
- bot.shell("Confirm Delete").activate(); //$NON-NLS-1$
- bot.button("OK").click(); //$NON-NLS-1$
+ protected void deletePage(String pageName) {
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
+ .bot();
+ innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME)
+ .expandNode("WebContent") //$NON-NLS-1$
+ .expandNode("pages").getNode("testPage.jsp").select();
//$NON-NLS-1$//$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
+ bot.shell("Confirm Delete").activate(); //$NON-NLS-1$
+ bot.button("OK").click(); //$NON-NLS-1$
}
- /**
- * Maximize Source Pane
- * @param botExt
- * @param pageName
- */
- public void maximizeSourcePane(SWTBotExt botExt, String pageName) {
- botExt.swtBotEditorExtByTitle(pageName).selectPage(
- IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
- final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
- bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
- UIThreadRunnable.syncExec(new VoidResult() {
- @Override
- public void run() {
- csf.maxDown();
- }
- });
- }
- /**
- * Maximize Visual Pane
- * @param botExt
- * @param pageName
- */
- public void maximizeVisualPane(SWTBotExt botExt, String pageName) {
- botExt.swtBotEditorExtByTitle(pageName).selectPage(
- IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+ /**
+ * Maximize Source Pane
+ *
+ * @param botExt
+ * @param pageName
+ */
+ public void maximizeSourcePane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
- final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
- bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
- UIThreadRunnable.syncExec(new VoidResult() {
- @Override
- public void run() {
- csf.maxUp();
- }
- });
- }
- /**
- * Restore Source Pane
- * @param botExt
- * @param pageName
- */
- public void restoreSourcePane(SWTBotExt botExt, String pageName) {
- botExt.swtBotEditorExtByTitle(pageName).selectPage(
- IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf = bot.widgets(
+ widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.maxDown();
+ }
+ });
+ }
- final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
- bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
- UIThreadRunnable.syncExec(new VoidResult() {
- @Override
- public void run() {
- csf.downClicked();
- }
- });
- }
- /**
- * Restore Visual Pane
- * @param botExt
- * @param pageName
- */
- public void restoreVisualPane(SWTBotExt botExt, String pageName) {
- botExt.swtBotEditorExtByTitle(pageName).selectPage(
- IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+ /**
+ * Maximize Visual Pane
+ *
+ * @param botExt
+ * @param pageName
+ */
+ public void maximizeVisualPane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
- final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf =
- bot.widgets(widgetOfType(CustomSashForm.class)).get(0);
- UIThreadRunnable.syncExec(new VoidResult() {
- @Override
- public void run() {
- csf.upClicked();
- }
- });
- }
- /**
- * Creates new empty xhtml page within test project
- * @param pageName
- * @param subDirs - complete path to page location within workspace
- */
- protected void createXhtmlPage (String pageName , String... subDirs){
- SWTBotTreeItem tiPageParent = null;
- if (subDirs == null || subDirs.length == 0) {
- tiPageParent = packageExplorer.selectTreeItem("pages", new String[]
{VPEAutoTestCase.JBT_TEST_PROJECT_NAME,"WebContent"});
- }
- else{
- String[] subPath = Arrays.copyOfRange(subDirs, 0, subDirs.length - 1);
- tiPageParent = packageExplorer.selectTreeItem(subDirs[subDirs.length - 1],
subPath);
- }
- tiPageParent.expand();
- try {
- tiPageParent.getNode(pageName).doubleClick();
- } catch (WidgetNotFoundException e) {
- open.newObject(ActionItem.NewObject.JBossToolsWebXHTMLFile.LABEL);
- bot.shell(IDELabel.Shell.NEW_XHTML_FILE).activate();
-
bot.textWithLabel(ActionItem.NewObject.JBossToolsWebXHTMLFile.TEXT_FILE_NAME).setText(pageName);
- bot.button(IDELabel.Button.NEXT).click();
- SWTBotCheckBox cbUseTemplate =
bot.checkBox(IDELabel.NewXHTMLFileDialog.USE_XHTML_TEMPLATE_CHECK_BOX);
- if (cbUseTemplate.isChecked()){
- cbUseTemplate.deselect();
- }
- bot.button(IDELabel.Button.FINISH).click();
- }
- bot.sleep(Timing.time2S());
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf = bot.widgets(
+ widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.maxUp();
+ }
+ });
+ }
- }
+ /**
+ * Restore Source Pane
+ *
+ * @param botExt
+ * @param pageName
+ */
+ public void restoreSourcePane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
- /**
- * Create JSF2 Project with <b>jsf2ProjectName</b>
- * @param jsf2ProjectName - name of created project
- */
- protected void createJSF2Project(String jsf2ProjectName){
- open.newObject(ActionItem.NewObject.JBossToolsWebJSFJSFProject.LABEL);
-
bot.textWithLabel(IDELabel.NewJsfProjectDialog.PROJECT_NAME_LABEL).setText(jsf2ProjectName);
- bot.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.JSF_ENVIRONMENT_LABEL)
- .setSelection("JSF 2.0");//$NON-NLS-1$
- bot.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.TEMPLATE_LABEL)
- .setSelection("JSFKickStartWithoutLibs");//$NON-NLS-1$
- bot.button(IDELabel.Button.NEXT).click();
- try {
- bot.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.RUNTIME_LABEL)
- .setSelection(JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE);
- delay();
- bot.button(IDELabel.Button.FINISH).click();
- try {
- bot.button(IDELabel.Button.YES).click();
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e) {
- }
- } catch (Exception e) {
- bot.button(0).click();
- SWTBotTree innerTree = bot.tree();
- delay();
-
innerTree.expandNode(JBOSS_AS_FOR_JSF2_SERVER_GROUP).select(JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE);
- delay();
- bot.button(IDELabel.Button.NEXT).click();
-
bot.textWithLabel(IDELabel.NewJsfProjectDialog.HOME_DIRECTORY_LABEL).setText(JBOSS_AS_FOR_JSF2_HOME);
- bot.button(IDELabel.Button.FINISH).click();
- delay();
- bot.button(IDELabel.Button.FINISH).click();
- try {
- bot.button(IDELabel.Button.YES).click();
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e2) {
- }
- }
- waitForBlockingJobsAcomplished(60*1000L, BUILDING_WS);
- setException(null);
- }
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf = bot.widgets(
+ widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.downClicked();
+ }
+ });
+ }
+ /**
+ * Restore Visual Pane
+ *
+ * @param botExt
+ * @param pageName
+ */
+ public void restoreVisualPane(SWTBotExt botExt, String pageName) {
+ botExt.swtBotEditorExtByTitle(pageName).selectPage(
+ IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+
+ final org.jboss.tools.vpe.editor.xpl.CustomSashForm csf = bot.widgets(
+ widgetOfType(CustomSashForm.class)).get(0);
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ csf.upClicked();
+ }
+ });
+ }
+
+ /**
+ * Creates new empty xhtml page within test project
+ *
+ * @param pageName
+ * @param subDirs
+ * - complete path to page location within workspace
+ */
+ protected void createXhtmlPage(String pageName, String... subDirs) {
+ SWTBotTreeItem tiPageParent = null;
+ if (subDirs == null || subDirs.length == 0) {
+ tiPageParent = packageExplorer.selectTreeItem("pages",
+ new String[] { VPEAutoTestCase.JBT_TEST_PROJECT_NAME,
+ "WebContent" });
+ } else {
+ String[] subPath = Arrays.copyOfRange(subDirs, 0,
+ subDirs.length - 1);
+ tiPageParent = packageExplorer.selectTreeItem(
+ subDirs[subDirs.length - 1], subPath);
+ }
+ tiPageParent.expand();
+ try {
+ tiPageParent.getNode(pageName).doubleClick();
+ } catch (WidgetNotFoundException e) {
+ open.newObject(ActionItem.NewObject.JBossToolsWebXHTMLFile.LABEL);
+ bot.shell(IDELabel.Shell.NEW_XHTML_FILE).activate();
+ bot.textWithLabel(
+ ActionItem.NewObject.JBossToolsWebXHTMLFile.TEXT_FILE_NAME)
+ .setText(pageName);
+ bot.button(IDELabel.Button.NEXT).click();
+ SWTBotCheckBox cbUseTemplate = bot
+ .checkBox(IDELabel.NewXHTMLFileDialog.USE_XHTML_TEMPLATE_CHECK_BOX);
+ if (cbUseTemplate.isChecked()) {
+ cbUseTemplate.deselect();
+ }
+ bot.button(IDELabel.Button.FINISH).click();
+ }
+ bot.sleep(Timing.time2S());
+
+ }
+
+ /**
+ * Create JSF2 Project with <b>jsf2ProjectName</b>
+ *
+ * @param jsf2ProjectName
+ * - name of created project
+ */
+ protected void createJSF2Project(String jsf2ProjectName) {
+ SWTBot wiz = open
+ .newObject(ActionItem.NewObject.JBossToolsWebJSFJSFProject.LABEL);
+ wiz.textWithLabel(IDELabel.NewJsfProjectDialog.PROJECT_NAME_LABEL)
+ .setText(jsf2ProjectName);
+ wiz.comboBoxWithLabel(
+ IDELabel.NewJsfProjectDialog.JSF_ENVIRONMENT_LABEL)
+ .setSelection("JSF 2.0");//$NON-NLS-1$
+ wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.TEMPLATE_LABEL)
+ .setSelection("JSFKickStartWithoutLibs");//$NON-NLS-1$
+ wiz.button(IDELabel.Button.NEXT).click();
+ wiz.comboBoxWithLabel("Runtime:*").setSelection(
+ SWTTestExt.configuredState.getServer().name);
+ delay();
+ bot.button(IDELabel.Button.FINISH).click();
+ try {
+ bot.button(IDELabel.Button.YES).click();
+ openErrorLog();
+ openPackageExplorer();
+ } catch (WidgetNotFoundException e) {
+ }
+
+ waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
+ setException(null);
+ }
+
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/EditingActionsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -56,7 +56,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(EditingActionsTest.TEST_PAGE_NAME);
@@ -353,7 +353,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
jspEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -44,7 +44,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(InsertActionsTest.TEST_PAGE_NAME);
@@ -164,7 +164,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
jspTextEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MinMaxPanesTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MinMaxPanesTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MinMaxPanesTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -111,7 +111,7 @@
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(MinMaxPanesTest.TEST_PAGE_NAME);
@@ -121,7 +121,7 @@
webBrowser = new SWTBotWebBrowser(MinMaxPanesTest.TEST_PAGE_NAME,botExt);
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
jspTextEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextEditingActionsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextEditingActionsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextEditingActionsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -59,7 +59,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(TextEditingActionsTest.TEST_PAGE_NAME);
@@ -214,7 +214,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
jspEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextSelectionTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextSelectionTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextSelectionTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -55,7 +55,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(TextSelectionTest.TEST_PAGE_NAME);
@@ -174,7 +174,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
jspEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -67,7 +67,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
//Restore page state before tests
if (editor != null){
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -126,7 +126,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).setFocus();
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent")
//$NON-NLS-1$
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -40,7 +40,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
}
@@ -128,7 +128,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
if (jspGreetingPageEditor != null){
jspGreetingPageEditor.show();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/ManipulatingELValueTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/ManipulatingELValueTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/ManipulatingELValueTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -43,7 +43,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
}
@@ -109,7 +109,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
deleteAllELSubstitutions();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/SubstitutedELTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/SubstitutedELTestCase.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/SubstitutedELTestCase.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -38,12 +38,12 @@
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
bot.toolbarButtonWithTooltip(PAGE_DESIGN).click();
bot.shell(PAGE_DESIGN).activate();
bot.tabItem(SUBSTITUTED_EL).activate();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/BorderForUnknownTagsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/BorderForUnknownTagsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/BorderForUnknownTagsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -59,7 +59,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
//Restore page state before tests
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -44,7 +44,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
//Delete test page if it has been created
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -86,7 +86,7 @@
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
SWTBotTree preferenceTree = this.bot.tree();
preferenceTree.expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS)
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -61,14 +61,14 @@
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
openPage();
setPreferencesToDefault(true);
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
openPage();
setPreferencesToDefault(true);
super.tearDown();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PromptForTagAttributesDuringTagInsertTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PromptForTagAttributesDuringTagInsertTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PromptForTagAttributesDuringTagInsertTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -25,7 +25,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(PromptForTagAttributesDuringTagInsertTest.TEST_PAGE_NAME);
@@ -75,7 +75,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowResourceBundlesUsageasELexpressionsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowResourceBundlesUsageasELexpressionsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowResourceBundlesUsageasELexpressionsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -26,7 +26,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
//Restore page state before tests
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/selectionbar/SelectionBarTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -124,7 +124,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
if (sashStatus.equals("VisualPageMaximized")){
restoreSourcePane(botExt, VPEAutoTestCase.TEST_PAGE);
} else if (sashStatus.equals("SourcePageMaximized")){
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -38,7 +38,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
initTestPage ();
@@ -74,7 +74,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
sourceEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CoreHTMLTagsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CoreHTMLTagsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CoreHTMLTagsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -39,7 +39,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(CoreHTMLTagsTest.TEST_PAGE_NAME);
@@ -79,7 +79,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
jspEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/JSFTagsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/JSFTagsTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/JSFTagsTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -37,7 +37,7 @@
botExt = new SWTBotExt();
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
createJspPage(JSFTagsTest.TEST_PAGE_NAME);
@@ -102,7 +102,7 @@
return false;
}
@Override
- protected void tearDown() throws Exception {
+public void tearDown() throws Exception {
jspEditor.close();
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -23,7 +23,7 @@
//Test cancel TLD
SWTBotTree tree = bot.tree();
delay();
- SWTBotTreeItem item =
tree.expandNode(projectProperties.getProperty("JSFProjectName"));
+ SWTBotTreeItem item = tree.expandNode(JBT_TEST_PROJECT_NAME);
delay();
item.getNode("html_basic.tld [h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
delay();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -68,7 +68,7 @@
bot.shell("Edit TLD").activate(); //$NON-NLS-1$
SWTBotTree tree = bot.tree();
delay();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("html_basic.tld
[h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
+ tree.expandNode(JBT_TEST_PROJECT_NAME).expandNode("html_basic.tld
[h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
//Test set group
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -28,14 +28,14 @@
private String originalEditorText;
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
openPage(TEST_PAGE);
editor = SWTTestExt.bot.swtBotEditorExtByTitle(TEST_PAGE);
originalEditorText = editor.getText();
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
editor.saveAndClose();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/MarkersTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/MarkersTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/MarkersTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -84,14 +84,14 @@
}
}
@Override
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
openPage(TEST_PAGE);
editor = SWTTestExt.bot.swtBotEditorExtByTitle(TEST_PAGE);
originalEditorText = editor.getText();
}
@Override
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
if (editor != null){
editor.setText(originalEditorText);
editor.saveAndClose();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeAllStringsDialogTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeAllStringsDialogTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeAllStringsDialogTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -3,11 +3,6 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.jboss.tools.jst.jsp.i18n.ExternalizeAllStringsWizard;
-import org.jboss.tools.jst.jsp.i18n.ExternalizeStringsDialog;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java 2011-08-17
14:36:59 UTC (rev 34009)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java 2011-08-17
14:39:34 UTC (rev 34010)
@@ -14,6 +14,7 @@
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+import org.junit.Test;
/**
* @author mareshkau
@@ -36,6 +37,7 @@
/**
* Test new xhtml page wizard basic functionality.
*/
+ @Test
public void testNewXHTMLPageWizard() {
/*
* Open wizard page