aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/widget/core.js
Commit message (Collapse)AuthorAgeFilesLines
* Widget: Don't let widget name affect `$.ui` prototype & constructorMichał Gołębiowski-Owczarek2024-10-301-0/+22
| | | | | | This is an edge case and it only affects code accepting untrusted input as a widget name, but it's still technically correct to filter these out. Closes gh-2310
* All: Drop support for IE & some other browsers (but mostly IE)Michał Gołębiowski-Owczarek2024-05-151-3/+1
| | | | Closes gh-2249
* 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
* Build: Migrate from JSHint & JSCS to ESLintMichał Gołębiowski-Owczarek2021-06-071-3/+2
| | | | | Fixes #15393 Closes gh-1958
* Tests: Ensure no timers are running at the end of each test (#1920)Michał Gołębiowski-Owczarek2020-05-161-1/+3
| | | | | | | | | | | | | This helps fix issues that make tooltip tests sometimes fail when run against jQuery 3.2 or newer due to timing differences. Details: * Add the `moduleAfterEach` function ensuring no timers are running. * Attach this function via `common.testWidget`. * Attach this function to most test suites. * Add a tooltip test helper cleaning up leftover timers. * Rename legacy `setup`/`teardown` hooks to `beforeEach`/`afterEach`. Closes gh-1920
* All: Migrate away from deprecated/removed Core APIsMichał Gołębiowski-Owczarek2019-12-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Build: Add jQuery 3.2.0-3.4.1 to versions UI can be tested against * Build: Load jQuery & Migrate via HTTPS * Build: Add package-lock.json to .gitignore * Build: Update jQuery Migrate from 3.0.0 to 3.1.0 * Build: Allow to run tests against jQuery 3.x-git * Build: Fix formatting according to JSCS rules * Build: Disable JSCS for the inlined jQuery Color * All: Switch from $.isArray to Array.isArray (jQuery.isArray will be removed in jQuery 4.0) * All: Switch from `$.isFunction( x )` to `typeof x === "function"` (jQuery.isFunction will be removed in jQuery 4.0) * All: Inline jQuery.isWindow as it'll be removed in jQuery 4.0 * Effects: Fix a timing issue in a variable declaration. Previously, a jQuery object was created, chained & assigned to a variable that was then accessed in a callback used inside of this chained definition. Due to a timing difference in when the callback fired for the first time in latest jQuery master, it was being called before the variable was defined. * Tests: Make dialog & draggable unit tests less strict (newest jQuery returns fractional results in some cases, making comparisons fail when there's a tiny difference) * All: Migrate from $.trim to bare String.prototype.trim (jQuery.trim will be deprecated in jQuery 3.5) Closes gh-1901
* Widget: `instance()` should return `undefined` for empty setsScott González2016-08-041-3/+5
| | | | Fixes #15019
* Widget: Shift to use no globalsAmanpreet Singh2016-04-141-352/+354
|
* Widget: Call `._setOptionDisabled()` on init if the widget is disabledScott González2015-09-251-0/+33
| | | | | Fixes #9151 Ref gh-1599
* All: Delegate to base `_getCreateOptions()`.Scott González2015-09-171-1/+4
| | | | | | | Ensures that any extensions to the base widget will be handled properly by individual widgets. Closes gh-1598
* Widget: Style updatesAlexander Schmitz2015-09-111-207/+214
| | | | Ref #14246
* Widget: Remove core event/alias and deprecated module dependenciesAlexander Schmitz2015-05-201-14/+14
|
* Widget: Support mixinsScott González2015-05-141-0/+79
| | | | | Fixes #12601 Closes gh-1554
* Widget tests: Clean up $.fn methodsScott González2015-05-131-0/+8
|
* Tests: Rename filesScott González2015-04-091-0/+1514
Ref gh-1528