Author: vrockai
Date: 2009-04-06 09:03:58 -0400 (Mon, 06 Apr 2009)
New Revision: 13164
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSExportFolderTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
Log:
[selenium] - new target for generating javadoc, some javadoc annotations in testclasses
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-04-06 11:41:15 UTC
(rev 13163)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-04-06 13:03:58 UTC
(rev 13164)
@@ -1,225 +1,235 @@
<project name="Tests" default="compile" basedir="."
xmlns:server="http://jboss.org/ns/test/ant/server">
- <property environment="env" />
+ <property environment="env" />
- <property name="workspace" location="build.xml" />
- <property name="java.home" location="${env.JAVA_HOME}" />
+ <property name="workspace" location="build.xml" />
+ <property name="java.home" location="${env.JAVA_HOME}" />
- <property name="suitename" location="testng-files" />
- <property name="testname" location="testng-files" />
+ <property name="suitename" location="testng-files" />
+ <property name="testname" location="testng-files" />
- <property name="testng.dir" location="testng-files" />
- <property name="testng.output.dir" location="test-output"
/>
- <property name="testng.debug.dir" location="debug" />
- <property name="test.build.dir" location="output/classes"
/>
- <property name="test.src.dir" location="src" />
- <property name="lib.dir" location="lib" />
- <property name="hudson.lib.dir" location="/qa/tools/opt/"
/>
- <property name="jboss-test.jar"
location="${hudson.lib.dir}/jboss-test.jar" />
- <available file="${jboss-test.jar}"
property="jboss-test.jar.present" />
- <property name="junit.report.dir" location="test-report"
/>
+ <property name="testng.dir" location="testng-files" />
+ <property name="testng.output.dir" location="test-output" />
+ <property name="testng.debug.dir" location="debug" />
+ <property name="dir.javadoc" location="javadoc" />
+ <property name="test.build.dir" location="output/classes" />
+ <property name="test.src.dir" location="src" />
+ <property name="lib.dir" location="lib" />
+ <property name="hudson.lib.dir" location="/qa/tools/opt/" />
+ <property name="jboss-test.jar"
location="${hudson.lib.dir}/jboss-test.jar" />
+ <available file="${jboss-test.jar}"
property="jboss-test.jar.present" />
+ <property name="junit.report.dir" location="test-report" />
- <property name="selsrv.dir" location="selenium-rc-server"
/>
- <property name="node0" value="localhost" />
- <property name="jboss.test.home"
value="${env.JBOSS_TEST_HOME}" />
- <property name="jboss.home" value="${env.JBOSS_HOME}" />
- <property name="jboss.test.jar" value="lib/jboss-test.jar"
/>
- <property name="jboss.portal.dir"
value="${env.JBOSS_UNZIPED_DIR}" />
- <property name="portal_archive" value="${env.JBOSS_ARCHIVE}"
/>
- <property name="portal.instance" value="default" />
+ <property name="selsrv.dir" location="selenium-rc-server" />
+ <property name="node0" value="localhost" />
+ <property name="jboss.test.home" value="${env.JBOSS_TEST_HOME}"
/>
+ <property name="jboss.home" value="${env.JBOSS_HOME}" />
+ <property name="jboss.test.jar" value="lib/jboss-test.jar" />
+ <property name="jboss.portal.dir"
value="${env.JBOSS_UNZIPED_DIR}" />
+ <property name="portal_archive" value="${env.JBOSS_ARCHIVE}"
/>
+ <property name="portal.instance" value="default" />
- <property name="test.suite" value="testng.xml" />
- <property name="usecase.suite" value="end2end.xml" />
+ <property name="test.suite" value="testng.xml" />
+ <property name="usecase.suite" value="end2end.xml" />
- <path id="jboss.test.classpath">
- <pathelement path="${jboss.test.jar}" />
- </path>
+ <path id="jboss.test.classpath">
+ <pathelement path="${jboss.test.jar}" />
+ </path>
- <path id="libraries.cp">
- <fileset dir="${lib.dir}">
- <include name="*.jar" />
- </fileset>
+ <path id="libraries.cp">
+ <fileset dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
- </path>
+ </path>
- <path id="test.cp">
- <pathelement location="${test.build.dir}" />
- <path refid="libraries.cp" />
- </path>
+ <path id="test.cp">
+ <pathelement location="${test.build.dir}" />
+ <path refid="libraries.cp" />
+ </path>
- <taskdef name="testng" classpathref="libraries.cp"
classname="org.testng.TestNGAntTask" />
- <taskdef name="config"
classname="org.jboss.ant.taskdefs.server.ConfigManagerTask"
uri="http://jboss.org/ns/test/ant/server"
loaderref="server.loader">
- <classpath id="server.taskdef.classpath">
- <path refid="jboss.test.classpath" />
- </classpath>
- </taskdef>
- <taskdef name="start"
classname="org.jboss.ant.taskdefs.server.StartServerTask"
uri="http://jboss.org/ns/test/ant/server"
loaderref="server.loader">
- <classpath refid="server.taskdef.classpath" />
- </taskdef>
- <taskdef name="stop"
classname="org.jboss.ant.taskdefs.server.StopServerTask"
uri="http://jboss.org/ns/test/ant/server"
loaderref="server.loader">
- <classpath refid="server.taskdef.classpath" />
- </taskdef>
+ <taskdef name="testng" classpathref="libraries.cp"
classname="org.testng.TestNGAntTask" />
+ <taskdef name="config"
classname="org.jboss.ant.taskdefs.server.ConfigManagerTask"
uri="http://jboss.org/ns/test/ant/server"
loaderref="server.loader">
+ <classpath id="server.taskdef.classpath">
+ <path refid="jboss.test.classpath" />
+ </classpath>
+ </taskdef>
+ <taskdef name="start"
classname="org.jboss.ant.taskdefs.server.StartServerTask"
uri="http://jboss.org/ns/test/ant/server"
loaderref="server.loader">
+ <classpath refid="server.taskdef.classpath" />
+ </taskdef>
+ <taskdef name="stop"
classname="org.jboss.ant.taskdefs.server.StopServerTask"
uri="http://jboss.org/ns/test/ant/server"
loaderref="server.loader">
+ <classpath refid="server.taskdef.classpath" />
+ </taskdef>
- <target name="init">
- <echo message="Browser : ${browser}" />
- <echo message="Screenshot : ${screenshot}" />
- <echo message="Deleting testng report directory" />
- <delete dir="${testng.output.dir}" />
- <delete dir="${testng.debug.dir}" />
- </target>
+ <target name="init">
+ <echo message="Browser : ${browser}" />
+ <echo message="Screenshot : ${screenshot}" />
+ <echo message="Deleting testng report directory" />
+ <delete dir="${testng.output.dir}" />
+ <delete dir="${testng.debug.dir}" />
+ <delete dir="${dir.javadoc}" />
+ </target>
- <target name="compile" depends="">
- <echo message="Compiling testsuite" />
- <mkdir dir="${test.build.dir}" />
- <javac srcdir="${test.src.dir}"
destdir="${test.build.dir}" classpathref="libraries.cp"
debug="on" />
- <copy
file="${test.src.dir}/org/jboss/portal/test/selenium/locator.properties"
todir="${test.build.dir}/org/jboss/portal/test/selenium/"/>
- </target>
+ <target name="compile" depends="">
+ <echo message="Compiling testsuite" />
+ <mkdir dir="${test.build.dir}" />
+ <javac srcdir="${test.src.dir}" destdir="${test.build.dir}"
classpathref="libraries.cp" debug="on" />
+ <copy
file="${test.src.dir}/org/jboss/portal/test/selenium/locator.properties"
todir="${test.build.dir}/org/jboss/portal/test/selenium/" />
+ </target>
- <target name="run-src">
- <echo message="Starting Selenium Remote Control" />
- <java jar="${selsrv.dir}/selenium-server.jar" fork="true"
spawn="true">
- <arg value="-multiWindow" />
- <arg value="-port" />
- <arg value="44444" />
- <arg value="-log" />
- <arg value="selenium.log" />
- <arg value="-debug" />
- <arg value="-userExtensions" />
- <arg value="${selsrv.dir}/user-extensions.js" />
- </java>
- <sleep seconds="20" />
- </target>
+ <target name="javadoc" depends="">
+ <mkdir dir="${dir.javadoc}" />
+ <javadoc packagenames="org.jboss.portal.test.selenium.*"
classpathref="libraries.cp" access="public"
destdir="${dir.javadoc}" author="true" version="true"
use="true">
+ <fileset dir="${test.src.dir}" defaultexcludes="yes">
+ <include name="**/*.java" />
+ </fileset>
+ </javadoc>
+ </target>
- <target name="stop-src">
- <get taskname="selenium-shutdown"
src="http://localhost:44444/selenium-server/driver/?cmd=shutDown"
dest="result.txt" ignoreerrors="true" />
- <echo taskname="selenium-shutdown" message="DGF Errors during
shutdown are expected" />
- </target>
+ <target name="run-src">
+ <echo message="Starting Selenium Remote Control" />
+ <java jar="${selsrv.dir}/selenium-server.jar" fork="true"
spawn="true">
+ <arg value="-multiWindow" />
+ <arg value="-port" />
+ <arg value="44444" />
+ <arg value="-log" />
+ <arg value="selenium.log" />
+ <arg value="-debug" />
+ <arg value="-userExtensions" />
+ <arg value="${selsrv.dir}/user-extensions.js" />
+ </java>
+ <sleep seconds="20" />
+ </target>
- <target name="copyApps">
- <echo message="Copying userInterceptor portlet into the
${portal.instance} server" />
- <copy file="apps/userDetail-portlet.war"
tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war"
/>
- </target>
+ <target name="stop-src">
+ <get taskname="selenium-shutdown"
src="http://localhost:44444/selenium-server/driver/?cmd=shutDown"
dest="result.txt" ignoreerrors="true" />
+ <echo taskname="selenium-shutdown" message="DGF Errors during
shutdown are expected" />
+ </target>
- <target name="clean">
- <echo message="Going to delete directory ${test.build.dir}" />
- <delete dir="${test.build.dir}" />
- </target>
+ <target name="copyApps">
+ <echo message="Copying userInterceptor portlet into the ${portal.instance}
server" />
+ <copy file="apps/userDetail-portlet.war"
tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war"
/>
+ </target>
- <server:config javaHome="${java.home}"
jbossHome="${jboss.home}">
- <server name="${portal.instance}" host="${node0}">
+ <target name="clean">
+ <echo message="Going to delete directory ${test.build.dir}" />
+ <delete dir="${test.build.dir}" />
+ </target>
+
+ <server:config javaHome="${java.home}"
jbossHome="${jboss.home}">
+ <server name="${portal.instance}" host="${node0}">
<!-- jvmarg value="${jpda.cmdline}" / -->
- <jvmarg value="-Xmx512m" />
- <jvmarg value="-XX:MaxPermSize=128m" />
- <sysproperty key="java.endorsed.dirs"
value="${jboss.home}/lib/endorsed" />
- </server>
- </server:config>
+ <jvmarg value="-Xmx512m" />
+ <jvmarg value="-XX:MaxPermSize=128m" />
+ <sysproperty key="java.endorsed.dirs"
value="${jboss.home}/lib/endorsed" />
+ </server>
+ </server:config>
- <target name="cleanup">
- <echo message="Cleaning up..." />
- <antcall target="stop-src" />
+ <target name="cleanup">
+ <echo message="Cleaning up..." />
+ <antcall target="stop-src" />
- </target>
+ </target>
- <target name="run-and-build" depends="init, compile,
run-src">
- <echo message="Starting portal instance : ${portal.instance}" />
- <server:start name="${portal.instance}" />
+ <target name="run-and-build" depends="init, compile,
run-src">
+ <echo message="Starting portal instance : ${portal.instance}" />
+ <server:start name="${portal.instance}" />
- <echo message="Runing TestNG" />
- <mkdir dir="test-output" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="test-output"
listeners="org.testng.reporters.JUnitXMLReporter"
suitename="SeleniumSuite">
+ <echo message="Runing TestNG" />
+ <mkdir dir="test-output" />
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="test-output"
listeners="org.testng.reporters.JUnitXMLReporter"
suitename="SeleniumSuite">
- <xmlfileset dir="." includes="${testng.suite}" />
- <sysproperty key="browser" value="${browser}" />
- <sysproperty key="screenshot" value="${screenshot}"
/>
- <sysproperty key="workspace" value="${workspace}"
/>
- <sysproperty key="userCount" value="${userCount}"
/>
- <sysproperty key="html-src" value="${html-src}" />
- <sysproperty key="output-dir"
value="${testng.output.dir}" />
- <jvmarg value="-ea" />
+ <xmlfileset dir="." includes="${testng.suite}" />
+ <sysproperty key="browser" value="${browser}" />
+ <sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
+ <sysproperty key="output-dir" value="${testng.output.dir}"
/>
+ <jvmarg value="-ea" />
- </testng>
- <echo message="Stoping portal instance : ${portal.instance}" />
- <server:stop name="${portal.instance}" />
- <antcall target="cleanup" />
- </target>
+ </testng>
+ <echo message="Stoping portal instance : ${portal.instance}" />
+ <server:stop name="${portal.instance}" />
+ <antcall target="cleanup" />
+ </target>
- <target name="single-test" depends="init, compile, run-src,
copyApps">
- <echo message="Runing TestNG" />
+ <target name="single-test" depends="init, compile, run-src,
copyApps">
+ <echo message="Runing TestNG" />
- <mkdir dir="test-output" />
- <mkdir dir="debug" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="${testng.output.dir}"
listeners="org.jboss.portal.test.selenium.JBossSeleniumTestListener"
suitename="SeleniumSingleTest" verbose="2">
+ <mkdir dir="test-output" />
+ <mkdir dir="debug" />
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="${testng.output.dir}"
listeners="org.jboss.portal.test.selenium.JBossSeleniumTestListener"
suitename="SeleniumSingleTest" verbose="2">
- <classfileset dir="${test.build.dir}"
includes="${testname}" />
- <sysproperty key="browser" value="${browser}" />
- <sysproperty key="screenshot" value="${screenshot}"
/>
- <sysproperty key="debug" value="${debug}" />
- <sysproperty key="workspace" value="${workspace}"
/>
- <sysproperty key="userCount" value="${userCount}"
/>
- <sysproperty key="html-src" value="${html-src}" />
- <sysproperty key="output-dir"
value="${testng.output.dir}" />
- <jvmarg value="-ea" />
- </testng>
- <antcall target="cleanup" />
+ <classfileset dir="${test.build.dir}" includes="${testname}"
/>
+ <sysproperty key="browser" value="${browser}" />
+ <sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="debug" value="${debug}" />
+ <sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
+ <sysproperty key="output-dir" value="${testng.output.dir}"
/>
+ <jvmarg value="-ea" />
+ </testng>
+ <antcall target="cleanup" />
- </target>
+ </target>
- <target name="selenium-test" depends="init, compile, run-src,
copyApps">
- <echo message="Runing TestNG" />
+ <target name="selenium-test" depends="init, compile, run-src,
copyApps">
+ <echo message="Runing TestNG" />
- <mkdir dir="test-output" />
- <mkdir dir="debug" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="${testng.output.dir}" suitename="SeleniumSuite">
+ <mkdir dir="test-output" />
+ <mkdir dir="debug" />
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="${testng.output.dir}" suitename="SeleniumSuite">
- <xmlfileset dir="." includes="${test.suite}" />
+ <xmlfileset dir="." includes="${test.suite}" />
- <sysproperty key="browser" value="${browser}" />
- <sysproperty key="screenshot" value="${screenshot}"
/>
- <sysproperty key="debug" value="${debug}" />
- <sysproperty key="workspace" value="${workspace}"
/>
- <sysproperty key="userCount" value="${userCount}"
/>
- <sysproperty key="html-src" value="${html-src}" />
- <sysproperty key="output-dir"
value="${testng.output.dir}" />
-
+ <sysproperty key="browser" value="${browser}" />
+ <sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="debug" value="${debug}" />
+ <sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
+ <sysproperty key="output-dir" value="${testng.output.dir}"
/>
- <jvmarg value="-ea" />
+ <jvmarg value="-ea" />
- </testng>
- <antcall target="cleanup" />
- </target>
+ </testng>
+ <antcall target="cleanup" />
+ </target>
- <target name="selenium-usecase" depends="init, compile, run-src,
copyApps">
- <echo message="Runing TestNG" />
+ <target name="selenium-usecase" depends="init, compile, run-src,
copyApps">
+ <echo message="Runing TestNG" />
- <mkdir dir="test-output" />
- <mkdir dir="debug" />
-
- <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="${testng.output.dir}" suitename="SeleniumSuite">
+ <mkdir dir="test-output" />
+ <mkdir dir="debug" />
- <xmlfileset dir="." includes="${usecase.suite}" />
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}"
outputdir="${testng.output.dir}" suitename="SeleniumSuite">
- <sysproperty key="browser" value="${browser}" />
- <sysproperty key="screenshot" value="${screenshot}"
/>
- <sysproperty key="debug" value="${debug}" />
- <sysproperty key="workspace" value="${workspace}"
/>
- <sysproperty key="userCount" value="${userCount}"
/>
- <sysproperty key="html-src" value="${html-src}" />
- <sysproperty key="output-dir"
value="${testng.output.dir}" />
- <jvmarg value="-ea" />
+ <xmlfileset dir="." includes="${usecase.suite}" />
- </testng>
- <antcall target="cleanup" />
- </target>
+ <sysproperty key="browser" value="${browser}" />
+ <sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="debug" value="${debug}" />
+ <sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
+ <sysproperty key="output-dir" value="${testng.output.dir}"
/>
+ <jvmarg value="-ea" />
- <target name="archive" >
- <!--<touch file="touchme.txt"/>-->
- <echo file="touchme.txt" message="pipik2"/>
- <genkey alias="apache-group" storepass="secret"
dname="CN=Ant Group, OU=Jakarta Division,
O=Apache.org, C=US"/>
- <echo message=""/>
- </target>
+ </testng>
+ <antcall target="cleanup" />
+ </target>
+ <target name="archive">
+ <!--<touch file="touchme.txt"/>-->
+ <echo file="touchme.txt" message="pipik2" />
+ <genkey alias="apache-group" storepass="secret"
dname="CN=Ant Group, OU=Jakarta Division,
O=Apache.org, C=US" />
+ <echo message="" />
+ </target>
+
</project>
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -9,7 +9,7 @@
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
-@Test(groups = { "coordination_samples" }, enabled = true)
+@Test(groups = { "coordination_samples" }, enabled = false)
public class CoordinationSamplesFullTestCase extends JBossPortalSeleniumTestCase {
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -9,6 +9,10 @@
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
+/**
+ * The Class Coordination Samples TestCase is responsible for testing of coordination
features of JBoss Portal using it's coordination samples page.
+ * In default state the page is available on address <a
href="http://localhost:8080/portal/portal/default/Coordination+Samples">/portal/portal/default/Coordination+Samples</a>.
+ */
@Test(groups = { "coordination_samples" }, enabled = true)
public class CoordinationSamplesTestCase extends JBossPortalSeleniumTestCase {
@@ -75,16 +79,42 @@
private final String EVT_R_C3 = "Backpack";
@BeforeMethod(groups = { "log" })
- public void loginBeforeTest() {
+ protected void loginBeforeTest() {
selenium.open("/portal/portal/default/default");
selenium.waitForPageToLoad(PAGE_LOAD);
}
@AfterMethod(groups = { "log" })
- public void logoutAfterTest() {
+ protected void logoutAfterTest() {
}
+ /**
+ * Default coordination test is responsible for testing default coordination on the
coordination samples page.
+ * It has to work with the default page <a
href="http://localhost:8080/portal/portal/default/Coordination+Samples">/portal/portal/default/Coordination+Samples</a>.
+ * <br/>
+ * It starts with opening <a
href="http://localhost:8080/portal/portal/default/Coordination+Samples?zip=78759">http://localhost:8080/portal/portal/default/Coordination+Samples?zip=78759</a>
+ * and checking that both variables on page have values asserted like this: <br/>
+ * <table>
+ * <tr>
+ * <td>Weather for (my_zipcode)</td><td>78759</td>
+ * </tr>
+ * <tr>
+ * <td>Map for (your_zipcode)</td><td>78759</td>
+ * </tr>
+ * </table>
+ * Then it fills up the <em>Page Parameter Portlet</em> with values:
+ * <table>
+ * <tr>
+ * <td>Page parameter name</td><td>xyz</td>
+ * </tr>
+ * <tr>
+ * <td>Page parameter value</td><td>123</td>
+ * </tr>
+ * </table>
+ *
+ * clicks on submit button and assert the url is in format <a
href="http://localhost:8080//portal/portal/default/Coordination+Samples?xyz=123">/portal/portal/default/Coordination+Samples?xyz=123</a>
+ */
@Test(enabled = true)
public void defaultCoordinationTest() {
selenium.open("/portal/portal/default/Coordination+Samples");
@@ -103,6 +133,11 @@
Assert.assertTrue(selenium.getLocation().endsWith("/portal/portal/default/Coordination+Samples?xyz=123"));
}
+ /**
+ * Events explicit test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Events+-+Expl...
is demonstration of explicit event wiring.</p><ul><li>Click on "Add
to Cart" on the Catalog Portlet on the left half for
Snowboard.</li></ul><p> Assert that two Cart Portlets on
the left half<strong> have Snowboard in them.</strong></p><p
style="padding-left: 30px;"> Assert that two Cart Porlets on the right
<strong>have "Cart is
empty"</strong></p><ul><li>Click on "Add to Cart"
on the Catalog Portlet on the right half for Tent.</li></ul><p>
Assert that two Cart Portlets on the left half <strong>have no
"Tent"</strong> in them</p><p style="padding-left:
30px;"> Assert that two Cart Porlets on the <strong>right have
"Tent"</strong> in them.</p><p style="min-height: 8pt;
height: 8pt; padding: 0px;"> </p>
+ */
@Test(enabled = true)
public void eventsExplicitTest() {
selenium.click("link=Events - Explicit");
@@ -161,6 +196,11 @@
Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
}
+ /**
+ * Events fallback test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Events+-+Fall...
is demonstration of mix of both explicit and implicit. (Is there a better way to describe
this?)</p><ul><li>Click on "Add to Cart" on the Catalog
Portlet on the left half for Snowboard.</li></ul><p> Assert
that two Cart Portlets on the left half<strong> have Snowboard in
them.</strong></p><p style="padding-left: 30px;"> Assert
that two Cart Porlets on the right <strong>have "Cart is
empty"</strong></p><ul><li>Click on "Add to Cart"
on the Catalog Portlet on the right half for Tent.</li></ul><p>
Assert that two Cart Portlets on the left half <strong>have
"Tent"</strong> in them</p><p style="padding-left:
30px;"> Assert that two Cart Porlets on the <strong>right have
"Tent"</strong> in them.</p><p style="min-height: 8pt;
height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt;
height: 8pt; padding: 0px;"> </p>
+ */
@Test(enabled = true)
public void eventsFallbackTest() {
selenium.click("link=Events - Fallback");
@@ -219,6 +259,11 @@
Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
}
+ /**
+ * Events implicit test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Events+-+Impl...
is implicit wiring which is the default wiring. Events are propagated based on their Qname
regarless of which portlet generated the event.</p><ul><li>Click on
"Add to Cart" on the Catalog Portlet on the left half for
Snowboard.</li></ul><p> Assert that two Cart Portlets on
the left half<strong> have Snowboard in them.</strong></p><p
style="padding-left: 30px;"> Assert that two Cart Porlets on the right
<strong>have Snowboard in them.</strong></p><ul><li>Click on
"Add to Cart" on the Catalog Portlet on the right half for
Tent.</li></ul><p> Assert that two Cart Portlets on the
left half <strong>have "Tent"</strong> in them</p><p
style="padding-left: 30px;"> Assert that two Cart Porlets on the
<strong>right have "Tent"</strong> in them.</p><p
style="min-height: 8pt; height: 8pt; padding:
0px;"> </p><h2><span><span style="color!
: #800000;">Parameters Binding:</span></span></h2>
+ */
@Test(enabled = true)
public void eventsImplicitTest() {
selenium.click("link=Events - Implicit");
@@ -301,6 +346,11 @@
Assert.assertTrue(findTableRow(EVT_R3_TAB, EVT_R_C3, 0) > 0);
}
+ /**
+ * Parameter alias test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+...
style="min-height: 8pt; height: 8pt; padding:
0px;"> </p><ul><li><span>Hit the URL
</span><a class="jive-link-external-small"
href="http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Alias?binding1=Viliam">http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Alias?binding1=Viliam</a><span>.
Assert that </span><strong>"Viliam" is present</strong> in all
PublicParametersPortletWindow for foo* parameters</li><li><span>Hit the
URL </span><a class="jive-link-external-small"
href="http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Alias?binding2=Prabhat">http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Alias?binding2=Prabhat</a><span>.
Assert that </span><strong>"Prabhat" is present </strong>in
all PublicParametersPortletWindow for juu* parameters and <strong>Viliam is not
present</!
strong> in all PublicParametersPortletWindow for foo*
parameters</li><li>Add "footest" for foo1 in
PublicParametersPortletWindow1 and hit update. Assert that "footest" is present
in all PublicParametersPortletWindow</li><li>Click on Remove link from
PublicParametersPortletWindow4 for foo2. Assert that "footest" is removed from
all PublicParametersPortletWindow.</li><li>In Page Parameters Portlet, add any
parameter and value (xyz, 123) and verify that URL is changed (appended with ?xyz=123)
once you hit update.</li></ul>
+ */
@Test(enabled = true)
public void parameterAliasTest() {
selenium.click("link=Parameters - Alias");
@@ -423,6 +473,11 @@
}
+ /**
+ * Parameter explicit test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+...
the URL </span><a class="jive-link-external-small"
href="http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Explicit?binding1=Viliam">http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Explicit?binding1=Viliam</a><span>.
Assert that </span><strong>"Viliam" is present in Windows 1,2 and 3
but not in 4.</strong></li><li>Click on Remove link from Window 3 and
assert that "Viliam" is not present in any of
windows.</li><li><span>Hit the URL </span><a
class="jive-link-external-small"
href="http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Explicit?binding2=Nepal">http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+Explicit?binding2=Nepal</a><span>.
Assert that "Nepal" is present in Window1 for bar1, daa1 for Window2, bar2 for
Window3, daa2 for Window4.</span><br/></li><!
li>In Page Parameters Portlet, add any parameter and value (xyz, 123) and verify that
URL is changed (appended with ?xyz=123) once you hit update.</li></ul><p
style="min-height: 8pt; height: 8pt; padding: 0px;"> </p>
+ */
@Test(enabled = true)
public void parameterExplicitTest() {
selenium.click("link=Parameters - Explicit+Alias");
@@ -521,6 +576,11 @@
Assert.assertTrue(selenium.getLocation().endsWith("Parameters+-+Explicit?xyz=123"));
}
+ /**
+ * Parameter explicit alias test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+...
the URL </span><a class="jive-link-external-small"
href="http://host:8080/portal/portal/portal/default/Coordination+Samples/Parameters+-+Explicit%2BAlias?binding1=prabhat">http://host:8080/portal/portal/portal/default/Coordination+Samples/Parameters+-+Explicit%2BAlias?binding1=prabhat</a><span>.
Assert that </span><strong>"Prabhat" is present in Windows 1 for
foo1 and in Windows2 for bar1.<br/></strong></li><li>Click on
Remove link from Window 2 and assert that "Prabhat" is not present in any of
windows.</li><li><span>Hit the URL </span><a
class="jive-link-external-small"
href="http://host:8080/portal/portal/portal/default/Coordination+Samples/Parameters+-+Explicit%2BAlias?binding2=Thomas">http://host:8080/portal/portal/portal/default/Coordination+Samples/Parameters+-+Explicit%2BAlias?binding2=Thomas</a><span>.
Assert that "Thomas" is present!
in Window2, Window3 and Window4 but not in Window1. Since foo parameter in Window is
part of binding1 and it's explicit binding, using binding2 does not have impact on foo
parameter for window1.</span><br/> </li><li>In Page Parameters
Portlet, add any parameter and value (xyz, 123) and verify that URL is changed (appended
with ?xyz=123) once you hit update.</li></ul><p style="min-height:
8pt; height: 8pt; padding: 0px;"> </p>
+ */
@Test(enabled = true)
public void parameterExplicitAliasTest() {
selenium.click("link=Parameters - Explicit+Alias");
@@ -619,6 +679,11 @@
Assert.assertTrue(selenium.getLocation().endsWith("/portal/portal/default/Coordination+Samples/Parameters+-+Explicit%2BAlias?xyz=123"));
}
+ /**
+ * Parameter implicit test.
+ *
+ * <h3>For the page:
http://host:8080/portal/portal/default/Coordination+Samples/Parameters+-+...
"footest" for foo1 in PublicParametersPortletWindow1 and hit update. Assert that
"footest" is present in all
PublicParametersPortletWindow</li><li>Click on Remove link from
PublicParametersPortletWindow4 for foo2. Assert that "footest" is removed from
all PublicParametersPortletWindow</li><li>Need clarification for the
rest.</li></ul>
+ */
@Test(enabled = true)
public void parameterImplicitTest() {
selenium.click("link=Parameters - Implicit");
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -14,7 +14,7 @@
@Test(groups = { "login" }, enabled = true)
public class UserLoginTestCase extends JBossPortalSeleniumTestCase {
- /** prefix for locator properties */
+ /** prefix for locator properties = user.login.*/
public final String casePfx = "user.login.";
private final String ADR_PORTAL =
getProp(casePfx+"adr.portal","/portal");
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -142,7 +142,7 @@
/**
* Test bea consumer deregister is responsible for deleting previously created BEA
consumer.
- * It creates BEA consumer with name BEA and values similiar to that from
{@link=testCreateBeaConsumer}.
+ * It creates BEA consumer with name BEA and values similiar to that from
testCreateBeaConsumer.
* Then it clicks on deregister link for the consumer and checks whether deregister link
has changed into register link.
*/
@Test(enabled = true, dependsOnMethods = { "testCreateBeaConsumer" },
description = "Standard BEA consumer deregistering.")
@@ -196,7 +196,7 @@
/**
* Test bea consumer deactivate is responsible for deactivating a bea consumer.
- * Firstly it creates bea consumer named <b>BEAact</b> with parameters
similiar to that from {@link=testCreateBeaConsumer}.
+ * Firstly it creates bea consumer named <b>BEAact</b> with parameters
similiar to that from testCreateBeaConsumer.
* Then it asserts that message signalling the consumer non-active state is missing.
* After clicking on deactivation link it assert, that the message signalling non-active
state of consumer has appeared.
*/
@@ -236,7 +236,7 @@
/**
* Test bea consumer delete is responsible for deleting a bea consumer.
- * Firstly it creates bea consumer named <b>BEAdel</b> with parameters
similiar to that from {@link=testCreateBeaConsumer}.
+ * Firstly it creates bea consumer named <b>BEAdel</b> with parameters
similiar to that from testCreateBeaConsumer.
* It click on the delete icon for the consumer and then it asserts the consumer has
disappeared from the table.
*/
@Test(enabled = true, dependsOnMethods = { "testCreateBeaConsumer" },
description = "Standard BEA consumer deleting.")
@@ -316,7 +316,7 @@
/**
* Test configure consumer is responsible for configuring bea consumer.
- * Firstly it creates bea consumer named <b>renameMe</b> with parameters
similiar to that from {@link=testCreateBeaConsumer}.
+ * Firstly it creates bea consumer named <b>renameMe</b> with parameters
similiar to that from testCreateBeaConsumer.
* Then it clicks on configure button for the consumer and rename it to
<b>renameNewMe</b>.
* At the end it asserts that the previous name is missing in the consumers table and
the new name has appeared.
*/
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -7,25 +7,32 @@
import org.testng.annotations.Test;
/**
+ * CMSArchiveUploadTestCase is responsible for testing the upload of archives into JBoss
Portal CMS. The test has set the selenium timeout of 10000ms due
+ * to CMS uploading speed limitation of portal. When no timeout is set, the testcase
fails and crush the whole portal which is unusable after the crash.
+ *
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
*/
-@Test(groups = { "cms_archive_upload" }, enabled = true)
+@Test(groups = { "cms_archive_upload" }, enabled = true,
description="Testing the upload of archives into JBoss Portal CMS")
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
- private static final Integer ARCHIVE_WAITING = 5000;
- private static final int n = 50;
+
+ /** The constant defining the wait time (in ms) between attempts when checking if the
file was uploaded. */
+ public static final int ARCHIVE_WAITING = 5000;
+
+ /** The constant defining the the number of attempts when checking if the file was
uploaded. */
+ public static final int ATTEMPTS = 50;
/*
* uncomment following lines and set the right path to the workspace in the
* case you want to use this test case locally from eclipse
*/
-/*
+ /*
{
System.setProperty("workspace",
"/home/vrockai/workspace/p2.7tests/ui-tests/");
}
-*/
-
- private final String casePfx = "cms.arch.";
+ */
+ /** prefix for locator properties = cms.arch.*/
+ public final String casePfx = "cms.arch.";
private final String SUB_CANCEL_ARCH_UPLOAD =
getProp(casePfx+"sub.cancel.arch.upload","cancel");
private final String LNK_ADMIN =
getProp(casePfx+"lnk.admin","link=Admin");
private final String LNK_CMS =
getProp(casePfx+"lnk.cms","link=CMS");
@@ -37,7 +44,7 @@
private final String WORKSPACE = System.getProperty("workspace");
@BeforeMethod(groups = { "log" })
- public void loginBeforeTest() {
+ protected void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
// timeout hack
@@ -45,10 +52,19 @@
}
@AfterMethod(groups = { "log" })
- public void logoutAfterTest() {
+ protected void logoutAfterTest() {
}
+ /**
+ * Test archive consisting of two files upload.
+ * The archive used in this test consists of one directory containing two files - one
image file and one plain text file.
+ * The test tries to upload the archive into the root directory of CMS structure.
+ * At first it cancels the uploading of the file and asserts the archive wasn't
uploaded. At the second attempt it really
+ * uploads the file and asserts that both of the files are in their locations.
+ *
+ * The archive file can be found on "test_files/archive.zip".
+ */
@Test(enabled = true, description = "Test archive consisting of two files
upload.")
public void testArchiveUpload() {
// canceling at the first stage
@@ -94,7 +110,7 @@
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- if (i >= n) {
+ if (i >= ATTEMPTS) {
Assert.assertTrue(selenium.isElementPresent("link=archive"), "uploaded
archive not found");
break;
}
@@ -112,6 +128,14 @@
Assert.assertTrue(selenium.isElementPresent("link=jbosslogo.png"),
"content of uploaded file not found #2");
}
+ /**
+ * Test archive consisting of > 100 files upload.
+ * The archive used in this test consists of one directory containing more the 100 files
in plain text format.
+ * The test tries to upload the archive into the root directory of CMS structure.
+ * It uploads the archive file and asserts that one of the files is in its location.
+ *
+ * The archive file can be found on "test_files/many_files.zip".
+ */
@Test(enabled = true, description = "Test archive consisting of > 100 files
upload.")
public void testManyFilesArchiveUpload() {
@@ -138,7 +162,7 @@
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- if (i >= n) {
+ if (i >= ATTEMPTS) {
Assert.assertTrue(selenium.isElementPresent("link=many_files"),
"uploaded archive not found");
break;
}
@@ -154,6 +178,14 @@
Assert.assertTrue(selenium.isElementPresent("link=file31.txt"), "content
of uploaded archive not found");
}
+ /**
+ * Test archive consisting of 21MB file upload.
+ * The archive used in this test consists of one directory containing one file which is
larger then 21MB.
+ * The test tries to upload the archive into the root directory of CMS structure.
+ * It uploads the archive file and asserts that the file is in its location.
+ *
+ * The archive file can be found on "test_files/big_archive.zip".
+ */
@Test(enabled = true, description = "Test archive consisting of 21MB file
upload.")
public void testBigArchiveUpload() {
@@ -180,7 +212,7 @@
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
- if (i >= n) {
+ if (i >= ATTEMPTS) {
Assert.assertTrue(selenium.isElementPresent("link=bigfile"), "uploaded
archive not found");
break;
}
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -7,12 +7,16 @@
import org.testng.annotations.Test;
/**
+ * CMSDirectoryTestCase is responsible for basic manipulation with directories in JBoss
Portal CMS.
+ *
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
*/
-
-@Test(groups = { "cms_directory" }, enabled = true)
+//TODO refactoring of proeprties needed
+@Test(groups = { "cms_directory" }, enabled = true, description="Basic
manipulation with directories in JBoss Portal CMS")
public class CMSDirectoryTestCase extends JBossPortalSeleniumTestCase {
- private final String casePfx = "cms.dir.";
+
+ /** prefix for locator properties = cms.dir.*/
+ public final String casePfx = "cms.dir.";
private final String SEL_CMS_ACTION = getProp(casePfx + "sel.cms.action",
"//div[@id='center']/div/div/div[1]/div/select");
private final String ADR_CMS_INTERFACE = getProp(casePfx +
"adr.cms.interface", "/portal/auth/portal/admin/CMS");
@@ -24,20 +28,28 @@
private final String CMS_FILE_TABLE = getProp(casePfx + "cms.file.table",
"//div[@id='center']/div/div/div[3]/table");
@BeforeMethod(groups = { "log" })
- public void loginBeforeTest() {
+ protected void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
}
@AfterMethod(groups = { "log" })
- public void logoutAfterTest() {
+ protected void logoutAfterTest() {
}
+ /**
+ * Creates a directory.
+ *
+ * With action selector an action to create a directory is chosen.
+ * Directory named "tempDir" with description "test folder" is
filled in to the directory creation form, but in the first attempt, the creation is
canceled.
+ * In the second attempt, the directory is created. Then the name of a directory in the
home directory is asserted.
+ */
+ //TODO asserts in the end have to be redone
@Test(enabled = true, description = "Directory creation.")
public void testCreateDirectory() {
- // cancelling of creating
+ // canceling of creating
selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -77,7 +89,7 @@
selenium.type("newcollectiondescription", "test folder");
selenium.click("submit");
- // assuring that the directory is deleted
+ // assuring that the directory is created
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/ul/li[3]"));
@@ -88,6 +100,13 @@
}
+ /**
+ * Deletes a directory.
+ *
+ * With action selector an action to delete a directory is chosen. The directory had to
be deleted was created with {@link CMSDirectoryTestCase#testCreateDirectory()}.
+ * At first, after warning message, the directory is not deleted, the deletion is
canceled. At the second attempt
+ * the deletion is done. Then the name of a directory in the home directory is asserted
not to appear there.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description =
"Directory delete.")
public void testDeleteDirectory() {
@@ -143,6 +162,12 @@
Assert.assertFalse(selenium.isElementPresent("link=" + tempDirName));
}
+ /**
+ * Copies a directory.
+ *
+ * With action selector an action to copy a directory is chosen. Before that a
directory named "copySrc" was created.
+ * Then it was copied into "default" directory. Then the existence of the
copied directory in both root and default directories is asserted.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description =
"Copying of directory.")
public void testCopyDirectory() {
selenium.click("link=Admin");
@@ -186,6 +211,12 @@
}
+ /**
+ * Cancels the copying of a directory.
+ *
+ * With action selector an action to copy a directory is chosen. The copying is
canceled with cancel button.
+ * Assertion making sure the directory was not copied are then applied.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description =
"Canceling of copying of directory.")
public void testCopyCancelDirectory() {
String copyCancelDirName = "L" + "copyLDirName" +
"Cancel";
@@ -227,6 +258,12 @@
}
+ /**
+ * Moves a directory.
+ *
+ * With action selector an action to move a directory is chosen. Before that a
directory named "moveSrc" was created.
+ * Then it was copied into "default" directory. Then the existence of the
moved directory in default and not in the root directory is asserted.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description =
"Moving a directory.")
public void testMoveDirectory() {
// selenium.setSpeed("3000");
@@ -274,6 +311,12 @@
}
+ /**
+ * Cancels the moving of a directory.
+ *
+ * With action selector an action to move a directory is chosen. The copying is
canceled with cancel button.
+ * Assertion making sure the directory was not moved are then applied.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateDirectory", description =
"Canceling of moving a directory.")
public void testMoveCancelDirectory() {
String moveCancelDirName = "X" + "moveXDirName" +
"Cancel";
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSExportFolderTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSExportFolderTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSExportFolderTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -11,6 +11,9 @@
import com.thoughtworks.selenium.Selenium;
/**
+ * CMSExportFolderTestCase should tests the exporting of directories in JBoss Portal CMS.
+ * Unfortunatelly selenium is not capable to deal with such a task. The testcase is
empty.
+ *
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
*/
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -7,29 +7,38 @@
import org.testng.annotations.Test;
/**
+ * CMSFileTestCase is used to test basic file manipulation in JBoss Portal CMS
+ * with the workflow turned off.
+ *
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
*/
-
-@Test(groups = { "cms_file" }, enabled = true)
+// TODO refactoring of field needed
+@Test(groups = { "cms_file" }, enabled = true, description = "Basic file
manipulation in JBoss Portal CMS")
public class CMSFileTestCase extends JBossPortalSeleniumTestCase {
+ /** prefix for locator properties = cms.file. */
private final String casePfx = "cms.file.";
- private final String TBL_CMS_FILEVER =
getProp(casePfx+"tbl.cms.filever","//div[@id='center']/div/div/table");
- public final String TBL_CMS_FILE =
getProp(casePfx+"tbl.cms.file","//div[@id='center']/div/div/div[3]/table");
- public final String TBL_FILE_PENDING =
getProp(casePfx+"tbl.file.pending","//div[@id='center']/div/div/table[2]");
-
+ private final String TBL_CMS_FILEVER = getProp(casePfx + "tbl.cms.filever",
"//div[@id='center']/div/div/table");
+ public final String TBL_CMS_FILE = getProp(casePfx + "tbl.cms.file",
"//div[@id='center']/div/div/div[3]/table");
+ public final String TBL_FILE_PENDING = getProp(casePfx + "tbl.file.pending",
"//div[@id='center']/div/div/table[2]");
+
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
- }
-
- @AfterMethod( groups = { "log" })
+ }
+
+ @AfterMethod(groups = { "log" })
public void logoutAfterTest() {
-
+
}
-
+
+ /**
+ * Common file structure browsing test. Simple clicking on default CMS
+ * structure of directories and files, asserting that elements are on right
+ * places.
+ */
@Test(enabled = true, description = "Common file structure browsing test.")
public void testDefaultBrowsing() {
selenium.click("link=Admin");
@@ -44,7 +53,7 @@
Assert.assertTrue(selenium.isElementPresent("link=private"));
Assert.assertTrue(selenium.isElementPresent("link=index.html"));
Assert.assertTrue(selenium.isElementPresent("link=project.html"));
- //Assert.assertTrue(selenium.isElementPresent("link=support.html"));
+ // Assert.assertTrue(selenium.isElementPresent("link=support.html"));
selenium.click("link=index.html");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=text/html"));
@@ -59,6 +68,9 @@
Assert.assertTrue(selenium.isElementPresent("link=jbosslogo.png"));
}
+ /**
+ * File properties checking. Clicking on index.html file and asserting that its
properties (language, type, size, ...) are in default state.
+ */
@Test(enabled = true, description = "File properties checking.")
public void testFileProperties() {
selenium.click("link=Admin");
@@ -67,14 +79,12 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.open("/portal/auth/portal/admin/CMS/CMSAdminPortletWindow?op=main&action=2&path=%2F");
+ //selenium.open("/portal/auth/portal/admin/CMS/CMSAdminPortletWindow?op=main&action=2&path=%2F");
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=index.html");
selenium.waitForPageToLoad(PAGE_LOAD);
-
-
-
+
Assert.assertEquals("text/html",
selenium.getText("link=text/html"));
Assert.assertEquals("English", selenium.getText("link=English"));
Assert.assertEquals("Type",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[3]/td[1]/b"));
@@ -99,6 +109,27 @@
}
+ /**
+ * Simple file creation. File named "newFile" is created in the root directory
of CMS module with main action selector.
+ * Attributes of the created file:
+ * <table>
+ * <tr>
+ * <td>filename</td><td>newFile</td>
+ * </tr>
+ * <tr>
+ * <td>description</td><td>newFile description</td>
+ * </tr>
+ * <tr>
+ * <td>title</td><td>newFile title</td>
+ * </tr>
+ * <tr>
+ * <td>language</td><td>Czech</td>
+ * </tr>
+ * </table>
+ *
+ * After the creation, the properties of the file are asserted to be the same as in the
table above.
+ *
+ */
@Test(enabled = true, description = "Simple file creation.")
public void testCreateFile() {
selenium.click("link=Admin");
@@ -115,28 +146,32 @@
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
/*
- Assert.assertTrue(selenium.isElementPresent(TBL_FILE_PENDING));
- Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "text/plain", 0) >= 0);
- Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "0kb", 1) >= 0);
- //Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "admin", 3) >=
0);
-
- selenium.click("link=Approve");
- selenium.waitForPageToLoad(PAGE_LOAD);
- */
-
+ * Assert.assertTrue(selenium.isElementPresent(TBL_FILE_PENDING));
+ * Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "text/plain", 0) >=
+ * 0); Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "0kb", 1) >= 0);
+ * //Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "admin", 3)
+ * >= 0);
+ *
+ * selenium.click("link=Approve");
+ * selenium.waitForPageToLoad(PAGE_LOAD);
+ */
+
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "text/plain", 0)>=0);
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "0kb", 1)>=0);
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "1.0", 2)>=0);
- Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "newFile title", 5)>=0);
-
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "text/plain", 0) >= 0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "0kb", 1) >= 0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "1.0", 2) >= 0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "newFile title", 5) >=
0);
+
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("newFile", selenium.getText("link=newFile"));
}
-
- @Test(enabled = true, description = "Editing of file.")
+
+ /**
+ * Editing of a file.
+ */
+ @Test(enabled = true, description = "Editing of a file.")
public void testEditFile() {
selenium.click("link=Admin");
@@ -152,30 +187,32 @@
selenium.select("language", "label=Czech");
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- int row = findTableRow(TBL_CMS_FILEVER, "1.0", 2)+1;
-
+
+ int row = findTableRow(TBL_CMS_FILEVER, "1.0", 2) + 1;
+
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
Assert.assertEquals("text/plain",
selenium.getText("link=text/plain"));
- Assert.assertEquals("1.0",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr["+ row
+"]/td[3]"));
- Assert.assertEquals("0kb",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr["+ row
+"]/td[2]"));
- Assert.assertEquals("file2edit title",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr["+ row
+"]/td[6]"));
-
+ Assert.assertEquals("1.0",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[" + row +
"]/td[3]"));
+ Assert.assertEquals("0kb",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[" + row +
"]/td[2]"));
+ Assert.assertEquals("file2edit title",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[" + row +
"]/td[6]"));
+
selenium.click("link=text/plain");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("1.1"));
Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/table/tbody/tr[5]/td[3]/img"));
-
-
+
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("file2edit",
selenium.getText("link=file2edit"));
}
- @Test(enabled = true, dependsOnMethods = "testDeleteFile", description =
"Creation of existing file.")
+ /**
+ * Creation of an existing file.
+ */
+ @Test(enabled = true, dependsOnMethods = "testDeleteFile", description =
"Creation of an existing file.")
public void testCreateExistingFile() {
String filename = "existingFile";
@@ -206,6 +243,9 @@
deleteFile(filename);
}
+ /**
+ * File creation and moving to default directory.
+ */
@Test(enabled = true, description = "File creation and moving to default
directory.")
public void testMoveFile() {
selenium.click("link=Admin");
@@ -229,27 +269,30 @@
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("fileToMove",
selenium.getText("link=fileToMove"));
-
- int row = findTableRow(TBL_CMS_FILE, "fileToMove", 0)+1;
-
- selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select",
"label=Move");
- selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select/option[3]");
- selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/input");
+
+ int row = findTableRow(TBL_CMS_FILE, "fileToMove", 0) + 1;
+
+ selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["
+ row + "]/td[2]/form/select", "label=Move");
+ selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr[" +
row + "]/td[2]/form/select/option[3]");
+ selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr[" +
row + "]/td[2]/form/input");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertTrue(selenium.isElementPresent("link=fileToMove"));
-
+
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertFalse(selenium.isElementPresent("link=fileToMove"));
}
-
+
+ /**
+ * File creation and copying to default directory.
+ */
@Test(enabled = true, description = "File creation and copying to default
directory.")
public void testCopyFile() {
selenium.click("link=Admin");
@@ -265,48 +308,57 @@
selenium.select("language", "label=Czech");
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- int row = findTableRow(TBL_CMS_FILEVER, "1.0", 2)+1;
-
+
+ int row = findTableRow(TBL_CMS_FILEVER, "1.0", 2) + 1;
+
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
Assert.assertEquals("text/plain",
selenium.getText("link=text/plain"));
- Assert.assertEquals("1.0",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr["+row+"]/td[3]"));
- Assert.assertEquals("0kb",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr["+row+"]/td[2]"));
- Assert.assertEquals("file2copy title",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr["+row+"]/td[6]"));
+ Assert.assertEquals("1.0",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[" + row +
"]/td[3]"));
+ Assert.assertEquals("0kb",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[" + row +
"]/td[2]"));
+ Assert.assertEquals("file2copy title",
selenium.getText("//div[@id='center']/div/div/table/tbody/tr[" + row +
"]/td[6]"));
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("file2copy",
selenium.getText("link=file2copy"));
-
- row = findTableRow(TBL_CMS_FILE, "file2copy", 0)+1;
-
- selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select",
"label=Copy");
- selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select/option[3]");
- selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/input");
+
+ row = findTableRow(TBL_CMS_FILE, "file2copy", 0) + 1;
+
+ selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["
+ row + "]/td[2]/form/select", "label=Copy");
+ selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr[" +
row + "]/td[2]/form/select/option[3]");
+ selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr[" +
row + "]/td[2]/form/input");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertTrue(selenium.isElementPresent("link=file2copy"));
-
+
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertTrue(selenium.isElementPresent("link=file2copy"));
}
+ /**
+ * Not implemented!
+ */
@Test(enabled = false, description = "Not implemented!")
public void testMoveOverwriteFile() {
}
+ /**
+ * Not implemented!
+ */
@Test(enabled = false, description = "Not implemented!")
public void testMoveNotOverwriteFile() {
}
+ /**
+ * Simple file delete.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateFile", description =
"Simple file delete.")
public void testDeleteFile() {
selenium.click("link=Admin");
@@ -335,6 +387,9 @@
selenium.waitForPageToLoad(PAGE_LOAD);
}
+ /**
+ * Not implemented!
+ */
@Test(enabled = false)
public void testDeleteCancelFile() {
@@ -363,7 +418,8 @@
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(name, selenium.getText("link=" + name));
- logout();login("admin","admin");
+ logout();
+ login("admin", "admin");
}
private void deleteFile(String name) {
@@ -382,6 +438,7 @@
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this
resource?"));
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
- logout();login("admin","admin");
+ logout();
+ login("admin", "admin");
}
}
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2009-04-06
11:41:15 UTC (rev 13163)
+++
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2009-04-06
13:03:58 UTC (rev 13164)
@@ -9,11 +9,14 @@
import org.testng.annotations.Test;
/**
+ * AdminPortalTestCase is responsible for testing fundamental portal admin features of
JBoss Portal.
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
+ *
*/
@Test(groups = { "admin_portal" }, enabled = true, description = "Partal
administrating.")
public class AdminPortalTestCase extends JBossPortalSeleniumTestCase {
+ /** prefix for locator properties = portal.admin.*/
public final String casePfx = "portal.admin.";
private final String LNK_PP_PROP_DELETE =
getProp(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
@@ -83,16 +86,24 @@
private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef",
"//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
@BeforeMethod(groups = { "log" })
- public void loginBeforeTest() {
+ protected void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
}
@AfterMethod(groups = { "log" })
- public void logoutAfterTest() {
+ protected void logoutAfterTest() {
}
- @Test(enabled = true)
+ /**
+ * Creates a new portal.
+ *
+ * Uses portal admin interface to create a new portal.
+ * TODO: the existence of new portal should be tested in a more stronger way. The test
only asserts the existence of portal name in the portals table
+ * and it asserts the existence of it's tool links, too.
+ */
+ //TODO: the existence of new portal should be tested in a more stronger way
+ @Test(enabled = true, description="Creates a new portal")
public void testPortalCreate() {
selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -121,7 +132,13 @@
Assert.assertTrue(selenium.isElementPresent(MessageFormat.format(POR_TL_THEME, r)));
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
+ /**
+ * Renames a portal. Firstly a portal name "TestRenPortal" is created the same
way as in {@link AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, rename link is used to rename the portal to
"AestPortal".
+ * At the end it checks that the former name of portal is not on the screen and the new
name is appearing when listing portals.
+ */
+ //TODO findintable should be used for final assertions
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate" },
description="Renames a portal")
public void testPortalRename() {
// first create a portal
@@ -149,7 +166,7 @@
final String portalToRename = "TestRenPortal";
Assert.assertTrue(selenium.isTextPresent(portalToRename));
final String portalRenamed = "AestPortal";
- Assert.assertFalse(selenium.isTextPresent(portalRenamed), "Not created page
already exist.");
+ Assert.assertFalse(selenium.isTextPresent(portalRenamed), "Not renamed page
already exist.");
int r = findTableRow(TABLE_PORTAL_ADMIN, portalToRename, 0) - 1;
@@ -164,7 +181,13 @@
Assert.assertTrue(selenium.isTextPresent(portalRenamed));
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
+ /**
+ * Deletes a portal. Firstly a portal name "TestDelete" is created the same
way as in {@link AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, delete link is used to delete the portal.
+ * At the end it checks that the former name of portal is not on the screen.
+ */
+ //TODO findintable should be used for final assertions
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate" },
description="Deletes a portal")
public void testPortalDelete() {
// first create a portal
@@ -214,7 +237,16 @@
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
+ /**
+ * Testing properties of portal. Firstly a portal name "TestProperties" is
created the same way as in {@link AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, properties link is used to delete the portal. Following
actions are then proceeded and their final states are asserted after logout/login:
+ * <ul>
+ * <li>change listener at first to release_sessions_listener_self and then to
user_listener.</li>
+ * <li>add two properties: viliamProp/hier! and danielProp/ohne! and then delete
viliamProp.</li>
+ * <li>change everything in Portal & Page Error Handling tables.</li>
+ * </ul>
+ */
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate" },
description="Testing properties of portal")
public void testPortalProperties() {
// first create a portal
@@ -275,6 +307,7 @@
selenium.type(MessageFormat.format(INP_PP_PROP_VAL,r), propVal1);
selenium.click(SUB_PP_PROPVAL_UPDATE);
selenium.waitForPageToLoad(PAGE_LOAD);
+
selenium.type(INP_PP_PROPNAME, propName2);
selenium.click(SUB_PP_PROPADD);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -403,7 +436,13 @@
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate" })
+ /**
+ * Adds a page to a portal. Firstly a portal name "TestAddPagePortal" is
created the same way as in {@link AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, main link (title of portal) is used to navigate to its own
tools. Form for creation of new page is then used
+ * to create page named "tToAddPage". At the end it checks that the name of pa
is is appearing in "TestAddPagePortal" portal pages list.
+ */
+ //TODO findintable should be used for final assertions
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate" },
description="Adds a page to a portal")
public void testAddPage() {
final String portalName = "TestAddPagePortal";
@@ -433,7 +472,14 @@
Assert.assertTrue(selenium.isTextPresent(portalPage));
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate",
"testAddPage" })
+ /**
+ * Removes a page from a portal. Firstly a portal name "TestRemovePagePortal"
is created the same way as in {@link AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, main link (title of portal) is used to navigate to its own
tools. Form for creation of new page is then used
+ * to create page named "tRemPage" the same way as in {@link
AdminPortalTestCase#testAddPage()}. The page is removed with the remove button
afterwards.
+ * At the end it checks that the name of page is not appearing in
"TestRemovePagePortal" portal pages list.
+ */
+ //TODO findintable should be used for final assertions
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate",
"testAddPage" }, description="Removes a page from a portal")
public void testRemovePage() {
final String portalName = "TestRemovePagePortal";
@@ -465,7 +511,14 @@
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate",
"testAddPage" })
+ /**
+ * Creates a "window" on a page. Firstly a portal name
"toAddWindowPortal" is created the same way as in {@link
AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, main link (title of portal) is used to navigate to its own
tools. Form for creation of new page is then used
+ * to create page named "windowContainer" the same way as in {@link
AdminPortalTestCase#testAddPage()}. The link "page layout" of
"testAddPage"
+ * page is then clicked to add a window to this page. "Who's online
portlet" is then added to windows called "myFancyWindow" on this page.
+ * Existence of text containing the name of window is asserted. At the page is loaded
and the existence of the added portlet is asserted.
+ */
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate",
"testAddPage" }, description="Creates a \"window\" on a
page")
public void testCreateWindow() {
final String portalName = "toAddWindowPortal";
@@ -515,7 +568,15 @@
}
- @Test(enabled = true, dependsOnMethods = { "testPortalCreate",
"testAddPage" })
+ /**
+ * Renames a page of a portal. Firstly a portal name "TestPortal" is created
the same way as in {@link AdminPortalTestCase#testPortalCreate()}.
+ * In portal admin interface, main link (title of portal) is used to navigate to its own
tools. Form for creation of new page is then used
+ * to create page named "PageToRename" the same way as in {@link
AdminPortalTestCase#testAddPage()}.
+ *
+ * The rename link on the page is then clicked. Most of the <b>TEST CODE IS
MISSING!</b>
+ */
+ //TODO MUST FINISH!
+ @Test(enabled = true, dependsOnMethods = { "testPortalCreate",
"testAddPage" }, description="Renames a page of a portal")
public void testPageRename() {
String portalName = "TestPortal";
String pageName = "PageToRename";
@@ -540,15 +601,27 @@
}
- @Test(enabled = false)
+ //TODO TEST CODE IS MISSING!
+ /**
+ * TEST CODE IS MISSING!
+ */
+ @Test(enabled = false, description="")
public void testPageSecurity() {
}
-
- @Test(enabled = false)
+
+ /**
+ * TEST CODE IS MISSING!
+ */
+ //TODO TEST CODE IS MISSING!
+ @Test(enabled = false, description="")
public void testPageTheme() {
}
- @Test(enabled = false)
+ /**
+ * TEST CODE IS MISSING!
+ */
+ //TODO TEST CODE IS MISSING!
+ @Test(enabled = false, description="")
public void testPageLayout() {
}