Skip to content

Commit

Permalink
Merge pull request #1909 from jakartaee/add_new_tck_for_mojarra_issue…
Browse files Browse the repository at this point in the history
…_5415

TCK for eclipse-ee4j/mojarra#5415
  • Loading branch information
arjantijms committed Mar 17, 2024
2 parents 083d183 + 9c9691c commit ccfb189
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tck/faces40/ajax/src/main/webapp/issue5415IT.xhtml
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<!--
Copyright (c) 2024 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
xmlns:h="jakarta.faces.html"
xmlns:my="jakarta.faces.composite/components"
>
<h:head>
<title>Issue5415IT</title>
</h:head>
<h:body>
<h:form id="form">
<my:outerComponent id="firstInstanceOfOuterComponent" />
<my:outerComponent id="secondInstanceOfOuterComponent" />
</h:form>
</h:body>
</html>
@@ -0,0 +1,31 @@
<!--
Copyright (c) 2024 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
-->
<ui:component
xmlns:ui="jakarta.faces.facelets"
xmlns:f="jakarta.faces.core"
xmlns:h="jakarta.faces.html"
xmlns:cc="jakarta.faces.composite"
xmlns:my="jakarta.faces.composite/components"
>
<cc:interface>
<cc:clientBehavior name="change" event="change" targets="input" />
</cc:interface>
<cc:implementation>
<h:selectOneMenu id="input" />
</cc:implementation>
</ui:component>
@@ -0,0 +1,32 @@
<!--
Copyright (c) 2024 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
-->
<ui:component
xmlns:ui="jakarta.faces.facelets"
xmlns:f="jakarta.faces.core"
xmlns:h="jakarta.faces.html"
xmlns:cc="jakarta.faces.composite"
xmlns:my="jakarta.faces.composite/components"
>
<cc:interface>
</cc:interface>
<cc:implementation>
<my:innerComponent>
<f:ajax execute="#{cc.clientId}" event="change" />
</my:innerComponent>
</cc:implementation>
</ui:component>
@@ -0,0 +1,11 @@
<ui:component
xmlns:ui="jakarta.faces.facelets"
xmlns:cc="jakarta.faces.composite"
xmlns:my="jakarta.faces.composite/components"
>
<cc:interface>
</cc:interface>
<cc:implementation>
<my:middleComponent id="middleComponentInOuterComponent" />
</cc:implementation>
</ui:component>
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 Contributors to the 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.servlet50.ajax_selenium;

import static org.junit.Assert.assertEquals;

import jakarta.faces.component.UIComponent;
import jakarta.faces.component.behavior.AjaxBehavior;

import org.junit.Test;

import ee.jakarta.tck.faces.test.util.selenium.BaseITNG;
import ee.jakarta.tck.faces.test.util.selenium.WebPage;

public class Issue5415IT extends BaseITNG {

/**
* @see AjaxBehavior#getExecute()
* @see UIComponent#getCompositeComponentParent(UIComponent)
* @see https://github.com/eclipse-ee4j/mojarra/issues/5415
*/
@Test
public void testExecuteCcClientId() throws Exception {
WebPage page = getPage("issue5415IT.xhtml");
assertEquals(200, page.getResponseStatus());
assertEquals("Issue5415IT", page.getTitle());
}

}

0 comments on commit ccfb189

Please sign in to comment.