Skip to content

Add comprehensive unit test set for faces.js 4.1#5690

Merged
BalusC merged 19 commits into4.1from
add_comprehensive_unit_test_set_for_faces.js_4.1
Mar 18, 2026
Merged

Add comprehensive unit test set for faces.js 4.1#5690
BalusC merged 19 commits into4.1from
add_comprehensive_unit_test_set_for_faces.js_4.1

Conversation

@BalusC
Copy link
Copy Markdown
Contributor

@BalusC BalusC commented Mar 18, 2026

Because the TCK due to its E2E nature is not guaranteed to cover everything, and also because 4.1 had a big rewrite of faces.js as compared to 4.0 ( 1181d6d ) and I wanted to doublecheck if everything is still rock solid.

The new faces.js unit test suite indeed did uncover 4 bugs caused by the rewrite (there are 329 tests). They are all addressed.

  • faces.getPartialViewState was introduced as experimental feature but it was never added to spec, it's now private
  • faces.getClientWindow was simplified but it failed in namespaced (portlet) views, it's now fixed
  • window.WebSocket check: the onclose with -1 was removed because it had an // IE6-9 comment, but it violated spec and still could potentially fail in e.g. corporate browsers and web workers, it has been restored
  • Ajax request queue: it became unsynchronized, which violated spec, it has been fixed

cc: @pizzi80

BalusC added 19 commits March 17, 2026 13:47
Added initial test on direct members of faces namespace
…t_set_for_faces.js

Add comprehensive unit test set for faces.js
(there are failing tests; they will be addressed)
fallback on namespaced jakarta.faces.ClientWindow param when UIViewRoot
is an instance of NamingContainer (portlets e.g)
removal matches "modern web browsers", it violated the spec which
explicitly says that onclose must be invoked with -1 when
window.WebSocket is unavailable; morever even in modern browsers the
window.WebSocket can still be unavailable by e.g. corporate-induced
browser extensions or in web workers
singleton (shared across all requests) to a constructor (each request
gets its own queue), breaking the spec-required ordering guarantee that
requests are sent in the same order as when they were initiated
@BalusC BalusC requested review from arjantijms and mnriem March 18, 2026 14:00
@BalusC BalusC added this to the 4.1.7 milestone Mar 18, 2026
@BalusC
Copy link
Copy Markdown
Contributor Author

BalusC commented Mar 18, 2026

Build passed. I'll merge directly so we can move forward for 5.0.

@BalusC BalusC merged commit 886606b into 4.1 Mar 18, 2026
3 checks passed
@pizzi80
Copy link
Copy Markdown
Contributor

pizzi80 commented Mar 18, 2026

🔝 @BalusC

@BalusC BalusC deleted the add_comprehensive_unit_test_set_for_faces.js_4.1 branch March 18, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants