You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pa...@apache.org on 2006/11/28 06:30:03 UTC

svn commit: r479911 - in /myfaces/tomahawk/trunk/examples/simple/src: main/webapp/testSuite/hGraphicImage.jsp test/selenium/TestSuite.html test/selenium/hGraphicImage.html

Author: paulsp
Date: Mon Nov 27 21:30:02 2006
New Revision: 479911

URL: http://svn.apache.org/viewvc?view=rev&rev=479911
Log:
o Add h:graphicImage test

Added:
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hGraphicImage.jsp
    myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hGraphicImage.html
Modified:
    myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hGraphicImage.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hGraphicImage.jsp?view=auto&rev=479911
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hGraphicImage.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hGraphicImage.jsp Mon Nov 27 21:30:02 2006
@@ -0,0 +1,49 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<f:view>
+  <t:document>
+    <t:documentHead>
+      <t:htmlTag value="title">
+        <h:outputText value="h:graphicImage" />
+      </t:htmlTag>
+    </t:documentHead>
+    <t:documentBody>
+      <h:outputText value="h:graphicImage" />
+      <h:graphicImage id="graphicImageId" url="/images/logo.jpg"
+        lang="en" title="title text" style="background-color: gray;"
+        styleClass="imageClass" alt="alt text" height="100" width="200"
+        longdesc="/testSuite/" />
+      <h:form id="footerLinks">
+        <h:commandLink id="homeLink" action="home" value="Home" />
+        <h:outputText value=" " />
+        <h:outputLink id="sourceLink" target="sourceWindow"
+          value="#{facesContext.externalContext.requestContextPath}#{view.viewId}.source">
+          <h:outputText value="View source in popup window" />
+        </h:outputLink>
+      </h:form>
+    </t:documentBody>
+  </t:document>
+</f:view>

Modified: myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html?view=diff&rev=479911&r1=479910&r2=479911
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html Mon Nov 27 21:30:02 2006
@@ -22,6 +22,11 @@
          </tr>
          <tr>
             <td>
+               <a href="hGraphicImage.html">h:GraphicImage</a>
+           </td>
+         </tr>
+         <tr>
+            <td>
                <a href="hPanelGridTest.html">hPanelGrid</a>
            </td>
          </tr>

Added: myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hGraphicImage.html
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hGraphicImage.html?view=auto&rev=479911
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hGraphicImage.html (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hGraphicImage.html Mon Nov 27 21:30:02 2006
@@ -0,0 +1,70 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>hGraphicImage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">hGraphicImage</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/myfaces-example-simple/testSuite/home.jsf</td>
+	<td></td>
+</tr>
+<tr>
+	<td>open</td>
+	<td>/myfaces-example-simple/testSuite/hGraphicImage.jsf</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertElementPresent</td>
+	<td>//img[@id='graphicImageId']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@alt</td>
+	<td>alt text</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@class</td>
+	<td>imageClass</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@height</td>
+	<td>100</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@lang</td>
+	<td>en</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@longdesc</td>
+	<td>/testSuite/</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@src</td>
+	<td>regexp:(http:\/\/*|)\/myfaces-example-simple\/images\/logo.jpg</td>
+</tr>
+<!--Note: IE 6 and 7 returns the style attribute as [object] -->
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@style</td>
+	<td>regexp:(\[object\]|background-color: gray;)</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//img[@id='graphicImageId']@title</td>
+	<td>title text</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>