Author: wsmoak
Date: Sat Sep  2 12:50:32 2006
New Revision: 439643

URL: http://svn.apache.org/viewvc?rev=439643&view=rev
Log:
SB-43 Add some Selenium tests for the tiles-test webapp
Usage: mvn package cargo:start -P selenium 
       then visit http://localhost:8080/tiles-test/selenium/core/TestRunner.html

Added:
    struts/sandbox/trunk/tiles/tiles-test/src/test/
    struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/
    
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html  
 (with props)
    struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html   
(with props)
    
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html   
(with props)
Modified:
    struts/sandbox/trunk/tiles/tiles-test/pom.xml
    struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp

Modified: struts/sandbox/trunk/tiles/tiles-test/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/pom.xml?rev=439643&r1=439642&r2=439643&view=diff
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-test/pom.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-test/pom.xml Sat Sep  2 12:50:32 2006
@@ -68,4 +68,71 @@
      <finalName>${pom.artifactId}</finalName>
    </build>
 
+    <profiles>
+        <profile>
+            <id>selenium</id>
+            <activation>
+                <property>
+                    <name>selenium</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>dependency-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack-selenium</id>
+                                <phase>generate-resources</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            
<groupId>org.openqa.selenium.core</groupId>
+                                            
<artifactId>selenium-core</artifactId>
+                                            <version>0.7.0</version>
+                                        </artifactItem>
+                                    </artifactItems>
+                                    
<outputDirectory>${project.build.directory}/selenium</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-selenium</id>
+                                <phase>process-resources</phase>
+                                <configuration>
+                                    <tasks>
+                                        <copy 
todir="${project.build.directory}/${artifactId}/selenium/core">
+                                            <fileset 
dir="${project.build.directory}/selenium/core"/>
+                                        </copy>
+                                        <copy 
todir="${project.build.directory}/${artifactId}/selenium/tests">
+                                            <fileset dir="src/test/selenium"/>
+                                        </copy>
+                                    </tasks>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+            <repositories>
+                <repository>
+                    <id>OpenQA</id>
+                    <url>http://maven.openqa.org</url>
+                </repository>
+            </repositories>
+        </profile>
+    </profiles>
+
+
 </project>

Modified: struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp?rev=439643&r1=439642&r2=439643&view=diff
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp Sat Sep  2 
12:50:32 2006
@@ -1,4 +1,25 @@
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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>
+<head>
+    <title>Tiles 2 Test Application</title>
+</head>
 
 <body>
     <h1>Tiles 2 Test Application</h1>

Added: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html?rev=439643&view=auto
==============================================================================
--- 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html 
(added)
+++ 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html 
Sat Sep  2 12:50:32 2006
@@ -0,0 +1,56 @@
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Definition Tag Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Definition Tag Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>http://localhost:8080/tiles-test/</td>
+       <td></td>
+</tr>
+<tr>
+    <td>clickAndWait</td>
+    <td>link=Test Definition Tag</td>
+    <td></td>
+    </tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the title</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is the header</td>
+    <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>This is a body</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>

Propchange: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/DefinitionTagTest.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html?rev=439643&view=auto
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html 
(added)
+++ struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html Sat 
Sep  2 12:50:32 2006
@@ -0,0 +1,34 @@
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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>
+<body>
+
+<table>
+    <tr>
+        <td>Shale Blank Archetype Tests</td>
+    </tr>
+    <tr>
+        <td><a href="WelcomePageTest.html">Welcome Page Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="DefinitionTagTest.html">Definition Tag Test</a></td>
+    </tr>
+</table>
+</body>
+</html>
\ No newline at end of file

Propchange: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/TestSuite.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html?rev=439643&view=auto
==============================================================================
--- 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html 
(added)
+++ 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html 
Sat Sep  2 12:50:32 2006
@@ -0,0 +1,46 @@
+<!--
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Registration Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Welcome Page Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>http://localhost:8080/tiles-test/</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTitle</td>
+       <td>Tiles 2 Test Application</td>
+       <td></td>
+</tr>
+<tr>
+    <td>assertTextPresent</td>
+    <td>Tiles 2 Test Application</td>
+    <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>

Propchange: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/WelcomePageTest.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL


Reply via email to