-
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
Port Failing Old TCK Tests to New TCK Framework (HTMLUnit & Selenium) #1794
Conversation
@@ -31,11 +31,15 @@ | |||
import jakarta.faces.event.ActionListener; | |||
import jakarta.servlet.http.HttpServletResponse; | |||
|
|||
@jakarta.inject.Named("ActionListener") @jakarta.enterprise.context.SessionScoped | |||
@jakarta.inject.Named("ActionListener") @jakarta.enterprise.context.RequestScoped |
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.
When I tested this app manually, the result was already set in the later test attempts. So, I changed to RequestScoped. I can change it back, but it shouldn't affect the test.
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<!-- | ||
|
||
Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved. |
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 copyrights be updated since these application files didn't change much (or very little, i.e. added id)
The selenium versions worked fine for me running with OL + MyFaces RC5. A couple updates you should make:
|
1707a17
to
532a1ec
Compare
@werpu The Deployments files don't have a copyright. What should I add? EPL? Apache? |
@volosied It probably ought to be EPL but others might have a better idea. I know you can mix ASF2 code into an EPL project, but not vice versa, dual licensing also is possible, if it is new code or all authors agree! But I am not an expert on this! |
Let me ask @waynebeaton to chime in here, maybe he could provide some inside. Hi Wayne, Werner provided a PR to provide selenium based tests in his PR, but the Deployments classes were missing a copyright. For example, here: https://github.com/jakartaee/faces/pull/1770/files#diff-e4305caf242dfd8b4efa86ae007d0a804cf8538f602acc0dae0bdd0b36b43588 I'm adding new tests and therefore am reusing the selenium test code pattern. I kept the Deployments files copyright-less. Werner's other code used Apache v2, so I'm not sure what it should be categorized under. Could you comment? Or could it be left as is? Thank you. |
Well just a short explanation, I just used ASL2 in code I programmed (aka selenium base framework code), because I knew it was forward compatible with the ECL and I wanted to keep the door open to integrate the same or similar code in myfaces. (In fact I think I even dual licensed itI) |
I've gone ahead and added EPL to all Deployement files. |
Please make sure that in all cases where it is technically possible, copyright and license headers are included. Please work together to add the missing headers. In case there is any confusion... for an Eclipse project, the copyright holder is either the author themselves or -- in the case where an employment contract states -- their employer (we do not require a copyright assignment). It's generally easier for everybody if contributions are accepted under the same terms as the rest of the project. In the case of Jakarta Faces, that Consistency also helps avoid some of the "license maths"... by adding a file under Ultimately, though, it's @werpu's intellectual property, and as the copyright holder, his decision to choose the license. If, as a committer, you need assistance to determine whether or not a particular combination of licenses works in a particular scenario, connect with the IP Team. TL;DR: My strong recommendation is that we get confirmation from @werpu that his contributions were made under the terms of the project license and then add headers that reflect that. |
@werpu are you saying you're ok with changing the ASL2 copyright to EPL 2.0 for files you initially contributed: https://github.com/jakartaee/faces/pull/1770/files ? |
@pnicolucci |
Hi I have relicensed the code i donated to EPL, so that the licencing is more clear, in my pending PR! |
@werpu , see: jakartaee/cdi-tck#437 any objection to donating your same classes to the cdi-tck with the Apache License as @brideck has them currently? Just want to make sure we're all set across the board. We hit the same sort of failures in one cdi tck test that required a selenium update. |
no objection, I wanted to have them in a very liberal license anyway. how about having a dual MIT/ASL2 and EPL license on those classes? That should fix things once and for good! I too want this cleared up, either EPL, or ASL2 or dual. We still can change the license of the affected files! My preference would be to keep this for the base lib classes on the liberal side, if EPL is a must, is there anything speaking against a dual license? I just need a guideline here on which license, and in case of dual licensing, I have to check the correct licensing header! |
@waynebeaton is the dual license ok? Is there someone on the IP team that can help us if you don't know the answer? Thanks! Essentially we need the code now to be at least in the Faces project and the cdi-tck project, which have different licenses. |
<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"> |
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
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 comment
The 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 comment
The 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).
- I should rename it
- Is updating to web.xml to 6.0 and the faces-config to 4.0 appropriate since the older tests used these definitions?
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.
What about the other app web.xmls/configs?
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
What about the other app web.xmls/configs?
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).
- JEE 10: CDI 4.0 + Faces 4.0 + Servlet 6.0
- JEE 9: CDI 3.0 + Faces 3.0 + Servlet 5.0
- JEE 8: CDI 2.0 + Faces 2.3 + Servlet 4.0
- JEE 7: CDI 1.2 + Faces 2.2 + Servlet 3.1
- JEE 6: CDI 1.0 + Faces 2.0 + Servlet 3.0
@@ -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. |
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.
2005 is the correct year:
faces/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/render/commandlink/faces-config.xml
Line 4 in 3fae982
Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. |
e03f61e
to
784d630
Compare
I'd like to squash the commits before merging, once the approvals are set. |
Yes.
I run the IP Team, so yeah... I know some people... |
Thanks @waynebeaton :) Can you help us with what a dual license header would look like for EPL 2.0 and ASL 2.0? Just want to make sure we get it correct on the first try! We need to merge the same code here in the Faces project which currently is SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0` as well in the cdi-tck https://github.com/jakartaee/cdi-tck/blob/master/LICENSE. Link to the cdi-tck PR: jakartaee/cdi-tck#437 Whatever header we use would need to be the same for both projects or would there be a difference? |
In keeping with the established expression, you can use something like this:
Note that the If you're rather use a current code, use |
@waynebeaton , ok so for the purpose of the Faces Community here in this PR we would just put the following header in this new code:
No other updates other than: For the cdi-tck we could then just contribute the same code with the ASL 2.0 license header?
Correct or did I mess it up ? :) |
No. I messed up. I misread the question and only gave a part answer. Gimme a minute. |
My apologies. It turns out that I also got the expression and operator wrong. It should Try this for the dual licensing scenario.
The header for the Apache license looks right. |
Thanks so much, @waynebeaton . Ok so... @werpu @volosied Wayne has provided a copyright header for you guys to update your PRs. @brideck the cdi PR is good since you already have the Apache License in that PR. |
Yes I will do that in the next hour, @waynebeaton, thank you! |
...aces22/ajax/src/test/java/ee/jakarta/tck/faces/test/servlet30/ajax_selenium/Deployments.java
Show resolved
Hide resolved
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
f65a11d
to
f6562cc
Compare
I believe this PR should be ready now that the last copyrights were fixed. Please review and merge when possible! |
@BalusC @arjantijms any other comments? |
c2952e8
to
51286e3
Compare
for #1722
Testing still required for MyFaces, but things look to pass on Mojarra.
Tried to keep as true to the original tests as possible.
Ajax
https://github.com/jakartaee/faces/blob/3fae98234692ec16545a6d27cf36fabaeb883f9b/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/ajax/tagwrapper/URLClient.java
CommandLink
https://github.com/jakartaee/faces/blob/18876c6a72cadc43aecbab9ca8bcebce470c99e3/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/render/commandlink/URLClient.java
Protected View
https://github.com/jakartaee/faces/blob/3fae98234692ec16545a6d27cf36fabaeb883f9b/tck/old-tck/source/src/com/sun/ts/tests/jsf/spec/view/protectedview/URLClient.java
Notable mentions:
intext.sendKeys(TAB);
to trigger change eventLastly, let me know if I should add better error messages?