Author: vpakan(a)redhat.com
Date: 2011-04-07 08:23:46 -0400 (Thu, 07 Apr 2011)
New Revision: 30411
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
Added RichFaces Tags Tests
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-04-07
11:57:13 UTC (rev 30410)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -44,9 +44,12 @@
import org.jboss.tools.vpe.ui.bot.test.editor.tags.CoreHTMLTagsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataDefinitionTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataGridTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataListTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataOrderedListTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataScrollerTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataTableTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.EditorTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ExtendedDataTableTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.FileUploadTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.InplaceInputTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.InplaceSelectInputTagTest;
@@ -57,7 +60,10 @@
import org.jboss.tools.vpe.ui.bot.test.editor.tags.PickListTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.ProgressTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.SpacerTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.TogglePanelAndToogleControlTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.ToolbarAndToolbarGroupTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.TreeTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.VirtualEarthTagTest;
import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4556Test;
import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
import org.jboss.tools.vpe.ui.bot.test.palette.ImportTagsFromTLDFileTest;
@@ -145,6 +151,12 @@
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(XhtmlFilePerformanceTest.class);
return new TestSetup(suite);
}
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests Rich Faces dataList Tag behavior
+ * @author vlado pakan
+ *
+ */
+public class DataListTagTest extends RichFacesTagsTest{
+ private static final String ROW_0_VALUE = "!-* Row 0 Value";
+ private static final String ROW_1_VALUE = "!-* Row 1 Value";
+ private static final String ROW_2_VALUE = "!-* Row 2 Value";
+ @Override
+ protected void initPageContent() {
+ xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "<html
xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "
xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "
xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ "
xmlns:h=\"http://java.sun.com/jsf/html\">\n" +
+ " <head>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <f:view>\n" +
+ " <rich:dataList>\n" +
+ " <h:outputText value=\"" + DataListTagTest.ROW_0_VALUE +
"\"/>\n" +
+ " <br/>\n" +
+ " <h:outputText value=\"" + DataListTagTest.ROW_1_VALUE +
"\"/>\n" +
+ " <br/>\n" +
+ " <h:outputText value=\"" + DataListTagTest.ROW_2_VALUE +
"\"/>\n" +
+ " </rich:dataList>\n" +
+ " </f:view>\n" +
+ " </body>\n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "UL",
+ new String[]{"class"},
+ new String[]{"dr-list rich-datalist"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "LI",
+ new String[]{"class"},
+ new String[]{"dr-list-item rich-list-item"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ DataListTagTest.ROW_0_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ DataListTagTest.ROW_1_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ DataListTagTest.ROW_2_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ // check tag selecti
+ xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0),
0);
+ bot.sleep(Timing.time3S());
+ String selectedText = xhtmlEditor.getSelection();
+ String hasToStartWith = "<rich:dataList>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:dataList>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ }
+
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests Rich Faces dataOrderedList Tag behavior
+ * @author vlado pakan
+ *
+ */
+public class DataOrderedListTagTest extends RichFacesTagsTest{
+ private static final String ROW_0_VALUE = "!-* Row 0 Value";
+ private static final String ROW_1_VALUE = "!-* Row 1 Value";
+ private static final String ROW_2_VALUE = "!-* Row 2 Value";
+ @Override
+ protected void initPageContent() {
+ xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "<html
xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "
xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "
xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ "
xmlns:h=\"http://java.sun.com/jsf/html\">\n" +
+ " <head>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <f:view>\n" +
+ " <rich:dataOrderedList>\n" +
+ " <h:outputText value=\"" +
DataOrderedListTagTest.ROW_0_VALUE + "\"/>\n" +
+ " <br/>\n" +
+ " <h:outputText value=\"" +
DataOrderedListTagTest.ROW_1_VALUE + "\"/>\n" +
+ " <br/>\n" +
+ " <h:outputText value=\"" +
DataOrderedListTagTest.ROW_2_VALUE + "\"/>\n" +
+ " </rich:dataOrderedList>\n" +
+ " </f:view>\n" +
+ " </body>\n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "OL",
+ new String[]{"class"},
+ new String[]{"dr-list rich-orderedlist"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "LI",
+ new String[]{"class"},
+ new String[]{"dr-list-item rich-list-item"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ DataOrderedListTagTest.ROW_0_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ DataOrderedListTagTest.ROW_1_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ DataOrderedListTagTest.ROW_2_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ // check tag selecti
+ xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0),
0);
+ bot.sleep(Timing.time3S());
+ String selectedText = xhtmlEditor.getSelection();
+ String hasToStartWith = "<rich:dataOrderedList>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:dataOrderedList>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ }
+
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -0,0 +1,114 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests Rich Faces dataOrderedList Tag behavior
+ * @author vlado pakan
+ *
+ */
+public class ExtendedDataTableTagTest extends RichFacesTagsTest{
+ private static final String COL_0_VALUE = "!-* Col 0 Value";
+ private static final String COL_1_VALUE = "!-* Col 1 Value";
+ private static final String COL_0_LABEL = "!-* Col 0 Label";
+ private static final String COL_1_LABEL = "!-* Col 1 Label";
+ @Override
+ protected void initPageContent() {
+ xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "<html
xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "
xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "
xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ "
xmlns:h=\"http://java.sun.com/jsf/html\">\n" +
+ " <head>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <f:view>\n" +
+ " <rich:extendedDataTable>\n" +
+ " <rich:column>\n" +
+ " <f:facet name=\"header\">\n" +
+ " <h:outputText value=\"" +
ExtendedDataTableTagTest.COL_0_LABEL + "\"/>\n" +
+ " </f:facet>\n" +
+ " <h:outputText value=\"" +
ExtendedDataTableTagTest.COL_0_VALUE + "\"/>\n" +
+ " </rich:column>\n" +
+ " <rich:column>\n" +
+ " <f:facet name=\"header\">\n" +
+ " <h:outputText value=\"" +
ExtendedDataTableTagTest.COL_1_LABEL + "\"/>\n" +
+ " </f:facet>\n" +
+ " <h:outputText value=\"" +
ExtendedDataTableTagTest.COL_1_VALUE + "\"/>\n" +
+ " </rich:column>\n" +
+ " </rich:extendedDataTable>\n" +
+ " </f:view>\n" +
+ " </body>\n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TR",
+ new String[]{"class"},
+ new String[]{"dr-table-subheader rich-table-subheader"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TH",
+ new String[]{"class"},
+ new String[]{"dr-table-subheadercell rich-table-subheadercell"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TR",
+ new String[]{"class"},
+ new String[]{"dr-table-subfooter rich-table-subfooter"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TD",
+ new String[]{"class"},
+ new String[]{"dr-table-subfootercell rich-table-subfootercell
dr-table-subfooter rich-table-subfooter"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TR",
+ new String[]{"class"},
+ new String[]{"dr-body-table-tr"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TD",
+ new String[]{"class"},
+ new String[]{"dr-table-cell rich-table-cell"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ ExtendedDataTableTagTest.COL_0_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ ExtendedDataTableTagTest.COL_1_VALUE,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ ExtendedDataTableTagTest.COL_0_LABEL,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ ExtendedDataTableTagTest.COL_1_LABEL,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ // check tag selecti
+
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TABLE",1),
0);
+ bot.sleep(Timing.time3S());
+ String selectedText = xhtmlEditor.getSelection();
+ String hasToStartWith = "<rich:extendedDataTable>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:extendedDataTable>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ }
+
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests Rich Faces togglePanel and toogleControl and toolBarGroup Tags behavior
+ * @author vlado pakan
+ *
+ */
+public class TogglePanelAndToogleControlTagTest extends RichFacesTagsTest{
+ private static final String FACET_0_LABEL = "!-* Facet 0 Label";
+ private static final String FACET_1_LABEL = "!-* Facet 1 Label";
+ @Override
+ protected void initPageContent() {
+ xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "<html
xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "
xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "
xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ "
xmlns:h=\"http://java.sun.com/jsf/html\">\n" +
+ " <head>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <f:view>\n" +
+ " <rich:togglePanel>\n" +
+ " <f:facet name=\"facet0\">\n" +
+ " <rich:toggleControl>\n" +
+ " <h:outputText value=\"" +
TogglePanelAndToogleControlTagTest.FACET_0_LABEL + "\" />\n" +
+ " </rich:toggleControl>\n" +
+ " </f:facet>\n" +
+ " <f:facet name=\"facet1\">\n" +
+ " <h:outputText value=\"" +
TogglePanelAndToogleControlTagTest.FACET_1_LABEL + "\" />\n" +
+ " </f:facet>\n" +
+ " </rich:togglePanel>\n" +
+ " </f:view>\n" +
+ " </body>\n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ TogglePanelAndToogleControlTagTest.FACET_0_LABEL,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
+ TogglePanelAndToogleControlTagTest.FACET_1_LABEL,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ // check tag selection
+ xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4),
0);
+ bot.sleep(Timing.time3S());
+ String selectedText = xhtmlEditor.getSelection();
+ String hasToStartWith = "<rich:togglePanel>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:togglePanel>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ // check rich:toolBarGroup selection
+
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("SPAN",0),
0);
+ bot.sleep(Timing.time3S());
+ selectedText = xhtmlEditor.getSelection();
+ hasToStartWith = "<rich:toggleControl>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ hasEndWith = "</rich:toggleControl>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ }
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests Rich Faces toolBar and toolBarGroup Tags behavior
+ * @author vlado pakan
+ *
+ */
+public class ToolbarAndToolbarGroupTagTest extends RichFacesTagsTest{
+ private static final String GROUP_0_LABEL = "!-* Group 0 Label";
+ private static final String GROUP_1_LABEL = "!-* Group 1 Label";
+ @Override
+ protected void initPageContent() {
+ xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "<html
xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "
xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "
xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ "
xmlns:h=\"http://java.sun.com/jsf/html\">\n" +
+ " <head>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <f:view>\n" +
+ " <rich:toolBar>\n" +
+ " <rich:toolBarGroup>\n" +
+ " <h:outputText value=\"" +
ToolbarAndToolbarGroupTagTest.GROUP_0_LABEL + "\"/>\n" +
+ " </rich:toolBarGroup>\n" +
+ " <rich:toolBarGroup>\n" +
+ " <h:outputText value=\"" +
ToolbarAndToolbarGroupTagTest.GROUP_1_LABEL + "\"/>\n" +
+ " </rich:toolBarGroup>\n" +
+ " </rich:toolBar>\n" +
+ " </f:view>\n" +
+ " </body>\n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "TD",
+ new String[]{"class"},
+ new String[]{"dr-toolbar-int rich-toolbar-item"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ ToolbarAndToolbarGroupTagTest.GROUP_0_LABEL,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ ToolbarAndToolbarGroupTagTest.GROUP_1_LABEL,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ // check tag selection
+
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0),
0);
+ bot.sleep(Timing.time3S());
+ String selectedText = xhtmlEditor.getSelection();
+ String hasToStartWith = "<rich:toolBar>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:toolBar>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ // check rich:toolBarGroup selection
+
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",1),
0);
+ bot.sleep(Timing.time3S());
+ selectedText = xhtmlEditor.getSelection();
+ hasToStartWith = "<rich:toolBarGroup>";
+ assertTrue("Selected text in Source Pane has to start with '" +
hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ hasEndWith = "</rich:toolBarGroup>";
+ assertTrue("Selected text in Source Pane has to end with '" +
hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+
+ }
+
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java 2011-04-07
12:23:46 UTC (rev 30411)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests Rich Faces virtualEarth Tag behavior
+ * @author vlado pakan
+ *
+ */
+public class VirtualEarthTagTest extends RichFacesTagsTest{
+ @Override
+ protected void initPageContent() {
+ xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ "<html
xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
+ "
xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
+ "
xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
+ "
xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ "
xmlns:h=\"http://java.sun.com/jsf/html\">\n" +
+ "<head>\n" +
+ "</head>\n" +
+ "<body>\n" +
+ " <f:view>\n" +
+ " <rich:virtualEarth/>\n" +
+ " </f:view>\n" +
+ " </body>\n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
+ "IMG",
+ 2,
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContains(xhtmlWebBrowser,
+ "SCRIPT",
+ new String[]{"type","src"},
+ new String[]{"text/javascript","mozileLoader.js"},
+ RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ // check tag selection
+ xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0),
0);
+ bot.sleep(Timing.time3S());
+ String selectedText = xhtmlEditor.getSelection();
+ String hasToBe = "<rich:virtualEarth/>";
+ assertTrue("Selected text in Source Pane has to be '" + hasToBe +
"'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().equals(hasToBe));
+ }
+
+}
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain