Skip to content

Commit

Permalink
Corrections, Copyrights, Clean up & Fix errors
Browse files Browse the repository at this point in the history
Skip ported tests

Update copyrights for new files

Address review comments

correct packages in skipped tests

Correct more copyrights

Add EPL copyrights to Deployments.java files'

Update to EE10 deployment descriptors

Update to EPLv2 / Apache License v2.0

More copyright update, mention Apache v2
  • Loading branch information
volosied committed Mar 6, 2023
1 parent 77f83d5 commit f6562cc
Show file tree
Hide file tree
Showing 29 changed files with 185 additions and 58 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2023 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
* https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-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: GPL-2.0 with Classpath-exception-2.0 which
* is available at https://openjdk.java.net/legal/gplv2+ce.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0
*/
package ee.jakarta.tck.faces.test.servlet30.ajax_selenium;

import ee.jakarta.tck.faces.test.util.selenium.BaseITNG;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2023 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
* https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-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: GPL-2.0 with Classpath-exception-2.0 which
* is available at https://openjdk.java.net/legal/gplv2+ce.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0
*/
package ee.jakarta.tck.faces.test.javaee8.ajax_selenium;

import ee.jakarta.tck.faces.test.util.selenium.BaseITNG;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2023 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
* https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-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: GPL-2.0 with Classpath-exception-2.0 which
* is available at https://openjdk.java.net/legal/gplv2+ce.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0
*/
package ee.jakarta.tck.faces.test.javaee8.namespacedView_selenium;

import ee.jakarta.tck.faces.test.util.selenium.BaseITNG;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2023 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
* https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-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: GPL-2.0 with Classpath-exception-2.0 which
* is available at https://openjdk.java.net/legal/gplv2+ce.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0
*/
package ee.jakarta.tck.faces.test.servlet50.ajax_selenium;

import ee.jakarta.tck.faces.test.util.selenium.BaseITNG;
Expand Down
2 changes: 1 addition & 1 deletion tck/old-tck-selenium/ajax/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 Contributors to Eclipse Foundation.
Copyright (c) 2023 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2023 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2023 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.
Expand All @@ -14,6 +14,6 @@

<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">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_0.xsd"
version="4.0">
</faces-config>
10 changes: 7 additions & 3 deletions tck/old-tck-selenium/ajax/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 2023 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.
Expand All @@ -11,9 +11,13 @@
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="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_6_0.xsd"
version="6.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">
<display-name>jsf_ajax_jsresource</display-name>
<display-name>ajax</display-name>

<context-param>
<param-name>com.sun.faces.validateXml</param-name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Contributors to the Eclipse Foundation.
* Copyright (c) 2023 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
Expand Down Expand Up @@ -28,15 +28,13 @@
import java.util.List;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
Expand All @@ -45,8 +43,9 @@
import com.gargoylesoftware.htmlunit.html.HtmlSpan;
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;

