-
Notifications
You must be signed in to change notification settings - Fork 56
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
Port Failing Old TCK Tests to New TCK Framework (HTMLUnit & Selenium) #1794
Changes from 5 commits
b773091
d8b70ac
d126425
26710e7
77f83d5
f6562cc
51286e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
|
||
Copyright (c) 2021 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.old-tck-selenium</groupId> | ||
<artifactId>pom</artifactId> | ||
<version>4.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>ajax</artifactId> | ||
<packaging>war</packaging> | ||
|
||
<name>Jakarta Faces TCK ${project.version} - Test - Old TCK Port - Ajax</name> | ||
|
||
<build> | ||
<finalName>old-tck-ajax</finalName> | ||
</build> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* 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 | ||
*/ | ||
|
||
/* | ||
* $Id$ | ||
*/ | ||
package com.sun.ts.tests.jsf.spec.ajax.common; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collection; | ||
import java.util.LinkedHashSet; | ||
|
||
import jakarta.faces.event.ActionEvent; | ||
import java.io.Serializable; | ||
|
||
|
||
@jakarta.inject.Named("ajaxtag") @jakarta.enterprise.context.SessionScoped | ||
public class AjaxTagValuesBean implements Serializable { | ||
|
||
private static final long serialVersionUID = -2564031884433676327L; | ||
|
||
private Integer count = 0; | ||
|
||
private Boolean checked = false; | ||
|
||
private String text = ""; | ||
|
||
private String[] outArray = { "out1", ":form2:out2", ":out3" }; | ||
|
||
private Collection<String> outSet = new LinkedHashSet<String>( | ||
Arrays.asList(outArray)); | ||
|
||
private String render = "out1"; | ||
|
||
public String getText() { | ||
return text; | ||
} | ||
|
||
public void setText(String text) { | ||
this.text = text; | ||
} | ||
|
||
public Boolean getChecked() { | ||
return checked; | ||
} | ||
|
||
public void setChecked(Boolean checked) { | ||
this.checked = checked; | ||
} | ||
|
||
public Integer getCount() { | ||
return count++; | ||
} | ||
|
||
public void reset(ActionEvent ae) { | ||
count = 0; | ||
checked = false; | ||
text = ""; | ||
} | ||
|
||
public Collection<String> getRenderList() { | ||
return outSet; | ||
} | ||
|
||
public String getRenderOne() { | ||
return render; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
|
||
Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. | ||
|
||
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 | ||
|
||
--> | ||
|
||
|
||
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd" | ||
bean-discovery-mode="all"> | ||
</beans> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. | ||
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 | ||
--> | ||
|
||
<faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_3_0.xsd" | ||
version="3.0"> | ||
</faces-config> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved. | ||
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 version="5.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be Servlet 6.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied these from the old tck, but, considering that that ajax tests had three apps, I could only use 1 web.xml (jsf_ajax_jsresource).
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about the other app web.xmls/configs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CDI 4.0 was declared in beans.xml which implied JEE 10. So either make sure all deployment descriptors are JEE 10 (CDI 4.0, Faces 4.0, Servlet 6.0) or make sure all deployment descriptors are JEE 9 (CDI 3.0, Faces 3.0, Servlet 5.0). If the old test didn't have a beans.xml then probably you should downgrade beans.xml to CDI 3.0. But all XHTML files are using the new XML namespaces introduced in Faces 4.0. So it wouldn't work in Faces 3.0 nonetheless. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
All deployment descriptors should preferably be in sync with each other. Originally the deployment descriptors should follow the target Faces version the test was written for. E.g. if the test is testing something which was fixed in e.g. Faces 2.3 then all DD files should be conform JEE 8 because it needs to be testable against Faces 2.3 as well (although this does maybe not apply to TCK itself).
|
||
<display-name>jsf_ajax_jsresource</display-name> | ||
|
||
<context-param> | ||
<param-name>com.sun.faces.validateXml</param-name> | ||
<param-value>true</param-value> | ||
</context-param> | ||
|
||
<servlet> | ||
<servlet-name>Faces Servlet</servlet-name> | ||
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class> | ||
</servlet> | ||
<servlet-mapping> | ||
<servlet-name>Faces Servlet</servlet-name> | ||
<url-pattern>/faces/*</url-pattern> | ||
</servlet-mapping> | ||
|
||
<session-config> | ||
<session-timeout>54</session-timeout> | ||
</session-config> | ||
</web-app> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<!-- | ||
|
||
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. | ||
|
||
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="http://www.w3.org/1999/xhtml" | ||
xmlns:h="jakarta.faces.html" | ||
xmlns:f="jakarta.faces.core" | ||
xmlns:ui="jakarta.faces.facelets"> | ||
|
||
<h:head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
<title>PDL Approach</title> | ||
</h:head> | ||
|
||
<h:body> | ||
<h:outputScript name="faces.js" library="jakarta.faces" target="body" | ||
render="true" /> | ||
</h:body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!-- | ||
|
||
Copyright (c) 2009, 2022 Oracle and/or its affiliates. All rights reserved. | ||
|
||
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 | ||
|
||
--> | ||
|
||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:h="jakarta.faces.html" | ||
xmlns:f="jakarta.faces.core" | ||
xmlns:ui="jakarta.faces.facelets"> | ||
|
||
<h:head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
<title>Ajax Request</title> | ||
<script type="text/javascript"> | ||
</script> | ||
</h:head> | ||
|
||
<h:body> | ||
|
||
<!-- Ajaxify Individual Controls --> | ||
|
||
<h:form id="form" > | ||
<h:outputText id="out" value="testtext"/> | ||
|
||
<h:commandButton id="allKeyword" | ||
value="@all"> | ||
<f:ajax execute="@all" | ||
render="@all"/> | ||
</h:commandButton> | ||
|
||
</h:form> | ||
|
||
</h:body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- | ||
|
||
Copyright (c) 2009, 2022 Oracle and/or its affiliates. All rights reserved. | ||
|
||
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 | ||
|
||
--> | ||
|
||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:h="jakarta.faces.html" | ||
xmlns:f="jakarta.faces.core" | ||
xmlns:ui="jakarta.faces.facelets"> | ||
|
||
<h:head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
<title>Ajax Request</title> | ||
<script type="text/javascript"> | ||
var a = true; | ||
var b = false; | ||
</script> | ||
</h:head> | ||
|
||
<h:body> | ||
|
||
<!-- Ajaxify Individual Controls --> | ||
|
||
<h:form id="form" > | ||
<h:outputText id="out" value="testtext"/> | ||
|
||
<h:commandButton id="allKeyword" | ||
value="@all"> | ||
<f:ajax execute="@all" | ||
render="@all"/> | ||
</h:commandButton> | ||
|
||
</h:form> | ||
|
||
</h:body> | ||
|
||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Faces 4.0