You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2018/11/29 14:02:53 UTC

[myfaces] branch master updated: added some initial integration tests

This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 510fcef  added some initial integration tests
510fcef is described below

commit 510fcef8c655edac98bc06e71232f6338bf4e19a
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu Nov 29 15:02:59 2018 +0100

    added some initial integration tests
---
 integration-tests/exactMapping/pom.xml             |  36 ++++
 .../core/integrationtests/IntegrationTestBean.java |  50 ++++++
 .../exactMapping/src/main/webapp/WEB-INF/beans.xml |  25 +++
 .../exactMapping/src/main/webapp/WEB-INF/web.xml   |  66 +++++++
 .../exactMapping/src/main/webapp/bar.xhtml         |  42 +++++
 .../exactMapping/src/main/webapp/foo.xhtml         |  47 +++++
 .../core/integrationtests/IntegrationTest.java     | 176 +++++++++++++++++++
 .../exactMapping/src/test/resources/arquillian.xml |  37 ++++
 integration-tests/faceletToXhtmlMapping/pom.xml    |  35 ++++
 .../src/main/webapp/WEB-INF/beans.xml              |  25 +++
 .../src/main/webapp/WEB-INF/web.xml                |  44 +++++
 .../src/main/webapp/index.xhtml                    |  39 +++++
 .../src/main/webapp/plainHtml.xhtml                |  27 +++
 .../core/integrationtests/IntegrationTest.java     |  89 ++++++++++
 .../src/test/resources/arquillian.xml              |  37 ++++
 .../faceletToXhtmlMappingDisabled/pom.xml          |  36 ++++
 .../src/main/webapp/WEB-INF/beans.xml              |  25 +++
 .../src/main/webapp/WEB-INF/web.xml                |  64 +++++++
 .../src/main/webapp/index.xhtml                    |  39 +++++
 .../core/integrationtests/IntegrationTest.java     |  98 +++++++++++
 .../src/test/resources/arquillian.xml              |  37 ++++
 integration-tests/pom.xml                          | 191 +++++++++++++++++++++
 22 files changed, 1265 insertions(+)

