Permalink
Browse files

FACES-2968 Allow showcase tests to be run from their respective repos

  • Loading branch information...
1 parent d3b8996 commit d9f65a647dc05c2e9b7f31f9e201aa11f1d5b2c9 @stiemannkj1 stiemannkj1 committed Nov 30, 2016
@@ -13,21 +13,8 @@
<name>Alloy Showcase Webapp</name>
<description>This plugin is the Liferay Faces Alloy Showcase demo webapp.</description>
- <!--
- When running tests from an IDE (like eclipse), you may need to set certain system properties:
-
- -Dintegration.context=/com.liferay.faces.demo.alloy.showcase.webapp/web/guest/showcase/-/component
- -Dintegration.default.component.prefix=alloy
-
- Setting system properties in Eclipse:
- http://stackoverflow.com/questions/862391/how-to-pass-the-d-system-properties-while-testing-on-eclipse
- Setting systen properties in IntelliJ:
- http://stackoverflow.com/questions/29454494/set-java-system-properties-in-intellij-or-eclipse
- It is not necessary to set system properties in Netbeans since Netbeans automatically uses Maven properties
- correctly.
- -->
<properties>
- <integration.context>/com.liferay.faces.demo.alloy.showcase.webapp/web/guest/showcase/-/component</integration.context>
+ <liferay.faces.showcase.war.scope>compile</liferay.faces.showcase.war.scope>
</properties>
<profiles>
@@ -41,65 +28,97 @@
</dependencies>
</profile>
<profile>
- <id>integration</id>
+ <id>selenium</id>
+ <properties>
+ <!-- Skip war overlay when testing. -->
+ <liferay.faces.showcase.war.scope>provided</liferay.faces.showcase.war.scope>
+ </properties>
<build>
<plugins>
+ <!-- Ensure that the png resource is in the temporary directory for testing. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>selenium-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <copy file="src/test/resources/liferay-jsf-jersey.png" todir="${java.io.tmpdir}" />
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
+ <artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
- <configuration>
- <systemPropertyVariables>
- <RUNNING_WITH_MAVEN_SUREFIRE_PLUGIN>true</RUNNING_WITH_MAVEN_SUREFIRE_PLUGIN>
- <!-- Specify a property like so: -Dintegration.browser=phantomjs -->
- <integration.browser>${integration.browser}</integration.browser>
- <integration.browser.wait.time.out>${integration.browser.wait.time.out}</integration.browser.wait.time.out>
- <integration.log.level>${integration.log.level}</integration.log.level>
- <integration.container>${integration.container}</integration.container>
- <integration.host>${integration.host}</integration.host>
- <integration.port>${integration.port}</integration.port>
- <integration.context>${integration.context}</integration.context>
- <integration.default.component.prefix>alloy</integration.default.component.prefix>
- <integration.sign.in.context>${integration.sign.in.context}</integration.sign.in.context>
- <integration.login.xpath>${integration.login.xpath}</integration.login.xpath>
- <integration.password.xpath>${integration.password.xpath}</integration.password.xpath>
- <integration.sign.in.button.xpath>${integration.sign.in.button.xpath}</integration.sign.in.button.xpath>
- <integration.login>${integration.login}</integration.login>
- <integration.password>${integration.password}</integration.password>
- </systemPropertyVariables>
- <properties>
- <property>
- <name>listener</name>
- <value>com.liferay.faces.test.selenium.IntegrationTestSuiteListener</value>
- </property>
- </properties>
- <includes>
- <include>**/*Test.java,**/Test*.java,**/*TestCase.java,**/*Tester.java</include>
- </includes>
- <trimStackTrace>false</trimStackTrace>
- <dependenciesToScan>
- <dependency>com.liferay.faces.demo:com.liferay.faces.demo.jsf.showcase.webapp</dependency>
- </dependenciesToScan>
- </configuration>
+ <executions>
+ <execution>
+ <id>selenium-tests</id>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <systemPropertyVariables>
+ <RUNNING_WITH_MAVEN>true</RUNNING_WITH_MAVEN>
+ <!-- Specify a property like so: -Dintegration.browser=phantomjs -->
+ <!--
+ When running tests from an IDE (like eclipse), you may need to set certain system
+ properties:
+
+ -Dintegration.context=/com.liferay.faces.demo.alloy.showcase.webapp/web/guest/showcase/-/component
+ -Dintegration.default.component.prefix=alloy
+
+ Setting system properties in Eclipse:
+ http://stackoverflow.com/questions/862391/how-to-pass-the-d-system-properties-while-testing-on-eclipse
+ Setting systen properties in IntelliJ:
+ http://stackoverflow.com/questions/29454494/set-java-system-properties-in-intellij-or-eclipse
+ It is not necessary to set system properties in Netbeans since Netbeans
+ automatically uses Maven properties correctly.
+ -->
+ <integration.browser>${integration.browser}</integration.browser>
+ <integration.browser.wait.time.out>${integration.browser.wait.time.out}</integration.browser.wait.time.out>
+ <integration.log.level>${integration.log.level}</integration.log.level>
+ <integration.host>${integration.host}</integration.host>
+ <integration.port>${integration.port}</integration.port>
+ <integration.showcase.context>/com.liferay.faces.demo.alloy.showcase.webapp/web/guest/showcase/-/component</integration.showcase.context>
+ <integration.default.component.prefix>alloy</integration.default.component.prefix>
+ <integration.sign.in.context>${integration.sign.in.context}</integration.sign.in.context>
+ <integration.login.xpath>${integration.login.xpath}</integration.login.xpath>
+ <integration.password.xpath>${integration.password.xpath}</integration.password.xpath>
+ <integration.sign.in.button.xpath>${integration.sign.in.button.xpath}</integration.sign.in.button.xpath>
+ <integration.login>${integration.login}</integration.login>
+ <integration.password>${integration.password}</integration.password>
+ </systemPropertyVariables>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>com.liferay.faces.test.selenium.IntegrationTestSuiteListener</value>
+ </property>
+ </properties>
+ <includes>
+ <include>**/*Test.java,**/Test*.java,**/*TestCase.java,**/*Tester.java</include>
+ </includes>
+ <trimStackTrace>false</trimStackTrace>
+ <dependenciesToScan>
+ <dependency>com.liferay.faces.demo:com.liferay.faces.demo.jsf.showcase.webapp</dependency>
+ </dependenciesToScan>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
- <id>liferay</id>
- <properties>
- <integration.container>liferay</integration.container>
- <integration.context>/web/guest/alloy-showcase/-/alloy-tag</integration.context>
- </properties>
- </profile>
- <profile>
- <id>pluto</id>
- <properties>
- <integration.container>pluto</integration.container>
- <integration.context>/pluto/portal/alloy-showcase</integration.context>
- </properties>
- </profile>
- <profile>
<id>phantomjs</id>
<properties>
<integration.browser>phantomjs</integration.browser>
@@ -122,6 +141,18 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>false</skip>
@@ -201,6 +232,7 @@
<artifactId>com.liferay.faces.demo.jsf.showcase.webapp</artifactId>
<version>${liferay.faces.showcase.version}</version>
<type>war</type>
+ <scope>${liferay.faces.showcase.war.scope}</scope>
</dependency>
<dependency>
<groupId>com.liferay.faces.demo</groupId>
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2000-2016 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * 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. See the GNU Lesser General Public License for more
+ * details.
+ */
+package com.liferay.faces.test.alloy.showcase.accordion;
+
+import com.liferay.faces.test.showcase.TesterBase;
+import org.junit.Assume;
+import org.junit.Test;
+
+/**
+ * @author Kyle Stiemann
+ */
+public class AccordionGeneralTester extends TesterBase {
+
+ @Test
+ public void runAccordionGeneralTest() {
+
+ // TODO
+ Assume.assumeTrue(false);
+ }
+}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9f65a6

Please sign in to comment.