@RunWith(Arquillian.class)
public class AjaxTestsIT {
import ee.jakarta.tck.faces.test.util.arquillian.ITBase;

public class AjaxTestsIT extends ITBase {

@ArquillianResource
private URL webUrl;
Expand Down Expand Up @@ -178,6 +177,7 @@ public void ajaxThisKeywordTest() throws Exception {
*
* @since 2.0
*/
@Test
public void ajaxFormKeywordTest() throws Exception {

String EXPECTED = "testtext";
Expand All @@ -201,6 +201,7 @@ public void ajaxFormKeywordTest() throws Exception {
*
* @since 2.0
*/
@Test
public void ajaxNoneKeywordTest() throws Exception {

String EXPECTED = "testtext";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Contributors to the Eclipse Foundation.
* Copyright (c) 2023 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
Expand All @@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.List;

import org.junit.Ignore;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
Expand Down Expand Up @@ -182,6 +183,7 @@ public void ajaxNoneKeywordTest() throws Exception {
*
* @since 2.0
*/
@Ignore("Skipped in Old TCK for EE10")
@Test
public void ajaxPDLResourceTest() throws Exception {

Expand Down Expand Up @@ -218,5 +220,6 @@ private void validateKeyword(List<String> urls, String buttonId,
output = page.findElement(By.id(spanId));
assertEquals(expectedValue, output.getText());
}
}

}
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2023 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
* https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-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: GPL-2.0 with Classpath-exception-2.0 which
* is available at https://openjdk.java.net/legal/gplv2+ce.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 or Apache-2.0
*/

package ee.jakarta.tck.faces.test.oldtck.ajax_selenium;

import ee.jakarta.tck.faces.test.util.selenium.BaseITNG;
Expand Down
2 changes: 1 addition & 1 deletion tck/old-tck-selenium/commandLink/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 Contributors to Eclipse Foundation.
Copyright (c) 2023 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import jakarta.faces.event.ActionListener;
import jakarta.servlet.http.HttpServletResponse;

@jakarta.inject.Named("ActionListener") @jakarta.enterprise.context.RequestScoped
@jakarta.inject.Named("ActionListener") @jakarta.enterprise.context.SessionScoped
public class SimpleActionListener implements ActionListener, Serializable {

private static final long serialVersionUID = -2123380871083456327L;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void processAction(ActionEvent event) throws AbortProcessingException {
response.addHeader("actionEvent",
"Test error. Can't find expected" + " component ID.");
// Selenium Result ID Check
result = "FAILED. Can't find expected component ID"
result = "FAILED. Can't find expected component ID";
} else {

if (!expectedId.equals(component.getId())) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2022, 2023 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2005, 2023 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.
Expand All @@ -14,6 +14,6 @@

<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">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_0.xsd"
version="4.0">
</faces-config>
11 changes: 6 additions & 5 deletions tck/old-tck-selenium/commandLink/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2005, 2023 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
Expand All @@ -16,11 +16,12 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<web-app
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_6_0.xsd"
version="6.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">
<display-name>jsf_render_clink</display-name>

<context-param>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Contributors to the Eclipse Foundation.
* Copyright (c) 2023 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
Expand Down Expand Up @@ -31,14 +31,12 @@
import java.util.TreeMap;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.DomAttr;
Expand All @@ -47,8 +45,9 @@
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlSpan;

@RunWith(Arquillian.class)
public class CommandLinkTestsIT {
import ee.jakarta.tck.faces.test.util.arquillian.ITBase;

public class CommandLinkTestsIT extends ITBase {

@ArquillianResource
private URL webUrl;
Expand Down Expand Up @@ -114,36 +113,36 @@ public void clinkRenderEncodeTest() throws Exception {

HtmlPage page = webClient.getPage(webUrl + "/faces/encodetest_facelet.xhtml");

HtmlAnchor link1 = (HtmlAnchor) page.getElementById("form:link1"); // form:link1?
HtmlAnchor link1 = (HtmlAnchor) page.getElementById("form:link1");
assertNotNull(link1);
assertEquals("#",link1.getHrefAttribute());
assertEquals("Click Me1",link1.asNormalizedText());
assertFalse(link1.getOnClickAttribute().length() < 0);

HtmlAnchor link2 = (HtmlAnchor) page.getElementById("form:link2"); // form:link1?
HtmlAnchor link2 = (HtmlAnchor) page.getElementById("form:link2");
assertNotNull(link2);
assertEquals("#",link1.getHrefAttribute());
assertEquals("Click Me2",link2.asNormalizedText());
assertEquals("sansserif", link2.getAttribute("class"));
assertFalse(link2.getOnClickAttribute().length() < 0);

HtmlAnchor link3 = (HtmlAnchor) page.getElementById("form:link3"); // form:link1?
HtmlAnchor link3 = (HtmlAnchor) page.getElementById("form:link3");
assertNotNull(link2);
assertEquals("#",link3.getHrefAttribute());
assertEquals("Click Me3",link3.asNormalizedText());
assertFalse(link3.getOnClickAttribute().length() < 0);

HtmlSpan link5 = (HtmlSpan) page.getElementById("form:link5"); // form:link1?
HtmlSpan link5 = (HtmlSpan) page.getElementById("form:link5");
assertNotNull(link5);
assertEquals("sansserif", link5.getAttribute("class"));
assertEquals("Disabled Link",link5.asNormalizedText());
assertFalse(link5.getOnClickAttribute().length() < 0);

HtmlSpan span2 = (HtmlSpan) page.getElementById("form:link6"); // form:link1?
HtmlSpan span2 = (HtmlSpan) page.getElementById("form:link6");
assertNotNull(span2);
assertEquals("Disabled Link(Nested)",span2.asNormalizedText());

HtmlAnchor span7 = (HtmlAnchor) page.getElementById("form:link7"); // form:link1?
HtmlAnchor span7 = (HtmlAnchor) page.getElementById("form:link7");
assertNotNull(span7);
assertEquals("sansserif",span7.getAttribute("class"));
assertEquals("rectangle",span7.getShapeAttribute());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Contributors to the Eclipse Foundation.
* Copyright (c) 2023 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
Expand Down
Loading

0 comments on commit f6562cc

Please sign in to comment.