diff --git a/integration-tests/exactMapping/pom.xml b/integration-tests/exactMapping/pom.xml
new file mode 100644
index 0000000..530a42c
--- /dev/null
+++ b/integration-tests/exactMapping/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.myfaces.core</groupId>
+        <artifactId>myfaces-integration-tests</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.myfaces.core.integration-tests</groupId>
+    <artifactId>exactMapping</artifactId>
+    <name>Apache MyFaces Core 3.0 - Integration Tests - exactMapping</name>
+    <packaging>war</packaging>
+
+</project>
diff --git a/integration-tests/exactMapping/src/main/java/org/apache/myfaces/core/integrationtests/IntegrationTestBean.java b/integration-tests/exactMapping/src/main/java/org/apache/myfaces/core/integrationtests/IntegrationTestBean.java
new file mode 100644
index 0000000..8b54c2e
--- /dev/null
+++ b/integration-tests/exactMapping/src/main/java/org/apache/myfaces/core/integrationtests/IntegrationTestBean.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.core.integrationtests;
+
+import static javax.faces.annotation.FacesConfig.Version.JSF_2_3;
+
+import javax.enterprise.context.RequestScoped;
+import javax.faces.annotation.FacesConfig;
+import javax.faces.context.FacesContext;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+@FacesConfig(version = JSF_2_3)
+@Named
+@RequestScoped
+public class IntegrationTestBean
+{
+    private String message;
+
+    public void foo()
+    {
+        message = "foo invoked";
+    }
+
+    public void fooAjax()
+    {
+        message = "fooAjax invoked";
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+}
diff --git a/integration-tests/exactMapping/src/main/webapp/WEB-INF/beans.xml b/integration-tests/exactMapping/src/main/webapp/WEB-INF/beans.xml
new file mode 100644
index 0000000..9bcebd8
--- /dev/null
+++ b/integration-tests/exactMapping/src/main/webapp/WEB-INF/beans.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+       version="1.2" bean-discovery-mode="all">
+
+</beans>
\ No newline at end of file
diff --git a/integration-tests/exactMapping/src/main/webapp/WEB-INF/web.xml b/integration-tests/exactMapping/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..773e65a
--- /dev/null
+++ b/integration-tests/exactMapping/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+         version="3.1">
+
+    <context-param>
+        <param-name>javax.faces.DISABLE_FACESSERVLET_TO_XHTML</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>javax.faces.PROJECT_STAGE</param-name>
+        <param-value>Production</param-value>
+    </context-param>
+    <context-param>
+        <param-name>org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS</param-name>
+        <param-value>false</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+    </listener>
+    <listener>
+        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.jsf</url-pattern>
+        <url-pattern>/faces/*</url-pattern>
+
+        <url-pattern>/foo</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>faces/index.xhtml</welcome-file>
+    </welcome-file-list>
+
+    <session-config>
+        <tracking-mode>COOKIE</tracking-mode>
+    </session-config>
+</web-app>
diff --git a/integration-tests/exactMapping/src/main/webapp/bar.xhtml b/integration-tests/exactMapping/src/main/webapp/bar.xhtml
new file mode 100644
index 0000000..fef1a12
--- /dev/null
+++ b/integration-tests/exactMapping/src/main/webapp/bar.xhtml
@@ -0,0 +1,42 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://xmlns.jcp.org/jsf/html"
+      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
+      xmlns:f="http://xmlns.jcp.org/jsf/core"
+      xmlns:jsf="http://xmlns.jcp.org/jsf"
+      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <h:head>
+        <title>test</title>
+    </h:head>
+
+    <h:body>
+        bar-view<br/>
+
+        #{integrationTestBean.message}
+
+        <h:form id="form">
+            <h:commandButton id="commandButton" action="#{integrationTestBean.foo()}" value="foo" />
+        </h:form>
+
+    </h:body>
+</html>
+
diff --git a/integration-tests/exactMapping/src/main/webapp/foo.xhtml b/integration-tests/exactMapping/src/main/webapp/foo.xhtml
new file mode 100644
index 0000000..c00c55e
--- /dev/null
+++ b/integration-tests/exactMapping/src/main/webapp/foo.xhtml
@@ -0,0 +1,47 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://xmlns.jcp.org/jsf/html"
+      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
+      xmlns:f="http://xmlns.jcp.org/jsf/core"
+      xmlns:jsf="http://xmlns.jcp.org/jsf"
+      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <h:head>
+        <title>test</title>
+    </h:head>
+
+    <h:body>
+        foo-view <br/>
+
+        <h:form id="form">
+            #{integrationTestBean.message} <br/>
+
+            <h:commandButton id="commandButton" action="#{integrationTestBean.foo}" value="invoke foo"/> <br/>
+
+            <h:button id="button" outcome="bar">bar</h:button> <br/>
+
+            <h:commandButton id="commandButtonAjax" action="#{integrationTestBean.fooAjax}" value="invoke fooAjax">
+                <f:ajax render="@form" />
+            </h:commandButton>
+        </h:form>
+    </h:body>
+
+</html>
diff --git a/integration-tests/exactMapping/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java b/integration-tests/exactMapping/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java
new file mode 100644
index 0000000..083a44d
--- /dev/null
+++ b/integration-tests/exactMapping/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.core.integrationtests;
+
+import java.io.File;
+import java.net.URL;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.drone.api.annotation.Drone;
+import org.jboss.arquillian.graphene.Graphene;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.embedded.EmbeddedMaven;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openqa.selenium.By;
+import org.openqa.selenium.Dimension;
+import org.openqa.selenium.WebDriver;
+
+@RunWith(Arquillian.class)
+@RunAsClient
+public class IntegrationTest
+{
+    @Deployment(testable = false)
+    public static WebArchive createDeployment()
+    {
+        WebArchive webArchive = (WebArchive) EmbeddedMaven.forProject(new File("pom.xml"))
+                .useMaven3Version("3.3.9")
+                .setGoals("package")
+                .setQuiet()
+                .skipTests(true)
+                .ignoreFailure()
+                .build().getDefaultBuiltArchive();
+
+        return webArchive;
+    }
+
+    @Drone
+    protected WebDriver webDriver;
+
+    @ArquillianResource
+    protected URL contextPath;
+
+    @Before
+    public void before()
+    {
+    }
+
+    @After
+    public void after()
+    {
+        webDriver.manage().deleteAllCookies();
+    }
+
+    @Test
+    public void test()
+    {
+        webDriver.get(contextPath + "foo");
+
+        // check if we are on foo.xhtml
+        Assert.assertTrue(webDriver.getPageSource().contains("foo-view"));
+    }
+
+    @Test
+    public void testNonExactMapping()
+    {
+        webDriver.get(contextPath + "foo.jsf");
+
+        // check if we are on foo.jsf
+        Assert.assertTrue(webDriver.getPageSource().contains("foo-view"));
+    }
+
+    @Test
+    public void testPostBack()
+    {
+        webDriver.get(contextPath + "foo");
+
+        // remember url
+        String url = webDriver.getCurrentUrl();
+
+        // post to foo.xhtml
+        Graphene.guardHttp(webDriver.findElement(By.id("form:commandButton"))).click();
+
+        // check if method was invoked
+        Assert.assertTrue(webDriver.getPageSource().contains("foo invoked"));
+        
+        // check that the exact mapping is still used after post
+        Assert.assertTrue(webDriver.getCurrentUrl().equals(url));
+    }
+
+    @Test
+    public void testLinkToNonExactMapping()
+    {
+        webDriver.get(contextPath + "foo");
+
+        // check if we are on foo.xhtml
+        Assert.assertTrue(webDriver.getPageSource().contains("foo-view"));
+
+        // navigate to bar.xhtml
+        Graphene.guardHttp(webDriver.findElement(By.id("form:button"))).click();
+
+        // check if we are on bar.xhtml
+        Assert.assertTrue(webDriver.getPageSource().contains("bar-view"));
+
+        // check if it's a JSF view with ViewState
+        Assert.assertTrue(webDriver.getPageSource().contains("ViewState"));
+
+        // check if bar.xml is served as non-exact-mapping
+        Assert.assertTrue(webDriver.getCurrentUrl().endsWith("/bar.jsf")
+                || webDriver.getCurrentUrl().endsWith("/faces/bar")
+                || webDriver.getCurrentUrl().endsWith("/faces/bar.xhtml"));
+    }
+    
+    @Test
+    public void testPostBackOnNonExactMapping()
+    {
+        webDriver.get(contextPath + "foo");
+
+        // nagivate to non-exact-mapping (bar.xhtml)
+        Graphene.guardHttp(webDriver.findElement(By.id("form:button"))).click();
+
+        // post to bar.xhtml
+        Graphene.guardHttp(webDriver.findElement(By.id("form:commandButton"))).click();
+
+        // check if post was successful
+        Assert.assertTrue(webDriver.getPageSource().contains("foo invoked"));
+        
+        // check if we are on bar.xhtml
+        Assert.assertTrue(webDriver.getCurrentUrl().endsWith("/bar.jsf")
+                || webDriver.getCurrentUrl().endsWith("/faces/bar")
+                || webDriver.getCurrentUrl().endsWith("/faces/bar.xhtml"));
+    }
+    
+    @Test
+    public void testResourceReference()
+    {
+        webDriver.get(contextPath + "foo");
+
+        // check if resources are loaded via non-exact-mapping
+        Assert.assertTrue(webDriver.getPageSource().contains("javax.faces.resource/jsf.js.jsf")
+                || webDriver.getPageSource().contains("javax.faces.resource/faces/jsf.js")
+                || webDriver.getPageSource().contains("faces/javax.faces.resource/jsf.js"));
+    }
+    
+    @Test
+    public void testAjaxPostBack()
+    {
+        webDriver.get(contextPath + "foo");
+
+        // call ajax button
+        Graphene.guardAjax(webDriver.findElement(By.id("form:commandButtonAjax"))).click();
+
+        // check if the button was invoked
+        Assert.assertTrue(webDriver.getPageSource().contains("fooAjax invoked"));
+    }
+}
diff --git a/integration-tests/exactMapping/src/test/resources/arquillian.xml b/integration-tests/exactMapping/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..df569d2
--- /dev/null
+++ b/integration-tests/exactMapping/src/test/resources/arquillian.xml
@@ -0,0 +1,37 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<arquillian
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"
+    xmlns="http://jboss.org/schema/arquillian">
+
+    <extension qualifier="webdriver">
+        <property name="browser">chrome</property>
+    </extension>
+
+    <container qualifier="tomcat" default="true">
+        <configuration>
+            <property name="tomcatHome">target/tomcat-embedded-8</property>
+            <property name="workDir">work</property>
+            <property name="bindHttpPort">8888</property>
+            <property name="unpackArchive">true</property>
+            <property name="serverName">arquillian-tomcat-embedded-8</property>
+        </configuration>
+    </container>
+</arquillian>
diff --git a/integration-tests/faceletToXhtmlMapping/pom.xml b/integration-tests/faceletToXhtmlMapping/pom.xml
new file mode 100644
index 0000000..8c63cd8
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.myfaces.core</groupId>
+        <artifactId>myfaces-integration-tests</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.myfaces.core.integration-tests</groupId>
+    <artifactId>faceletToXhtmlMapping</artifactId>
+    <name>Apache MyFaces Core 3.0 - Integration Tests - faceletToXhtmlMapping</name>
+    <packaging>war</packaging>
+
+</project>
diff --git a/integration-tests/faceletToXhtmlMapping/src/main/webapp/WEB-INF/beans.xml b/integration-tests/faceletToXhtmlMapping/src/main/webapp/WEB-INF/beans.xml
new file mode 100644
index 0000000..9bcebd8
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/src/main/webapp/WEB-INF/beans.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+       version="1.2" bean-discovery-mode="all">
+
+</beans>
\ No newline at end of file
diff --git a/integration-tests/faceletToXhtmlMapping/src/main/webapp/WEB-INF/web.xml b/integration-tests/faceletToXhtmlMapping/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..be03514
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+         version="3.1">
+
+    <context-param>
+        <param-name>javax.faces.PROJECT_STAGE</param-name>
+        <param-value>Production</param-value>
+    </context-param>
+    <context-param>
+        <param-name>org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS</param-name>
+        <param-value>false</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+    </listener>
+    <listener>
+        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+    </listener>
+
+    <session-config>
+        <tracking-mode>COOKIE</tracking-mode>
+    </session-config>
+</web-app>
diff --git a/integration-tests/faceletToXhtmlMapping/src/main/webapp/index.xhtml b/integration-tests/faceletToXhtmlMapping/src/main/webapp/index.xhtml
new file mode 100644
index 0000000..2e7a54e
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/src/main/webapp/index.xhtml
@@ -0,0 +1,39 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://xmlns.jcp.org/jsf/html"
+      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
+      xmlns:f="http://xmlns.jcp.org/jsf/core"
+      xmlns:jsf="http://xmlns.jcp.org/jsf"
+      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <h:head>
+        <title>test</title>
+    </h:head>
+
+    <h:body>
+        <h:form>
+            <h:inputText value="test" />
+            <h:commandButton value="submit" />
+        </h:form>
+    </h:body>
+
+</html>
+
diff --git a/integration-tests/faceletToXhtmlMapping/src/main/webapp/plainHtml.xhtml b/integration-tests/faceletToXhtmlMapping/src/main/webapp/plainHtml.xhtml
new file mode 100644
index 0000000..15b84e5
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/src/main/webapp/plainHtml.xhtml
@@ -0,0 +1,27 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <title>minimal test html</title>
+    </head>
+    <body>
+        <span>minimal test html</span>
+    </body>
+</html>
diff --git a/integration-tests/faceletToXhtmlMapping/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java b/integration-tests/faceletToXhtmlMapping/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java
new file mode 100644
index 0000000..025f0ef
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.core.integrationtests;
+
+import java.io.File;
+import java.net.URL;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.drone.api.annotation.Drone;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.embedded.EmbeddedMaven;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openqa.selenium.WebDriver;
+
+@RunWith(Arquillian.class)
+@RunAsClient
+public class IntegrationTest
+{
+    @Deployment(testable = false)
+    public static WebArchive createDeployment()
+    {
+        WebArchive webArchive = (WebArchive) EmbeddedMaven.forProject(new File("pom.xml"))
+                .useMaven3Version("3.3.9")
+                .setGoals("package")
+                .setQuiet()
+                .skipTests(true)
+                .ignoreFailure()
+                .build().getDefaultBuiltArchive();
+
+        return webArchive;
+    }
+
+    @Drone
+    protected WebDriver webDriver;
+
+    @ArquillianResource
+    protected URL contextPath;
+
+    @Before
+    public void before()
+    {
+    }
+
+    @After
+    public void after()
+    {
+        webDriver.manage().deleteAllCookies();
+    }
+
+    @Test
+    public void test()
+    {
+        webDriver.get(contextPath + "index.xhtml");
+
+        // check if the xhtml was handled as JSF view
+        Assert.assertTrue(webDriver.getPageSource().contains("ViewState"));
+    }
+    
+    @Test
+    public void testPlainHtml()
+    {
+        webDriver.get(contextPath + "plainHtml.xhtml");
+
+        // check if a plain html can be served as well
+        Assert.assertTrue(webDriver.getPageSource().contains("minimal test html"));
+    }
+}
diff --git a/integration-tests/faceletToXhtmlMapping/src/test/resources/arquillian.xml b/integration-tests/faceletToXhtmlMapping/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..df569d2
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMapping/src/test/resources/arquillian.xml
@@ -0,0 +1,37 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<arquillian
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"
+    xmlns="http://jboss.org/schema/arquillian">
+
+    <extension qualifier="webdriver">
+        <property name="browser">chrome</property>
+    </extension>
+
+    <container qualifier="tomcat" default="true">
+        <configuration>
+            <property name="tomcatHome">target/tomcat-embedded-8</property>
+            <property name="workDir">work</property>
+            <property name="bindHttpPort">8888</property>
+            <property name="unpackArchive">true</property>
+            <property name="serverName">arquillian-tomcat-embedded-8</property>
+        </configuration>
+    </container>
+</arquillian>
diff --git a/integration-tests/faceletToXhtmlMappingDisabled/pom.xml b/integration-tests/faceletToXhtmlMappingDisabled/pom.xml
new file mode 100644
index 0000000..32e6223
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMappingDisabled/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.myfaces.core</groupId>
+        <artifactId>myfaces-integration-tests</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.myfaces.core.integration-tests</groupId>
+    <artifactId>faceletToXhtmlMappingDisabled</artifactId>
+    <name>Apache MyFaces Core 3.0 - Integration Tests - faceletToXhtmlMappingDisabled</name>
+    <packaging>war</packaging>
+
+</project>
diff --git a/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/WEB-INF/beans.xml b/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/WEB-INF/beans.xml
new file mode 100644
index 0000000..9bcebd8
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/WEB-INF/beans.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+       version="1.2" bean-discovery-mode="all">
+
+</beans>
\ No newline at end of file
diff --git a/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/WEB-INF/web.xml b/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..f7c0faf
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+         version="3.1">
+
+    <context-param>
+        <param-name>javax.faces.DISABLE_FACESSERVLET_TO_XHTML</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>javax.faces.PROJECT_STAGE</param-name>
+        <param-value>Production</param-value>
+    </context-param>
+    <context-param>
+        <param-name>org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS</param-name>
+        <param-value>false</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+    </listener>
+    <listener>
+        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>/faces/*</url-pattern>
+        <url-pattern>*.jsf</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>faces/index.xhtml</welcome-file>
+    </welcome-file-list>
+
+    <session-config>
+        <tracking-mode>COOKIE</tracking-mode>
+    </session-config>
+</web-app>
diff --git a/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/index.xhtml b/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/index.xhtml
new file mode 100644
index 0000000..2e7a54e
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMappingDisabled/src/main/webapp/index.xhtml
@@ -0,0 +1,39 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://xmlns.jcp.org/jsf/html"
+      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
+      xmlns:f="http://xmlns.jcp.org/jsf/core"
+      xmlns:jsf="http://xmlns.jcp.org/jsf"
+      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+    <h:head>
+        <title>test</title>
+    </h:head>
+
+    <h:body>
+        <h:form>
+            <h:inputText value="test" />
+            <h:commandButton value="submit" />
+        </h:form>
+    </h:body>
+
+</html>
+
diff --git a/integration-tests/faceletToXhtmlMappingDisabled/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java b/integration-tests/faceletToXhtmlMappingDisabled/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java
new file mode 100644
index 0000000..3dee991
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMappingDisabled/src/test/java/org/apache/myfaces/core/integrationtests/IntegrationTest.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.core.integrationtests;
+
+import java.io.File;
+import java.net.URL;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.drone.api.annotation.Drone;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.embedded.EmbeddedMaven;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openqa.selenium.WebDriver;
+
+@RunWith(Arquillian.class)
+@RunAsClient
+public class IntegrationTest
+{
+    @Deployment(testable = false)
+    public static WebArchive createDeployment()
+    {
+        WebArchive webArchive = (WebArchive) EmbeddedMaven.forProject(new File("pom.xml"))
+                .useMaven3Version("3.3.9")
+                .setGoals("package")
+                .setQuiet()
+                .skipTests(true)
+                .ignoreFailure()
+                .build().getDefaultBuiltArchive();
+
+        return webArchive;
+    }
+
+    @Drone
+    protected WebDriver webDriver;
+
+    @ArquillianResource
+    protected URL contextPath;
+
+    @Before
+    public void before()
+    {
+    }
+
+    @After
+    public void after()
+    {
+        webDriver.manage().deleteAllCookies();
+    }
+
+    @Test
+    public void testDefaultMapping()
+    {
+        webDriver.get(contextPath + "index.xhtml");
+
+        // check if the javax.faces.DISABLE_FACESSERVLET_TO_XHTML works as expected
+        Assert.assertTrue(!webDriver.getPageSource().contains("ViewState"));
+    }
+    
+    @Test
+    public void testPrefixMapping()
+    {
+        webDriver.get(contextPath + "/faces/index.xhtml");
+
+        // checks if a prefix mapping still works
+        Assert.assertTrue(webDriver.getPageSource().contains("ViewState"));
+    }
+
+    @Test
+    public void testSuffixMapping()
+    {
+        webDriver.get(contextPath + "/index.jsf");
+
+        // checks if a prefix mapping still works
+        Assert.assertTrue(webDriver.getPageSource().contains("ViewState"));
+    }
+}
diff --git a/integration-tests/faceletToXhtmlMappingDisabled/src/test/resources/arquillian.xml b/integration-tests/faceletToXhtmlMappingDisabled/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..20c5415
--- /dev/null
+++ b/integration-tests/faceletToXhtmlMappingDisabled/src/test/resources/arquillian.xml
@@ -0,0 +1,37 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<arquillian
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"
+        xmlns="http://jboss.org/schema/arquillian">
+
+    <extension qualifier="webdriver">
+        <property name="browser">chrome</property>
+    </extension>
+
+    <container qualifier="tomcat" default="true">
+        <configuration>
+            <property name="tomcatHome">target/tomcat-embedded-8</property>
+            <property name="workDir">work</property>
+            <property name="bindHttpPort">8888</property>
+            <property name="unpackArchive">true</property>
+            <property name="serverName">arquillian-tomcat-embedded-8</property>
+        </configuration>
+    </container>
+</arquillian>
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
new file mode 100644
index 0000000..2cc0492
--- /dev/null
+++ b/integration-tests/pom.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.myfaces.core</groupId>
+    <artifactId>myfaces-integration-tests</artifactId>
+    <name>Apache MyFaces Core 3.0 - Integration Tests</name>
+    <version>3.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.2.2</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.22.1</version>
+                <configuration>
+                    <systemPropertyVariables>
+                        <tomcat.util.scan.StandardJarScanFilter.jarsToSkip>serializer.jar</tomcat.util.scan.StandardJarScanFilter.jarsToSkip>
+                        <tomcat.util.scan.DefaultJarScanner.jarsToSkip>serializer.jar</tomcat.util.scan.DefaultJarScanner.jarsToSkip>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <!-- JUnit -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.12</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Selenium -->
+        <dependency>
+            <groupId>org.seleniumhq.selenium</groupId>
+            <artifactId>selenium-java</artifactId>
+            <version>3.13.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Arquillian + AddOns -->
+        <dependency>
+            <groupId>org.jboss.arquillian.junit</groupId>
+            <artifactId>arquillian-junit-container</artifactId>
+            <version>1.4.0.Final</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.shrinkwrap.resolver</groupId>
+            <artifactId>shrinkwrap-resolver-bom</artifactId>
+            <version>3.1.3</version>
+            <type>pom</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.shrinkwrap.resolver</groupId>
+            <artifactId>shrinkwrap-resolver-depchain</artifactId>
+            <version>3.1.3</version>
+            <type>pom</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.arquillian.graphene</groupId>
+            <artifactId>graphene-webdriver</artifactId>
+            <version>2.3.2</version>
+            <type>pom</type>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Tomcat Embedded -->
+        <dependency>
+            <groupId>org.jboss.arquillian.container</groupId>
+            <artifactId>arquillian-tomcat-embedded-8</artifactId>
+            <version>1.1.0.Final</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>9.0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-jasper</artifactId>
+            <version>9.0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-websocket</artifactId>
+            <version>9.0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+            <version>9.0.0.M6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jdt.core.compiler</groupId>
+            <artifactId>ecj</artifactId>
+            <version>4.6.1</version>
+        </dependency>
+
+        <!-- MyFaces -->
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-impl</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <!-- CDI required APIs -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jcdi_2.0_spec</artifactId>
+            <version>1.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-interceptor_1.2_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.3_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <!-- CDI Impl -->
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-web</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jsf</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+    </dependencies>
+
+    <modules>
+        <module>faceletToXhtmlMapping</module>
+        <module>faceletToXhtmlMappingDisabled</module>
+        <module>exactMapping</module>
+    </modules>
+
+</project>