Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.0-master' into 3.0-master
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPerin committed Dec 2, 2014
2 parents 3027b99 + ff6eef0 commit 8e1fe7e
Show file tree
Hide file tree
Showing 124 changed files with 525 additions and 8 deletions.
33 changes: 26 additions & 7 deletions OpenFaces.ipr
Expand Up @@ -687,13 +687,14 @@
<inspection_tool class="PackageWithTooFewClasses" enabled="true" level="WARNING" enabled_by_default="true">
<option name="limit" value="3" />
</inspection_tool>
<inspection_tool class="ParametersPerConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ParametersPerConstructor" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_limit" value="5" />
</inspection_tool>
<inspection_tool class="ParametersPerMethod" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_limit" value="5" />
</inspection_tool>
<inspection_tool class="ProtectedInnerClass" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreEnums" value="false" />
<option name="ignoreInterfaces" value="false" />
</inspection_tool>
<inspection_tool class="PublicField" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreEnums" value="false" />
Expand All @@ -703,7 +704,10 @@
</inspection_tool>
<inspection_tool class="PublicStaticArrayField" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PublicStaticCollectionField" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreObjectConstruction" value="true" />
<option name="ignoreTypeCasts" value="false" />
</inspection_tool>
<inspection_tool class="RedundantFieldInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="RedundantImplements" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreSerializable" value="false" />
Expand Down Expand Up @@ -772,9 +776,6 @@
<inspection_tool class="UtilityClassWithPublicConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UtilityClassWithoutPrivateConstructor" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreClassesWithOnlyMain" value="false" />
<option name="ignorableAnnotations">
<value />
</option>
</inspection_tool>
<inspection_tool class="ZeroLengthArrayInitialization" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
Expand Down Expand Up @@ -1190,12 +1191,13 @@
<module fileurl="file://$PROJECT_DIR$/testApp/core/TestAppCore.iml" filepath="$PROJECT_DIR$/testApp/core/TestAppCore.iml" group="TestApp" />
<module fileurl="file://$PROJECT_DIR$/testApp/facelets/TestAppFacelets.iml" filepath="$PROJECT_DIR$/testApp/facelets/TestAppFacelets.iml" group="TestApp" />
<module fileurl="file://$PROJECT_DIR$/testApp/jsp/TestAppJsp.iml" filepath="$PROJECT_DIR$/testApp/jsp/TestAppJsp.iml" group="TestApp" />
<module fileurl="file://$PROJECT_DIR$/webDriverFuncTests/webDriverFuncTests.iml" filepath="$PROJECT_DIR$/webDriverFuncTests/webDriverFuncTests.iml" group="LiveDemo" />
</modules>
</component>
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK" />
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
Expand Down Expand Up @@ -1388,6 +1390,13 @@
<root url="jar://$PROJECT_DIR$/libsrc/richfaces-core-api-4.0.0.Final-sources.jar!/" />
</SOURCES>
</library>
<library name="selenide">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/selenium/selenide-2.14.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
<library name="selenium-java-client-driver">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/seleniuminspector/selenium-java-2.14.0.jar!/" />
Expand All @@ -1402,6 +1411,16 @@
<JAVADOC />
<SOURCES />
</library>
<library name="selenium-webDriver">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/selenium/selenium-java-2.44.0.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/selenium/selenium-server-standalone-2.44.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/selenium/src/selenium-java-2.44.0-srcs.jar!/" />
</SOURCES>
</library>
<library name="SeleniumInspector">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/seleniuminspector/selenium-inspector.jar!/" />
Expand Down
14 changes: 14 additions & 0 deletions OpenFacesWebDriverInspector/OpenFacesWebDriverInspector.iml
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="selenide" level="project" />
<orderEntry type="library" name="selenium-webDriver" level="project" />
</component>
</module>

127 changes: 127 additions & 0 deletions build.xml
Expand Up @@ -32,6 +32,10 @@
location="lib/seleniuminspector/selenium-server-standalone-2.14.0.jar"/>
<property name="funcTestsFrameworkManifest.file" location="${funcTestsFramework-target.dir}/manifest.mf"/>

<property name="webDriverFuncTests.dir" location="webDriverFuncTests"/>
<property name="webDriverFuncTests-source.dir" location="${webDriverFuncTests.dir}/source"/>
<property name="webDriverFuncTests-target.dir" location="${webDriverFuncTests.dir}/target"/>

<target name="init">
<tstamp/>
</target>
Expand Down Expand Up @@ -208,4 +212,127 @@
<antcall target="run-func-tests"/>
</target>

