You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/07/17 09:50:42 UTC

svn commit: r1362393 - in /myfaces/tobago/trunk/tobago-example/tobago-example-test/src: main/webapp/tc/button/ main/webapp/tc/popup/ test/java/org/apache/myfaces/tobago/example/test/ test/java/org/apache/myfaces/tobago/example/test/tc/button/ test/java...

Author: lofwyr
Date: Tue Jul 17 07:50:41 2012
New Revision: 1362393

URL: http://svn.apache.org/viewvc?rev=1362393&view=rev
Log:
replace Java-Selenium-Test with HTML-Selenium-Test

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.selenium.html
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/resource-attribute.selenium.html
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/popup/popup-bug-tobago-1103.selenium.html
Removed:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/button/
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/tc/popup/
Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumTest.java

Added: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.selenium.html
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.selenium.html?rev=1362393&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.selenium.html (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.selenium.html Tue Jul 17 07:50:41 2012
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8080/faces/tc/button/link-attribute.xhtml" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/faces/tc/button/link-attribute.xhtml</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>id=page:button-internal-link-with-slash</td>
+	<td></td>
+</tr>
+<tr>
+	<td>verifyTextPresent</td>
+	<td>A simple page for the resource test (static).</td>
+	<td></td>
+</tr>
+<tr>
+	<td>open</td>
+	<td>/faces/tc/button/link-attribute.xhtml</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>id=page:button-internal-link-without-slash</td>
+	<td></td>
+</tr>
+<tr>
+	<td>verifyTextPresent</td>
+	<td>A simple page for the resource test (static).</td>
+	<td></td>
+</tr>
+<tr>
+	<td>open</td>
+	<td>/faces/tc/button/link-attribute.xhtml</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>id=page:button-external-link</td>
+	<td></td>
+</tr>
+<tr>
+	<td>verifyTextPresent</td>
+	<td>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</td>
+	<td></td>
+</tr>
+</tbody></table>
+</body>
+</html>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.xhtml?rev=1362393&r1=1362392&r2=1362393&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/link-attribute.xhtml Tue Jul 17 07:50:41 2012
@@ -18,8 +18,6 @@
 
 <f:view
     xmlns:tc="http://myfaces.apache.org/tobago/component"
-    xmlns:tx="http://myfaces.apache.org/tobago/extension"
-    xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core">
   <tc:page id="page">
     <tc:gridLayoutConstraint width="300px"/>
@@ -29,7 +27,7 @@
 
     <tc:button id="button-internal-link-with-slash" label="internal link with slash" link="/tc/button/plain.html"/>
     <tc:button id="button-internal-link-without-slash" label="internal link without slash" link="plain.html"/>
-    <tc:button id="button-external-link" label="external link" link="http://www.apache.org/"/>
+    <tc:button id="button-external-link" label="external link" link="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
 
   </tc:page>
 </f:view>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/resource-attribute.selenium.html
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/resource-attribute.selenium.html?rev=1362393&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/resource-attribute.selenium.html (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/button/resource-attribute.selenium.html Tue Jul 17 07:50:41 2012
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8080/faces/tc/button/link-attribute.xhtml" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/faces/tc/button/resource-attribute.xhtml</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>id=page:button-html-resource</td>
+	<td></td>
+</tr>
+<tr>
+	<td>verifyTextPresent</td>
+	<td>Eine einfache Seite für den Resourcen-Test (statisch).</td>
+	<td></td>
+</tr>
+<tr>
+	<td>open</td>
+	<td>/faces/tc/button/resource-attribute.xhtml</td>
+	<td></td>
+</tr>
+<tr>
+	<td>clickAndWait</td>
+	<td>id=page:button-xhtml-resource</td>
+	<td></td>
+</tr>
+<tr>
+	<td>verifyTextPresent</td>
+	<td>Eine einfache Seite für den Resourcen-Test (dynamisch).<br /></td>
+	<td></td>
+</tr>
+</tbody></table>
+</body>
+</html>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/popup/popup-bug-tobago-1103.selenium.html
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/popup/popup-bug-tobago-1103.selenium.html?rev=1362393&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/popup/popup-bug-tobago-1103.selenium.html (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/popup/popup-bug-tobago-1103.selenium.html Tue Jul 17 07:50:41 2012
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8080/faces/tc/button/link-attribute.xhtml" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/faces/tc/popup/popup-bug-tobago-1103.xhtml</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:open-0</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementPresent</td>
+	<td>id=page:popup-1:open-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:open-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementPresent</td>
+	<td>id=page:popup-1:popup-2:form:picker</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:popup-2:form:picker</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementPresent</td>
+	<td>id=page:popup-1:popup-2:form:pickerpopup:cancel</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:popup-2:form:pickerpopup:cancel</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementNotPresent</td>
+	<td>id=page:popup-1:popup-2:form:pickerpopup</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:popup-2:close-2</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementNotPresent</td>
+	<td>id=page:popup-1:popup-2</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:close-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementNotPresent</td>
+	<td>id=page:popup-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:open-0</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementPresent</td>
+	<td>id=page:popup-1:open-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:open-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementPresent</td>
+	<td>id=page:popup-1:popup-2:form:picker</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:popup-2:open-2</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementPresent</td>
+	<td>id=page:popup-1:popup-2:popup-3:close-3</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:popup-2:popup-3:close-3</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementNotPresent</td>
+	<td>id=page:popup-1:popup-2:popup-3</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:popup-2:close-2</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementNotPresent</td>
+	<td>id=page:popup-1:popup-2</td>
+	<td></td>
+</tr>
+<tr>
+	<td>click</td>
+	<td>id=page:popup-1:close-1</td>
+	<td></td>
+</tr>
+<tr>
+	<td>waitForElementNotPresent</td>
+	<td>id=page:popup-1</td>
+	<td></td>
+</tr>
+</tbody></table>
+</body>
+</html>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumTest.java?rev=1362393&r1=1362392&r2=1362393&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumTest.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/test/java/org/apache/myfaces/tobago/example/test/SeleniumTest.java Tue Jul 17 07:50:41 2012
@@ -79,12 +79,14 @@ public abstract class SeleniumTest {
     if (errorOnServer()) {
       Assert.fail(format(ERROR_ON_SERVER, location, html, ""));
     }
-    try {
-      if (isErrorOnPage()) {
-        Assert.fail(format(HAS_ERROR_SEVERITY, location, html, getErrors()));
+    if (location.endsWith(".xhtml") || location.endsWith(".jspx")) {
+      try {
+        if (isErrorOnPage()) {
+          Assert.fail(format(HAS_ERROR_SEVERITY, location, html, getErrors()));
+        }
+      } catch (SeleniumException e) {
+        Assert.fail(format(IS_BROKEN, location, html, "Not a Tobago page? Exception=" + e));
       }
-    } catch (SeleniumException e) {
-      Assert.fail(format(IS_BROKEN, location, html, "Not a Tobago page? Exception=" + e));
     }
   }