Author: vpakan(a)redhat.com
Date: 2012-10-05 09:17:03 -0400 (Fri, 05 Oct 2012)
New Revision: 44337
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/tags/AbstractTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ArticleTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AsideTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AudioTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CanvasTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DetailsTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SummaryTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CheckFileChangesSaving.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java
Log:
Fixes for JBT 4.0.0.Alpha2
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 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowResourceBundlesUsageasELexpressionsTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -42,7 +42,6 @@
//Test check VPE content without resource bundles
selectELExpressions();
- new SWTBotWebBrowser(TEST_PAGE, new SWTBotExt()).displayWebBrowserDOM();
assertVisualEditorNotContainNodeWithValue(webBrowser,
"#{Message.prompt_message}",
TEST_PAGE);
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 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -13,9 +13,12 @@
import java.security.InvalidParameterException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
import org.jboss.tools.vpe.ui.bot.test.tools.SWTBotWebBrowser;
/**
@@ -81,6 +84,7 @@
@Override
public void tearDown() throws Exception {
sourceEditor.close();
+ deleteTestPage();
super.tearDown();
}
/**
@@ -144,5 +148,31 @@
return fileName;
}
-
+ public void deleteTestPage(){
+ if (testPageType.equals(TestPageType.HTML)){
+ eclipse.deleteFile(VPEAutoTestCase.JBT_TEST_PROJECT_NAME,
"WebContent","pages",getTestPageFileName());
+ }else if (testPageType.equals(TestPageType.JSP)){
+ eclipse.deleteFile(VPEAutoTestCase.JBT_TEST_PROJECT_NAME,
"WebContent","pages",getTestPageFileName());
+ } else if (testPageType.equals(TestPageType.XHTML)){
+ eclipse.deleteFile(VPEAutoTestCase.JBT_TEST_PROJECT_NAME,
"WebContent","pages",getTestPageFileName());
+ }
+ }
+ /**
+ * Asserts if Problems View has no errors for test page
+ * @param botExt
+ */
+ protected void assertProbelmsViewNoErrorsForPage (SWTBotExt botExt){
+
+ SWTBotTreeItem[] errors = ProblemsView.getFilteredErrorsTreeItems
+ (botExt,
+ null,
+ null,
+ getTestPageFileName(),
+ null);
+
+ boolean areThereNoErrors = ((errors == null) || (errors.length == 0));
+ assertTrue("There are errors in Problems view for test page: " +
+ (areThereNoErrors ? "" : errors[0].getText()),
+ areThereNoErrors);
+ }
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -51,7 +51,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// check values which should not be displayed in Visual Editor
assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
AjaxInvisibleTagsTest.JS_FUNCTION_VALUE,
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ArticleTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ArticleTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ArticleTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -38,7 +38,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains ARTICLE tag
assertVisualEditorContains(getVisualEditor(), "ARTICLE", null, null,
getTestPageFileName());
// visual representation contains ARTICLE_TEXT text
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AsideTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AsideTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AsideTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -38,7 +38,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains ASIDE tag
assertVisualEditorContains(getVisualEditor(), "ASIDE", null, null,
getTestPageFileName());
// visual representation contains ASIDE_TEXT text
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AudioTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AudioTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AudioTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -36,7 +36,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains AUDIO tag
assertVisualEditorContains(getVisualEditor(), "AUDIO", null, null,
getTestPageFileName());
// test tag selection
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CanvasTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CanvasTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CanvasTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -36,7 +36,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains CANVAS tag
assertVisualEditorContains(getVisualEditor(), "CANVAS", null, null,
getTestPageFileName());
// test tag selection
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -37,7 +37,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains COMMAND tag
assertVisualEditorContains(getVisualEditor(), "COMMAND", null, null,
getTestPageFileName());
// visual representation contains COMMAND_TEXT text
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DetailsTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DetailsTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DetailsTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -36,7 +36,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains DETAILS tag
assertVisualEditorContains(getVisualEditor(), "DETAILS", null, null,
getTestPageFileName());
// visual representation contains DETAILS_TEXT text
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SummaryTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SummaryTagTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SummaryTagTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -36,7 +36,7 @@
@Override
protected void verifyTag() {
// check Problems View for Errors
- assertProbelmsViewNoErrors(botExt);
+ assertProbelmsViewNoErrorsForPage(botExt);
// visual representation contains SUMMARY tag
assertVisualEditorContains(getVisualEditor(), "SUMMARY", null, null,
getTestPageFileName());
// visual representation contains SUMMARY_TEXT text
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CheckFileChangesSaving.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CheckFileChangesSaving.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CheckFileChangesSaving.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -40,7 +40,7 @@
// Test Saving
editor.insertText(changeText);
bot.sleep(sleepTime);
- bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.CLOSE).click();
+ bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.CLOSE_ALL).click();
bot.sleep(sleepTime);
bot.shell(IDELabel.Shell.SAVE_RESOURCE).activate();
bot.button(saveFile ? IDELabel.Button.YES : IDELabel.Button.NO).click();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -40,6 +40,7 @@
* Test JSP page Creation and Saving
*/
private void checkJSPPageCreation(){
+ bot.closeAllEditors();
openWebProjects();
@@ -68,7 +69,6 @@
bot.sleep(Timing.time2S());
webContentTreeItem.expand();
SWTBotTreeItem jspTestPageTreeItem =
webContentTreeItem.getNode(TEST_NEW_JSP_FILE_NAME);
-
String checkResult = CheckFileChangesSaving.checkIt(bot,
bot.editorByTitle(TEST_NEW_JSP_FILE_NAME).toTextEditor(),
tree, jspTestPageTreeItem,
SAVE_COMMENT, true);
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java 2012-10-05
13:16:32 UTC (rev 44336)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java 2012-10-05
13:17:03 UTC (rev 44337)
@@ -41,7 +41,7 @@
* Test XHTML page Creation and Saving
*/
private void checkXHTMLPageCreation(){
-
+ bot.closeAllEditors();
openWebProjects();
delay();