Author: vpakan(a)redhat.com
Date: 2011-05-30 07:38:59 -0400 (Mon, 30 May 2011)
New Revision: 31630
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/StylesOnThePageTest.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/pagedesign/IncludedCssFilesJSPTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
Log:
Fixes for JBT 3.3.0.M1
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-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MinMaxPanesTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -20,6 +20,7 @@
import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.vpe.editor.xpl.CustomSashForm;
@@ -85,6 +86,10 @@
}
});
assertVisualEditorContains(webBrowser, "INPUT", null, null,
MinMaxPanesTest.TEST_PAGE_NAME);
+ jspTextEditor.setFocus();
+ jspTextEditor.selectRange(4,25,0);
+ webBrowser.setFocus();
+ KeyboardHelper.typeKeyCodeUsingAWTRepeately(KeyEvent.VK_RIGHT, 1);
// Make changes to Visual Page and Restore Sash position check for changes reflected
in Source Pane
UIThreadRunnable.syncExec(new VoidResult() {
@Override
@@ -92,9 +97,6 @@
csf.maxUp();
}
});
- jspTextEditor.selectRange(4,18,0);
- webBrowser.setFocus();
- KeyboardHelper.typeKeyCodeUsingAWTRepeately(KeyEvent.VK_RIGHT, 1);
String insertTestString = "xxinsertedyy";
KeyboardHelper.typeBasicStringUsingAWT(insertTestString);
jspTextEditor.save();
@@ -104,6 +106,7 @@
csf.downClicked();
}
});
+ bot.sleep(Timing.time1S());
assertSourceEditorContains(jspTextEditor.getText(), insertTestString,
MinMaxPanesTest.TEST_PAGE_NAME);
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -79,32 +79,32 @@
Browser previewPaneBrowser = browsers.get(1);
// Test if current style is applied on Visual/Source pane
String textToContain = "<STYLE>h3 {" + oldStyle +
"}</STYLE>";
- String browserText = SWTUtilExt.invokeMethod(visualSourcePaneBrowser,
"getText");
+ String browserText = SWTUtilExt.invokeMethod(visualSourcePaneBrowser,
"getText").toLowerCase();
assertTrue("Browser on Visual/>Source pane has to contain text " +
textToContain +
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
textToContain = "<H3 style=\"-moz-user-modify:";
assertTrue("Browser on Visual/>Source pane has to contain text " +
textToContain +
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
// Test if current style is applied on Preview pane
textToContain = "<STYLE>h3 {" + oldStyle +
"}</STYLE>";
- browserText = SWTUtilExt.invokeMethod(previewPaneBrowser, "getText");
+ browserText = SWTUtilExt.invokeMethod(previewPaneBrowser,
"getText").toLowerCase();
assertTrue("Browser on Preview pane has to contain text " + textToContain
+
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
textToContain = "<H3 style=\"-moz-user-modify:";
assertTrue("Browser on Preview pane has to contain text " + textToContain
+
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
// Apply new style
String newStyle = "background: black;color: white;";
botEditorExt.selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
@@ -115,32 +115,32 @@
botEditorExt.selectPage(IDELabel.VisualPageEditor.PREVIEW_TAB_LABEL);
// Test if current style is applied on Visual/Source pane
textToContain = "<STYLE>h3 {" + newStyle +
"}</STYLE>";
- browserText = SWTUtilExt.invokeMethod(visualSourcePaneBrowser, "getText");
+ browserText = SWTUtilExt.invokeMethod(visualSourcePaneBrowser,
"getText").toLowerCase();
assertTrue("Browser on Visual/>Source pane has to contain text " +
textToContain +
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
textToContain = "<H3 style=\"-moz-user-modify:";
assertTrue("Browser on Visual/>Source pane has to contain text " +
textToContain +
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
// Test if current style is applied on Preview pane
textToContain = "<STYLE>h3 {" + newStyle +
"}</STYLE>";
- browserText = SWTUtilExt.invokeMethod(previewPaneBrowser, "getText");
+ browserText = SWTUtilExt.invokeMethod(previewPaneBrowser,
"getText").toLowerCase();
assertTrue("Browser on Preview pane has to contain text " + textToContain
+
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
textToContain = "<H3 style=\"-moz-user-modify:";
assertTrue("Browser on Preview pane has to contain text " + textToContain
+
" but it doesn't.\n" +
"Browser text is:\n" +
browserText,
- browserText.contains(textToContain));
+ browserText.contains(textToContain.toLowerCase()));
botEditorExt.selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
jspEditor.close();
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-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/TextSelectionTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -45,7 +45,7 @@
" </body>\n" +
"</html>";
- private static final String TEST_PAGE_NAME = "CoreHTMLTagsTest.jsp";
+ private static final String TEST_PAGE_NAME = "TextSelectionTest.jsp";
private SWTBotEditorExt jspEditor;
private SWTBotWebBrowser webBrowser;
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -50,6 +50,9 @@
bot.shell(IDELabel.Shell.NEW_CSS_FILE).activate(); //$NON-NLS-1$
bot.textWithLabel(IDELabel.NewCSSWizard.FILE_NAME).setText(IncludedCssFilesJSPTest.CSS_FILE_NAME);
//$NON-NLS-1$
bot.button(IDELabel.Button.FINISH).click(); //$NON-NLS-1$
+ if (getException() != null && getException() instanceof
NullPointerException){
+ setException(null);
+ }
bot.sleep(Timing.time3S());
util.waitForJobs(JobName.BUILDING_WS);
SWTBotEditor cssEditor = bot.editorByTitle(IncludedCssFilesJSPTest.CSS_FILE_NAME);
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -55,6 +55,9 @@
bot.shell(IDELabel.Shell.NEW_CSS_FILE).activate(); //$NON-NLS-1$
bot.textWithLabel(IDELabel.NewCSSWizard.FILE_NAME).setText(IncludedCssFilesTest.CSS_FILE_NAME);
//$NON-NLS-1$
bot.button(IDELabel.Button.FINISH).click(); //$NON-NLS-1$
+ if (getException() != null && getException() instanceof
NullPointerException){
+ setException(null);
+ }
bot.sleep(Timing.time3S());
util.waitForJobs(JobName.BUILDING_WS);
SWTBotEditor cssEditor = bot.editorByTitle(IncludedCssFilesTest.CSS_FILE_NAME);
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -50,7 +50,7 @@
assertNotNull("Selected node in Visual Editor cannot be
null",selectedVisualNode);
String expectedSelectedNode = "DIV";
assertTrue("Selected Node has to be '" + expectedSelectedNode +
"' node but is " + selectedVisualNode.getLocalName(),
- selectedVisualNode.getLocalName().equals(expectedSelectedNode));
+ selectedVisualNode.getLocalName().equalsIgnoreCase(expectedSelectedNode));
String selectedNodeTitle = SWTBotWebBrowser.getNodeAttribute(selectedVisualNode,
"title");
assertNotNull("Selected Node in Visual Editor has to have attribute title but it
has not." ,selectedNodeTitle);
final String expectedTitle = "f:view";
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -52,7 +52,7 @@
assertNotNull("Selected node in Visual Editor cannot be
null",selectedVisualNode);
String expectedSelectedNode = "SPAN";
assertTrue("Selected Node has to be '" + expectedSelectedNode +
"' node but is " + selectedVisualNode.getLocalName(),
- selectedVisualNode.getLocalName().equals(expectedSelectedNode));
+ selectedVisualNode.getLocalName().equalsIgnoreCase(expectedSelectedNode));
String selectedNodeTitle = SWTBotWebBrowser.getNodeAttribute(selectedVisualNode,
"title");
assertNotNull("Selected Node in Visual Editor has to have attribute title but it
has not." ,selectedNodeTitle);
final String expectedTitle = "h:inputText value: " +
AjaxValidatorTagTest.INPUT_TEXT;
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -51,7 +51,7 @@
assertNotNull("Selected node in Visual Editor cannot be
null",selectedVisualNode);
String expectedSelectedNode = "SPAN";
assertTrue("Selected Node has to be '" + expectedSelectedNode +
"' node but is " + selectedVisualNode.getLocalName(),
- selectedVisualNode.getLocalName().equals(expectedSelectedNode));
+ selectedVisualNode.getLocalName().equalsIgnoreCase(expectedSelectedNode));
String selectedNodeTitle = SWTBotWebBrowser.getNodeAttribute(selectedVisualNode,
"title");
assertNotNull("Selected Node in Visual Editor has to have attribute title but it
has not." ,selectedNodeTitle);
final String expectedTitle = "h:inputText value: " +
BeanValidatorTagTest.INPUT_TEXT;
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -64,7 +64,7 @@
bot.viewByTitle(WidgetVariables.OUTLINE).bot().tree().selection().get(0).get(0).startsWith("h:messages
"));
SWTBotTree outlineTree = bot.viewByTitle(WidgetVariables.PROPERTIES).bot().tree();
-
outlineTree.getTreeItem("Attributes").expand().getNode("style").select();
+
outlineTree.getTreeItem("General").expand().getNode("style").select();
assertTrue("style attribute of h:message node has wrong value within Properties
view" +
". Should be 'color: red'",
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2011-05-30
11:36:51 UTC (rev 31629)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2011-05-30
11:38:59 UTC (rev 31630)
@@ -92,7 +92,7 @@
public static final String SETUP_VISUAL_TEMPLATE_FOR_MENU_LABEL = "Setup Visual
Template for ";
public static final String SELECT_THIS_TAG_MENU_LABEL = "Select This Tag";
public static final String PREFERENCES_MENU_LABEL = "Preferences..";
- public static final String EXTERNALIZE_STRING_MENU_LABEL = "Externalize
strings...";
+ public static final String EXTERNALIZE_STRING_MENU_LABEL = "Externalize selected
string...";
public static final String JSF_MENU_LABEL = "JSF";
public static final String JBOSS_MENU_LABEL = "JBoss";