<target name="build-webdriver-test">
<delete dir="${webDriverFuncTests-target.dir}/classes"/>
<mkdir dir="${webDriverFuncTests-target.dir}/classes"/>
<javac source="1.7" srcdir="${webDriverFuncTests-source.dir}" fork="true"
destdir="${webDriverFuncTests-target.dir}/classes">
<classpath>
<pathelement path="${openfaces-jar.file}"/>
<pathelement path="testLib/junit.jar"/>
<pathelement path="lib/selenium/selenium-java-2.44.0.jar"/>
<pathelement path="lib/selenium/selenium-server-standalone-2.44.0.jar"/>
<pathelement path="lib/selenium/selenide-2.14.jar"/>
</classpath>
</javac>
</target>

<target name="run-webdriver-test" depends="build-webdriver-test">
<delete dir="${webDriverFuncTests-target.dir}/report"/>
<mkdir dir="${webDriverFuncTests-target.dir}/report"/>
<mkdir dir="${webDriverFuncTests-target.dir}/report/xml"/>
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement path="${openfaces-jar.file}"/>
<pathelement path="${webDriverFuncTests-target.dir}/classes"/>
<pathelement path="testLib/junit.jar"/>
<pathelement path="lib/selenium/selenium-java-2.44.0.jar"/>
<pathelement path="lib/selenium/selenium-server-standalone-2.44.0.jar"/>
</classpath>

<formatter type="xml"/>
<formatter usefile="false" type="plain"/>
<!--<test name="org.openfaces.test.KickOffTest" todir="${webDriverFuncTests-target.dir}/report/xml"/>-->
<batchtest todir="${webDriverFuncTests-target.dir}/report/xml">
<formatter type="xml"/>
<fileset dir="${webDriverFuncTests-source.dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="${webDriverFuncTests-target.dir}/report">
<fileset dir="${webDriverFuncTests-target.dir}/report/xml">
<include name="TEST*.xml"/>
</fileset>
<report format="frames" todir="${webDriverFuncTests-target.dir}/report/html"/>
</junitreport>
</target>


<!--Have to change this to your local Tomcat installation-->
<property name="tomcat.home" value="D:\tomcat7"/>

<target name="server-start">
<java classname="org.apache.catalina.startup.Bootstrap" fork="true" spawn="true">
<classpath path="${tomcat.home}/bin/bootstrap.jar:${tomcat.home}/bin/tomcat-juli.jar"/>
<jvmarg value="-Dcatalina.home=${tomcat.home}"/>
</java>
</target>

<target name="server-stop">
<java classname="org.apache.catalina.startup.Bootstrap" fork="true">
<classpath path="${tomcat.home}/bin/bootstrap.jar:${tomcat.home}/bin/tomcat-juli.jar"/>
<jvmarg value="-Dcatalina.home=${tomcat.home}"/>
<arg line="stop"/>
</java>
</target>


<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask">
<classpath>
<pathelement location="${tomcat.home}/lib/catalina-ant.jar"/>
<pathelement location="${tomcat.home}/lib/tomcat-coyote.jar"/>
<pathelement location="${tomcat.home}/lib/tomcat-util.jar"/>
</classpath>
</taskdef>

<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask">
<classpath>
<pathelement location="${tomcat.home}/lib/catalina-ant.jar"/>
</classpath>
</taskdef>


<property name="build-directory" value="liveDemo/facelets/target"/>
<property name="war-file-name" value="openfaces-demo-facelets.war"/>

<!--It deploys using "hot deploy". Anyway, it does not work as expected. So, commit it, I'd better copy war and start Tomcat.-->
<!--<target name="undeploy" description="undeploy from tomcat">-->
<!--<undeploy-->
<!--failonerror="no"-->
<!--url="${tomcat-manager-url}"-->
<!--path="/${project-name}"-->
<!--/>-->
<!--</target>-->

<!--<target name="deploy" description="deploy to tomcat">-->
<!--<echo>deploying from client</echo>-->
<!--<deploy-->
<!--username="${tomcat-manager-login}"-->
<!--password="${tomcat-manager-password}"-->
<!--url="${tomcat-manager-url}"-->
<!--path="/${project-name}"-->
<!--war="file:${build-directory}/${war-file-name}"-->
<!-->-->
<!--</deploy>-->
<!--</target>-->

<target name="deploy-demo-facelets" description="deploy Live Demo Facelets to tomcat">
<echo>Copy live demo facelets on Tomcat</echo>
<delete file="${tomcat.home}/webapps/${war-file-name}"/>
<copy todir="${tomcat.home}/webapps/" file="${build-directory}/${war-file-name}">
</copy>
</target>


<target name="run-demo-facelets-tests" depends="build">
<ant target="server-stop"/>
<sleep seconds="10"/>
<ant target="deploy-demo-facelets"/>
<ant target="server-start"/>
<sleep seconds="30"/>
<ant target="run-webdriver-test"/>
<ant target="server-stop"/>
</target>

