Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCK for https://github.com/eclipse-ee4j/mojarra/issues/5415 #1909

Merged
merged 1 commit into from Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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());
}

}