You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "reiern70 (via GitHub)" <gi...@apache.org> on 2026/09/26 14:34:52 UTC
[PR] Add regression tests for Wicket.Palette and Wicket.trapFocus focus handling [wicket]
reiern70 opened a new pull request, #1621:
URL: https://github.com/apache/wicket/pull/1621
## Summary
wicket-10.x (10.9.0+) had two TypeError bugs caused by the jQuery 4.0.0 migration mechanically rewriting `.focus()` calls as `.trigger('focus')` without checking whether the receiver was a jQuery object:
- `Wicket.Palette.moveUpHelper` called `box.trigger('focus')` on a plain DOM `<select>`. GitHub issue #1618, fixed on `wicket-10.x` in bbb...432a7fee87.
- `Wicket.trapFocus`'s keydown handler called `.trigger('focus')` on plain DOM elements from `$focusable.get(...)`. GitHub issue #1620, fixed on `wicket-10.x` in cc29182a0a.
`master` was never affected by either — it had already dropped jQuery from both `palette.js` and `trap-focus.js` and calls `.focus()` directly on native DOM elements. But `master` had no test coverage that would have caught this class of regression if it were reintroduced, and wicket-extensions' client-side JavaScript had no QUnit harness at all (only wicket-core's was wired into the `grunt`/`-Pjs-test` build).
## Changes
Two commits, mirroring the wicket-10.x fix PR (#1619):
1. Adds a QUnit harness for wicket-extensions (`wicket-extensions/src/test/js/`), wired into the `grunt`/`-Pjs-test` build via a second `connect` server target (port 38888), and a regression test for `Wicket.Palette.moveUp`/`moveDown`.
2. A regression test for `Wicket.trapFocus`'s Tab/Shift+Tab boundary wrapping.
Both tests run against master's dual client-side engines — the jQuery-based `wicket-ajax-jquery.js` and the jQuery-free `wicket-ajax.js` — matching how `wicket-core`'s own tests already run (`qunit:all` vs `qunit:vanilla`).
## Test plan
- [x] `grunt jshint connect qunit:all qunit:vanilla` in `testing/wicket-js-tests` — all green in both engines.
- [x] `ApacheLicenceHeaderTest` passes for the new `.html`/`.js` files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression tests for Wicket.Palette and Wicket.trapFocus focus handling [wicket]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1621:
URL: https://github.com/apache/wicket/pull/1621#issuecomment-5847153827
## [Codecov](https://app.codecov.io/gh/apache/wicket/pull/1621?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 61.89%. Comparing base ([`6550afd`](https://app.codecov.io/gh/apache/wicket/commit/6550afd842ff15dc807dce8f549f87dbeb4523b1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`79c5857`](https://app.codecov.io/gh/apache/wicket/commit/79c5857f095a3588279c949b23989c14cb665c75?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #1621 +/- ##
=========================================
Coverage 61.89% 61.89%
- Complexity 11242 11244 +2
=========================================
Files 1247 1247
Lines 48367 48367
Branches 6788 6788
=========================================
+ Hits 29935 29936 +1
Misses 15725 15725
+ Partials 2707 2706 -1
```
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression tests for Wicket.Palette and Wicket.trapFocus focus handling [wicket]
Posted by "solomax (via GitHub)" <gi...@apache.org>.
solomax commented on code in PR #1621:
URL: https://github.com/apache/wicket/pull/1621#discussion_r4118354899
##########
testing/wicket-js-tests/Gruntfile.js:
##########
@@ -108,7 +113,9 @@ module.exports = function(grunt) {
all: {
options: {
urls: [
- 'http://localhost:38887/test/js/all.html?4.0.0'
+ 'http://localhost:38887/test/js/all.html?4.0.0',
+ 'http://localhost:38888/wicket-extensions/src/test/js/palette.html?4.0.0',
Review Comment:
these versions need to be manually maintained?
Can it be automated somehow? :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression tests for Wicket.Palette and Wicket.trapFocus focus handling [wicket]
Posted by "reiern70 (via GitHub)" <gi...@apache.org>.
reiern70 commented on code in PR #1621:
URL: https://github.com/apache/wicket/pull/1621#discussion_r4136187595
##########
testing/wicket-js-tests/Gruntfile.js:
##########
@@ -108,7 +113,9 @@ module.exports = function(grunt) {
all: {
options: {
urls: [
- 'http://localhost:38887/test/js/all.html?4.0.0'
+ 'http://localhost:38887/test/js/all.html?4.0.0',
+ 'http://localhost:38888/wicket-extensions/src/test/js/palette.html?4.0.0',
Review Comment:
We are not reading with jQuery we are using from some config file. I need to check if this can be configured. We are testing the same against jQuery 3 and jQuery 4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression tests for Wicket.Palette and Wicket.trapFocus focus handling [wicket]
Posted by "reiern70 (via GitHub)" <gi...@apache.org>.
reiern70 merged PR #1621:
URL: https://github.com/apache/wicket/pull/1621
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@wicket.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org