</project>
Binary file added lib/selenium/selenide-2.14.jar
Binary file not shown.
Binary file added lib/selenium/selenium-java-2.44.0.jar
Binary file not shown.
Binary file not shown.
Binary file added lib/selenium/src/selenium-java-2.44.0-srcs.jar
Binary file not shown.
Expand Up @@ -737,7 +737,7 @@ public void setHiddenColumns(Iterable<String> hiddenColumns) {
}

public Iterable<String> getHiddenColumns() {
return ValueBindings.get(this, "hiddenColumn", hiddenColumns, Iterable.class);
return ValueBindings.get(this, "hiddenColumns", hiddenColumns, Iterable.class);
}

public void setColumnsOrder(Iterable<String> columnsOrder) {
Expand Down
89 changes: 89 additions & 0 deletions webDriverFuncTests/source/org/openfaces/test/AjaxTest.java
@@ -0,0 +1,89 @@
/*
* OpenFaces - JSF Component Library 3.0
* Copyright (C) 2007-2014, TeamDev Ltd.
* licensing@openfaces.org
* Unless agreed in writing the contents of this file are subject to
* the GNU Lesser General Public License Version 2.1 (the "LGPL" License).
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* Please visit http://openfaces.org/licensing/ for more details.
*/
package org.openfaces.test;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.openfaces.test.componentInspector.Element;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.server.SeleniumServer;

import static com.codeborne.selenide.Selenide.*;
import static com.codeborne.selenide.Condition.*;
import static com.codeborne.selenide.Selenide.open;
import static com.thoughtworks.selenium.SeleneseTestBase.*;

import java.util.List;

/**
* @author Tatyana Matveyeva
*/
public class AjaxTest extends WebDriverSeleniumTestCase {
private DefaultSelenium localhost;
private SeleniumServer seleniumServer;
private WebDriver driver;

@Before
public void setUp() throws Exception {
// localhost = new DefaultSelenium("localhost", 4444, "*chrome", "http://openfaces.org.test");
seleniumServer = new SeleniumServer();
seleniumServer.start();
driver = new FirefoxDriver();
// localhost.start();
}

@After
public void tearDown() throws Exception {
seleniumServer.stop();
}


//All DataTable features, that use Ajax is Tested on the demo (DataTable_general.jsf)
@Test
public void testFoldingPanelAjax() throws Exception {
open("/components/foldingpanel/foldingPanelAjax.jsf");
assertFalse(element("form1:Output").isElementInPage());
foldingPanel("form1:fp1").toggle();
assertTrue(element("form1:output1").isElementInPage());
assertTrue(element("form1:input1").isElementInPage());

}

@Test
public void testTabbedPaneAjax() throws Exception {
open("/components/tabbedpane/tabbedPaneAjax.jsf");
Element tab1Output = element("form1:tab1Output");
assertTrue(tab1Output.isElementInPage());
Element tab2Output = element("form1:tab2Output");
assertFalse(tab2Output.isElementInPage());
Element tab3Output = element("form1:tab3Output");
assertFalse(tab3Output.isElementInPage());
Element tab4Output = element("form1:tab4Output");
assertFalse(tab4Output.isElementInPage());
List<Element> tabs = tabbedPane("form1:tp1").tabSet().getTabs();
/* tabs.get(1).clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
tab2Output.assertElementExists(true);
tabs.get(2).clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
tab3Output.assertElementExists(true);
tabs.get(3).clickAndWait(OpenFacesAjaxLoadingMode.getInstance());
tab4Output.assertElementExists(true);
tabs.get(0).click();
tab1Output.assertElementExists(true);*/
}


}
49 changes: 49 additions & 0 deletions webDriverFuncTests/source/org/openfaces/test/KickOffTest.java
@@ -0,0 +1,49 @@
/*
* OpenFaces - JSF Component Library 3.0
* Copyright (C) 2007-2014, TeamDev Ltd.
* licensing@openfaces.org
* Unless agreed in writing the contents of this file are subject to
* the GNU Lesser General Public License Version 2.1 (the "LGPL" License).
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* Please visit http://openfaces.org/licensing/ for more details.
*/

package org.openfaces.test;

import com.thoughtworks.selenium.DefaultSelenium;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.server.SeleniumServer;

/**
* Author: Andrew.Palval@teamdev.com
*/
public class KickOffTest extends WebDriverSeleniumTestCase {

private DefaultSelenium localhost;
private SeleniumServer seleniumServer;

@Before
public void setUp() throws Exception {
// localhost = new DefaultSelenium("localhost", 4444, "*chrome", "http://openfaces.org.test");
seleniumServer = new SeleniumServer();
seleniumServer.start();
// localhost.start();
}

@After
public void tearDown() throws Exception {
seleniumServer.stop();
}

@Test
public void testAvailability() {
driver = new FirefoxDriver();
driver.get("http://localhost:8080/overview/homepage.jsf");
}
}

0 comments on commit 8e1fe7e

Please sign in to comment.