Author: vpakan(a)redhat.com
Date: 2012-08-01 13:40:28 -0400 (Wed, 01 Aug 2012)
New Revision: 42831
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/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/JSF2AttributeRenameTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java
Log:
Fixes for JBT 3.4.0.M1
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 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3148and4441Test extends JSFAutoTestCase{
@@ -37,7 +38,7 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog");
//$NON-NLS-1$
//Test edit attrs of the first Class
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_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 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3577Test extends JSFAutoTestCase{
@@ -35,10 +36,8 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
-
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog");
//$NON-NLS-1$
//Test Clear all attributes
-
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
//$NON-NLS-1$
bot.tabItem("Preview").activate(); //$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 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3579Test extends JSFAutoTestCase{
@@ -35,10 +36,8 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
-
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog");
//$NON-NLS-1$
//Test Create new CSS class
-
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.button("Add CSS Class").click(); //$NON-NLS-1$
bot.shell("Enter New CSS Class Name").activate(); //$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 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3920Test extends JSFAutoTestCase{
@@ -31,7 +32,7 @@
eclipseEditor.setFocus();
eclipseEditor.insertText(CSS_CLASS_NAME+"{"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog");
//$NON-NLS-1$
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.tabItem("Text/Font").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Font Style:").setSelection("italic");
//$NON-NLS-1$ //$NON-NLS-2$
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 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE4391Test extends JSFAutoTestCase{
@@ -34,8 +35,7 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
-
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog");
//$NON-NLS-1$
//Test incorrect attribute
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_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/JSF2AttributeRenameTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -21,6 +21,10 @@
SWTBotEclipseEditor editor = bot
.editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
editor.selectRange(9, 29, 1);
+ // for Eclipse Juno focus has to be moved out and back from editor
+ packageExplorer.show();
+ packageExplorer.bot().tree().setFocus();
+ editor.setFocus();
bot.menu("Refactor").menu("Rename").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.shell("Rename Composite Attribute").activate(); //$NON-NLS-1$
bot.textWithLabel("New name:").setText("echo1"); //$NON-NLS-1$
//$NON-NLS-2$
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Copyright (c) 2007-2012 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -18,6 +18,7 @@
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.OpenOnHelper;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
@@ -159,10 +160,12 @@
SWTBotEditor compositeComponentEditor = OpenOnHelper.checkOpenOnFileIsOpened(
SWTTestExt.bot, JSF2_TEST_PAGE, "<ez:input ", 5,
0, 0, expectedOpenedFileName);
+ util.waitForAll(Timing.time3S());
// Check open on for cc.attrs.submitlabel
compositeComponentEditor = OpenOnHelper.checkOpenOnFileIsOpened(
SWTTestExt.bot, expectedOpenedFileName,
"value=\"#{cc.attrs.submitlabel}\"", 20,
0, 0, expectedOpenedFileName);
+ util.waitForAll(Timing.time3S());
String selectedText = compositeComponentEditor.toTextEditor().getSelection();
String expectedSelectedText = "<composite:attribute
name=\"submitlabel\"/>";
assertTrue("Selected text in editor has to be " + expectedSelectedText
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java 2012-08-01
14:40:01 UTC (rev 42830)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java 2012-08-01
17:40:28 UTC (rev 42831)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.ui.bot.test.templates;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
@@ -22,6 +32,7 @@
setEditorText(getEditor().getText());
getEditor().navigateTo(13, 0);
getEditor().insertText("<h:unknowntag></h:unknowntag>");//$NON-NLS-1$
+ getEditor().save();
getEditor().navigateTo(13,5);
setUpTemplate();
editTemplate();