aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Tabs: Use `CSS.escape` for sanitizing selectorsMichał Gołębiowski-Owczarek2024-10-272-2/+32
| | | | | | The previous private `_sanitizeSelector` API was not correctly escaping backslashes and is now removed. The native API should always be correct. Closes gh-2307
* Tests: Fix titles of `jquery-patch.js` testsMichał Gołębiowski-Owczarek2024-10-252-2/+2
| | | | | The pages were erroneously titled after "Form Reset Mixin". Closes gh-2308
* Demos: Remove deprecated button APIsMichał Gołębiowski-Owczarek2024-09-301-7/+3
| | | | | | | | Remove usage of deprecated button options: * `icons`: https://jqueryui.com/upgrade-guide/1.12/#deprecated-icons-options-in-favor-of-icon-and-iconposition * `text`: https://jqueryui.com/upgrade-guide/1.12/#deprecated-text-option-in-favor-of-showlabel Fixes gh-2295 Closes gh-2296
* Effect: Remove demos & visual tests of the transfer effectMichał Gołębiowski-Owczarek2024-09-162-14/+0
| | | | | | | | | The transfer effect is deprecated and not present unless `$.uiBackCompat` is set to `true`. In previous UI versions, the default was including the backwards compat layer so these demos & tests worked; now they do not by default. Just remove them. Fixes gh-2278 Closes gh-2291
* Resizable: Fix content shrink on resizeDaniel García2024-09-092-7/+123
| | | | | | | Make resizable elements not shrink on resize when they have scrollbars and "box-sizing: content-box". Fixes: gh-2277 Closes gh-2281
* Dialog: Add option to put the dialog title in a header elementRalf Koller2024-09-093-0/+40
| | | | | | | | | Implement a new option: `uiDialogTitleHeadingLevel`, allowing to change the `span` wrapping the dialog title into a heading element (`h1`-`h6`). Value `0` represents the `span`, values 1-6 - a heading at the specified level. Fixes gh-2271 Closes gh-2275
* Tests: Properly check `$.uiBackCompat` in common widget testsMichał Gołębiowski-Owczarek2024-09-091-3/+14
| | | | | | | | | | | | | The "common widget" tests, checking if a widget doesn't overwrite some core widget APIs wasn't running as it was incorrectly checking for `$.uiBackCompat === false` instead of `$.uiBackCompat !== true` after the default changed in gh-2250. Fixing the check uncovered that the draggable & sortable modules do overwrite the `_trigger` method. Add an exception in the test for that; at this stage of the project we don't plan to change the implementation. Closes gh-2286 Ref gh-2250
* Datepicker: Hide the UI on destroyPorter Clevidence2024-08-051-1/+10
| | | | | | | | | | | | When the datepicker UI is shown and then destroyed programmatically: ```js $( "#datepicker" ).datepicker( "destroy" ); ``` hide the datepicker UI without the need for an explicit user action. Previously, in 1.12 the UI would not disappear immediately but only after the first `mousedown`. In later 1.13 versions, the UI would not disappear at all. Fixes gh-2178 Closes gh-2268
* Tests: Update jQuery Migrate from 3.4.1 to 3.5.2, simplify Migrate setupMichał Gołębiowski-Owczarek2024-07-301-2/+2
| | | | | | | | Apart from updating jQuery Migrate, the setup is now changed so that exact Migrate versions are only references when fetching npm packages; other than that, they're represented as `jquery-migrate-1.x` & `jquery-migrate-3.x`. This will allow smaller changes when updating jQuery Migrate in the future. Closes gh-2273
* Dialog: Add aria-modal supportRalf Koller2024-06-141-0/+33
| | | | | | | | | | | | Reflect the `modal` dialog option into the `aria-modal` attribute - when `modal` is `true`, set `aria-modal` to `"true"`. This helps some accessibility tools like VoiceOver with their rotor functionality as it reduces the number of elements presented. Fixes gh-2246 Closes gh-2257 Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
* Tests: remove testswarm grunt taskTimmy Willison2024-06-111-3/+0
| | | Closes gh-2263
* Tests: remove code supporting jenkins and testswarmTimmy Willison2024-05-152-14/+4
| | | Close gh-2251
* Tests: Fix form-reset-mixin test module name, add to the tests HTMLMichał Gołębiowski-Owczarek2024-05-152-1/+2
| | | | Ref gh-2249
* All: Remove the deprecated `ui/core.js` fileMichał Gołębiowski-Owczarek2024-05-151-10/+4
| | | | | | Also, fix checkboxradio visual tests. Ref gh-2249
* All: Stop relying on jquery-patch.js internally, add testsMichał Gołębiowski-Owczarek2024-05-158-9/+207
| | | | | | | | | | | | Avoid relying on jQuery patches. Instead: * use `CSS.escape` instead of `jQuery.escapeSelector` * use `.filter()` with a proper handler instead of `.even()` Keep `jquery-patch.js` for backwards compatibility, though. Also, add tests for jquery-patch. Ref gh-2249
* All: Drop support for IE & some other browsers (but mostly IE)Michał Gołębiowski-Owczarek2024-05-1516-304/+170
| | | | Closes gh-2249
* All: Drop support for jQueries different than the latest for each majorMichał Gołębiowski-Owczarek2024-05-1512-156/+32
| | | | | | Also, remove the ability to run the test suite in jQuery <1.12.4 & <2.2.4. Closes gh-2249
* Core: Make back compat disabled by defaultMichał Gołębiowski-Owczarek2024-05-136-17/+18
| | | Closes gh-2250
* Docs: Update leftover HTTP Trac URLs to HTTPSMichał Gołębiowski-Owczarek2024-04-264-15/+15
|
* Docs: Change a few most common domains from HTTP to HTTPSMichał Gołębiowski-Owczarek2024-04-2610-21/+21
| | | | | Also, update a few stale URLs to what they redirect now to. Closes gh-2244
* Tests: Skip a problematic keyboard test in IE with jQuery 3.6Michał Gołębiowski-Owczarek2024-04-121-1/+7
| | | | | | jQuery 3.6 has issues with focus handling in IE which breaks this test. The issues were fixed in jQuery 3.7, so we just accept them here. Closes gh-2231
* Tests: Increase robustness of a draggable `revert` testMichał Gołębiowski-Owczarek2024-04-121-2/+3
| | | | | | | | One of the changes is increasing `revertDuration` from 200 to 300. For some reason, when jQuery 3.1 is used in an iframe (which TestSwarm uses) the timings are lower than expected and `setTimeout` too slow and the check for animation happens too late. Closes gh-2230
* Tests: Workaround a jQuery 1.8 issue with one dialog testMichał Gołębiowski-Owczarek2024-04-121-0/+18
| | | | | | | The test "#8958: dialog can be opened while opening" had special behavior in jQuery 1.8 and the patch from commit 7adb13ac7c30a7ba33f1db256952be77b9e7a310 broke those assumptions. Adjust the test so that it passes again. Closes gh-2229
* Tests: align test runner with other reposTimmy Willison2024-04-0917-240/+882
| | | Close gh-2234
* Tests: replace grunt-contrib-qunit with jQuery test runnerTimmy Willison2024-03-2922-13/+1217
| | | | | - add filestash workflow Close gh-2221
* Tests: Fix tests with the Git Core buildMichał Gołębiowski-Owczarek2024-03-261-1/+2
| | | | | | jQuery PR jquery/jquery#5452 removed special handling of boolean attributes. Thankfully, this only broke a single jQuery UI test. Closes gh-2220
* Build: Add jQuery 3.7.0Michał Gołębiowski-Owczarek2023-05-123-1/+3
|
* Tests: Workaround IE issues in qunit-assert-domequalMichał Gołębiowski-Owczarek2023-05-101-16/+19
| | | | | | | | | | In IE, `option` elements may have different initial `option` colors. They may initially all be transparent, but later the selected option gets a blue background with white text; we now ignore it. The logic of `qunit-assert-domequal` was also fixed to use the same method of fetching styles in all browsers; IE used to get a legacy one meant for IE <9 due to a mistake in the performed check.
* Tests: Make resizable tests a bit more forgivingMichał Gołębiowski-Owczarek2023-05-101-6/+16
|
* Tests: Workaround a dialog test issue by a proper cleanupMichał Gołębiowski-Owczarek2023-05-101-2/+9
| | | | | The `#favorite-animal` focus & blur handlers used to not be cleaned up after the test automatically, leading to issues with some jQuery versions.
* Tests: Fix selectmenu width tests in Firefox with jQuery 3.0 & 3.1Michał Gołębiowski-Owczarek2023-05-101-2/+3
| | | | | | | | jQuery 3.0 & 3.1 used `getBoundingClientRect()` in its `width`/`height` calculations and that causes minor differences in fractional width computations. Allow a tiny delta in tests to fix those tests breaking in Firefox. Ref jquery/jquery#3561 Closes gh-2159
* Selectmenu: Fix selecting options following hidden onesMichał Gołębiowski-Owczarek2023-05-101-3/+62
| | | | | | | | | | | Change a2b25ef6caae3e1a272214839b815a6387618124 made options with the `hidden` attribute skipped when rendering. However, that makes indexes misaligned with native options as hidden ones maintain their index values. Instead, don't skip hidden options but add the `hidden` attribute to the respective jQuery UI elements as well. Fixes gh-2082 Closes gh-2144 Ref a2b25ef6caae3e1a272214839b815a6387618124
* Build: Add jQuery 3.6.4, update Migrate to 3.4.1Michał Gołębiowski-Owczarek2023-05-103-4/+4
| | | Closes gh-2161
* Build: Fork vendors to remove QUnit deprecated API usageMichał Gołębiowski-Owczarek2023-05-1036-69/+920
| | | | | | | | | | | | Changes: * add `tests/lib/vendor/**/*` to `.eslintignore` * move `qunit-composite` to `tests/lib` so that we can modify it * move `qunit-assert-classes` to `tests/lib` so that we can modify it * move `qunit-assert-close` to `tests/lib` so that we can modify it * replace `assert.push` with `assert.pushResult` * remove usage of `QUnit.extend` Closes gh-2157
* Tests: Make Puppeter really fire Chrome on macOSMichał Gołębiowski-Owczarek2023-05-102-0/+22
| | | | | | | | | | | Also, workaround issues with QUnit Chrome bridge: the Chrome bridge from `grunt-contrib-qunit` is now getting injected into every single iframe, including an empty one that has no intention of running QUnit tests. Since that bridge requires QUnit, it fails with an error in such cases. Workaround the issue by wrapping the bridge in another function that bails early if QUnit is not defined. Ref gh-2157
* Tests: Switch from QUnit.jsDump to QUnit.dumpMichał Gołębiowski-Owczarek2023-05-101-1/+1
| | | | | | `QUnit.jsDump` was renamed to `QUnit.dump` in QUnit 2.0. Ref gh-2157
* Tests: Fix tooltip tests by destroying tooltipsMichał Gołębiowski-Owczarek2023-05-105-5/+34
| | | | | | | Some tests were not properly destroying tooltips which made tests start to fail with the new QUnit. Ref gh-2157
* Demos:Tests: Avoid self-closing HTML tagsMichał Gołębiowski-Owczarek2023-05-103-15/+15
| | | | | | | | | Self-closing tags are reported by newer versions of the htmllint Grunt plugin. They also don't make sense in our HTML files since they are not XHTML-compliant and they run in HTML mode anyway. Ref gh-2157
* Tests: Test only valid values for Datepicker defaultDate, min/maxDateKenneth DeBacker2023-03-301-14/+14
| | | | | | | The docs say that valid periods when using string value and period pairs as relative dates are "y", "m", "w", and "d" https://api.jqueryui.com/datepicker/ Closes gh-2143
* Build: Add jQuery 3.6.1-3.6.3, update Migrate to 3.4.0Michał Gołębiowski-Owczarek2023-01-153-4/+4
|
* Resizable: Fix resizing of elems with `box-sizing: border-box`Matías Cánepa2022-10-101-0/+26
| | | | Fixes gh-1979 Closes gh-2012
* Checkboxradio: Don't re-evaluate text labels as HTMLMichał Gołębiowski-Owczarek2022-07-143-0/+87
| | | | | | | | | | | | | If you generate a Checkboxradio from a checkbox/radio with a label that contains encoded HTML, e.g. `&lt;em&gt;test&lt;/em&gt;` this will work fine at first. If, however a refresh is triggered on that instance (explicitly or e.g. by turning it into a `Controlgroup`), the previously escaped HTML will now be evaluated. If the label was created based on some user input, this could lead to unexpected code execution even though the initial output was escaped. Fixes gh-2101 Closes gh-2102
* All: Remove deprecated .click() usage in demos/testsMichał Gołębiowski-Owczarek2022-07-141-1/+1
|
* Widget: Optimize attachment of the _untrackClassesElement listenerMichał Gołębiowski-Owczarek2022-01-153-0/+105
| | | | | | | | | | | | | | | jQuery UI 1.13.0 changed the logic attaching the `_untrackClassesElement` listener in the `_classes` widget method; one of the side effects was calling `this._on` for each node that needed the listener. That caused a severe performance degradation for large comboboxes as each `_on` jQuery UI call causes a jQuery `add` call that calls Sizzle's `uniqueSort` underneath. Instead, collect the nodes that need the listener and then, outside of the loop, create a jQuery object out of them and attach the listener once. That's still slower than the jQuery 1.12 version but only slightly: 936 ms to 1.03s on a very large list on a recent MacBook Pro, compared to ~30 seconds before this patch. Fixes gh-2014 Closes gh-2037
* Autocomplete: Rewrite with a delay instead of appending the live regionBen Mullins2022-01-051-34/+46
| | | | | | | | | This fixes the issue caused by https://bugs.jqueryui.com/ticket/9357. We now empty the live region instead of appending to it, and we do so after a brief timeout so the live region isn't updated on every mousemove event or when quickly traversing through options. Fixes gh-2002 Closes gh-2031
* Widget: Make contextless widget construction workMichał Gołębiowski-Owczarek2021-11-191-0/+12
| | | | | | | | | | | | | | Due to the fact the widget factory code is now in strict mode, the check for being called without using the `new` keyword started breaking if you save the widget constructor to a variable before calling it: ```js var customWidget = $.custom.customWidget; customWidget( {}, elem ); ``` as then `this` is undefined and checking for `this._createWidget` crashes. Account for that with an additional check. Fixes gh-2015 Closes gh-2019
* Sortable: Fix positioning when moving a Draggable item into a SortableMichał Gołębiowski-Owczarek2021-11-151-0/+57
| | | | | | | | | PR gh-1793 removed setting `this.offset.parent` in the Draggable `refreshPositions` method which broke position calculations when moving a Draggable item into a connected Sortable. restore that assignment. Ref gh-1793 Fixes gh-2001 Closes gh-2009
* Sortable: Allow 0-height containers to be sortable as in 1.12.1Michał Gołębiowski-Owczarek2021-11-081-0/+53
| | | | | | | | | Note that container specific events will not fire when the dragged element is interacting with zero height containers. Fixes gh-1998 Closes gh-2008 Co-authored-by: A. Wells <borgboyone@users.noreply.github.com>
* Tooltip: Don't crash on empty contentJosep Sanz2021-11-081-0/+70
| | | | | | | | | | | | | | | Commit 1f2011ece removed a `try-catch` around triggering the `remove` handlers in the `jQuery.cleanData` override. The `try-catch` was meant for old IE but it was also catching an error coming from the tooltip `remove` handler depending on being able to find a relevant tooltip. The `_find` method returns `null`, though, when the tooltip cotent is empty. Instead of restoring the `try-catch`, handle the `null` case in the `remove` handler. Fixes gh-1990 Closes gh-1994 Co-authored-by: Claas Augner <github@caugner.de> Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
* Tests: Take development jQuery versions from releases.jquery.comMichał Gołębiowski-Owczarek2021-09-291-2/+2
| | | | code.jquery.com is now used just for the specific versions.