Skip to content

Commit

Permalink
eclipse-ee4j/mojarra#5140 also add IT for
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Nov 13, 2022
1 parent 6ff23a5 commit a1581ef
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 0 deletions.
1 change: 1 addition & 0 deletions tck/faces23/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<module>validateWholeBean</module>
<module>websocket</module>
<module>xhtmlMappingToFaceletByDefault</module>
<module>xhtmlNamespaces</module>
</modules>

<dependencies>
Expand Down
38 changes: 38 additions & 0 deletions tck/faces23/xhtmlNamespaces/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2022 Contributors to Eclipse Foundation.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->


<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.eclipse.ee4j.tck.faces.faces23</groupId>
<artifactId>pom</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>

<artifactId>xhtmlNamespaces</artifactId>
<packaging>war</packaging>

<name>Jakarta Faces TCK ${project.version} - Test - Faces 2.3 - xhtmlNamespaces</name>

<build>
<finalName>test-faces23-xhtmlNamespaces</finalName>
</build>
</project>
Empty file.
41 changes: 41 additions & 0 deletions tck/faces23/xhtmlNamespaces/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2022 Contributors to Eclipse Foundation.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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 web-app_3_1.xsd"
version="3.1"
>
<context-param>
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
<param-value>${webapp.projectStage}</param-value>
</context-param>
<context-param>
<param-name>jakarta.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>${webapp.partialStateSaving}</param-value>
</context-param>
<context-param>
<param-name>jakarta.faces.STATE_SAVING_METHOD</param-name>
<param-value>${webapp.stateSavingMethod}</param-value>
</context-param>
<context-param>
<param-name>jakarta.faces.SERIALIZE_SERVER_STATE</param-name>
<param-value>${webapp.serializeServerState}</param-value>
</context-param>
</web-app>
36 changes: 36 additions & 0 deletions tck/faces23/xhtmlNamespaces/src/main/webapp/issue4281.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<!--

Copyright (c) 2022 Contributors to Eclipse Foundation.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
>
<h:head>
<title>Issue5140IT</title>
</h:head>
<h:body>
<h:panelGroup id="panelGroup">
<p xmlns="http://www.w3.org/1999/xhtml">paragraph</p>
</h:panelGroup>
<h:outputText id="outputText" value="outputText" />
</h:body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2022 Contributors to Eclipse Foundation.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package ee.jakarta.tck.faces.test.javaee8.xhtmlNamespaces;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

import ee.jakarta.tck.faces.test.util.arquillian.ITBase;

public class Issue4281IT extends ITBase {

/**
* @see https://github.com/eclipse-ee4j/mojarra/issues/4281
*/
@Test
public void test() throws Exception {
HtmlPage page = getPage("issue4281.xhtml");
DomElement panelGroup = page.getElementById("panelGroup");
DomElement outputText = page.getElementById("outputText");
assertTrue("outputText does exist", outputText != null);
assertTrue("panelGroup does contain parargaph", panelGroup.asNormalizedText().contains("paragraph"));
assertFalse("panelGroup does not contain outputText", panelGroup.asNormalizedText().contains("outputText"));
assertTrue("body does contain outputText", page.getBody().asNormalizedText().contains("outputText"));
}

}

0 comments on commit a1581ef

Please sign in to comment.