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

https://github.com/jakartaee/faces/issues/1765 #1767

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Conversation

BalusC
Copy link
Member

@BalusC BalusC commented Dec 13, 2022

Fixes #1765 Add missing waitForBackgroundJavaScript calls

Add missing waitForBackgroundJavaScript calls
@arjantijms arjantijms added this to the 4.0.1-TCK milestone Dec 13, 2022
@arjantijms arjantijms added the TCK Any issue having to do with the TCK not the API of SPEC text label Dec 13, 2022
@@ -101,6 +100,7 @@ private void testSingleSelection(String form) throws Exception {
input.setValueAttribute(file.getAbsolutePath());

page = page.getHtmlElementById(form + ":submit").click();
webClient.waitForBackgroundJavaScript(3000);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the waitForBackgroundJavaScript method is smart enough to not wait if there are no background javascript functions. If it isn't then I would suggest introducing a boolean flag that will allow us to dynamically wait depending on the test case.

Otherwise, we are waiting for no reason.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take your word for it and approve the PR if you think waitForBackgroundJavaScript is smart enough.

Copy link
Member Author

@BalusC BalusC Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Moreover, I already ran it locally. And it also exists in a bunch of other tests. Note that it also waits for any non-ajax scripts to load completely, e.g. onload/deferred/async scripts.

@KyleAure
Copy link

Thanks for getting this fix put in.
@BalusC I'm not a contributor to this repo so I'm not sure if my approval will work for merging.

@BalusC
Copy link
Member Author

BalusC commented Dec 14, 2022

You're explicitly requested as reviewer.

@BalusC BalusC merged commit daea03c into master Dec 14, 2022
@BalusC BalusC deleted the faces_issue_1765 branch February 6, 2023 11:04
@arjantijms arjantijms modified the milestones: 4.0.1-TCK, 4.0.2-TCK Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TCK Any issue having to do with the TCK not the API of SPEC text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TCK Challenge: SPEC-1555 h:inputFile multiple="true" tests do not wait for ajax to return
3 participants