aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog
Commit message (Collapse)AuthorAgeFilesLines
* Build: Migrate from JSHint & JSCS to ESLintMichał Gołębiowski-Owczarek2021-06-076-8/+11
| | | | | Fixes #15393 Closes gh-1958
* Tests: Fix the "dialog: core: focus tabbable" test in IEMichał Gołębiowski-Owczarek2021-03-161-6/+26
| | | | | | | | | | | | | In IE in jQuery 3.4+ a sequence: ```js $( inputNode ).trigger( "focus" ).trigger( "blur" ).trigger( "focus" ); ``` doesn't end up with a focused input. However, in this test we only want to check that the last focused input receives the focus back when `_focusTabbable()` is called which in reality doesn't happen so quickly so let's avoid the issue by waiting a bit. Ref jquery/jquery#4856 Closes gh-1951
* Tests: Ensure no timers are running at the end of each test (#1920)Michał Gołębiowski-Owczarek2020-05-165-9/+14
| | | | | | | | | | | | | 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: Remove usage of jQuery positional selectorsMichał Gołębiowski-Owczarek2020-01-221-1/+1
| | | | | | | | | | | | | | | | | jQuery positional selectors () have been deprecated in [jQuery 3.4.0](https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/) and they'll be removed in jQuery 4.0.0. This PR removes their usage. Most of the changes were possible without changing public API. However, dropping `:even` usage required a change to the [`header` option](https://api.jqueryui.com/accordion/#option-header) of the accordion widget. I made it an optional function; this will need to be documented. The polyfill for `.even()` & `.odd()` is added for jQuery <3.5.0. There was no usage of the :odd selector in the code but the `.odd()` method is also polyfilled for completeness. Closes gh-1904
* All: Migrate away from deprecated/removed Core APIsMichał Gołębiowski-Owczarek2019-12-082-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Dialog: Fix code styleScott González2016-08-311-2/+2
|
* Dialog: Allow for subpixel calculation errors in testsScott González2016-08-311-7/+8
| | | | | | Tests were failing in IE 10-11 with values that were off by 0.01 pixels. Closes gh-1737
* Dialog: Support deprecated button optionsScott González2016-07-251-0/+30
| | | | | Fixes #15016 Closes gh-1723
* Dialog: Shift to use no globalsAmanpreet Singh2016-04-146-431/+454
|
* Dialog: Escape closeText option before passing it to buttonJörn Zaefferer2015-10-281-1/+6
| | | | | Ref gh-1632 Fixes jquery/api.jqueryui.com#281
* Tests: Fix button space assertions on IE8Jörn Zaefferer2015-10-251-4/+4
| | | | | IE8 still doesn't keep the space in the text (or HTML) representation. We don't really care, so adding more trims in these tests as well.
* Dialog: address review commentsAlexander Schmitz2015-10-081-4/+4
|
* Dialog: Updating dialog and tests for new button APIAlexander Schmitz2015-10-071-10/+8
|
* Dialog: Style updatesAlexander Schmitz2015-09-118-681/+687
| | | | Ref #14246
* Dialog: Style updatesAlexander Schmitz2015-08-215-7/+7
| | | | | Ref #14246 Ref gh-1588
* Effects: Move individual effects into effects folderAlexander Schmitz2015-08-081-2/+2
| | | | Ref #13885
* Dialog: Move dialog into widgets folderAlexander Schmitz2015-08-088-8/+8
| | | | Ref #13885
* Dialog: Remove core event/alias and deprecated module dependenciesAlexander Schmitz2015-05-204-24/+24
|
* Tests: Fix AMD loading in IE8Scott González2015-04-172-0/+2
| | | | | It appears that we must load require.js via a standard script tag in order for it to work properly in IE8.
* Tests: Rename filesScott González2015-04-099-2/+2
| | | | Ref gh-1528
* Tests: Widget test helpers extend the main helperScott González2015-04-093-39/+41
| | | | | Ref #10119 Ref gh-1528
* Dialog: Convert tests to new infrastructureScott González2015-04-0910-133/+92
| | | | | Ref #10119 Ref gh-1528
* Tests: Convert closeEnough() to a proper QUnit assertionScott González2015-04-091-31/+31
| | | | | | | Should eventually replace with qunit-assert-close. Ref #10119 Ref gh-1528
* Tests: Switch to the new qunit-composite moduleScott González2015-04-071-2/+2
| | | | | | This module was created from our existing implementation. Closes gh-1532
* Tests: Handle jQuery git returning `null` for empty attributesScott González2015-03-251-1/+1
| | | | | | jQuery now returns `null` for empty attributes instead of `undefined`. Closes gh-1516
* Draggable: Use new has/lacksClasses assertions for all class checksAlexander Schmitz2015-03-111-1/+1
|
* Dialog: Use new has/lacksClasses assertions for all class checksAlexander Schmitz2015-03-115-21/+18
|
* Dialog: Add classes optionAlexander Schmitz2015-03-117-24/+200
| | | | | Ref #7053 Ref gh-1411
* Widget: Add classes option and _add/_remove/_toggleClass methodsAlexander Schmitz2015-03-111-0/+1
| | | | | Fixes #7053 Closes gh-1411
* Dialog: Remove animation stopping in destroyScott González2015-03-112-10/+0
| | | | | | | | | | | Effects wrappers are no longer used, so the workaround and test are no longer necessary. This fixes tests in IE8 with jQuery 1.7. Effectively a complete revert of 13505e5945e5532c3d56424d50ad109c665d205f Closes gh-1481
* Dialog: Fix focus tests in IE8 with jQuery 1.7Scott González2015-03-111-42/+46
| | | | Ref gh-1481
* Tests: Reduce timeouts to optimize testsuite runtimeJörn Zaefferer2015-03-042-2/+2
|
* Tests: Fix style issues with missing or multiple line breaksJörn Zaefferer2015-01-241-1/+0
| | | | | As pointed out by jscs, after a esformatter run. The latter doesn't address these, so fixing them manually.
* All: Drop support for IE7Scott González2014-10-212-5/+6
| | | | | Fixes #9838 Closes gh-1365
* Dialog: Remove leftover backcompat flag in testsScott González2014-10-201-3/+0
|
* Build: Pull in jquery.simulate.js from BowerMike Sherov2014-08-221-1/+1
| | | | Fixes #10563
* Tests: Fix composite testsScott González2014-08-011-1/+1
|
* Build: Reorganize external directoryScott González2014-06-242-4/+4
| | | | | | | Put each external library into its own directory. Move jquery.js to external. Ref gh-1266
* Dialog: Honor preventDefault when managing focusJörn Zaefferer2014-06-101-2/+25
| | | | | | | | If event.isDefaultPrevented() is true, the focus management is completely skipped, assuming the user manages focus manually. Fixes #10103 Closes gh-1265
* Dialog: Fix shift-tab handling, focus the correct elementJörn Zaefferer2014-06-101-7/+9
| | | | | | | | | | | Copy-paste error introduced in df6110c0d424ff3306fdd5576011f2dcf4d242d0 Updates the tabbing test to be more specific about which element should have focus, instead of only checking if focus is within the dialog. Ref #9646 Ref #10103 Closes gh-1264
* All: Rename jquery.js to exclude version in filenameJörn Zaefferer2014-03-051-1/+1
|
* Dialog: Work around subpixel issues in dialog resizable testJörn Zaefferer2014-02-201-4/+7
| | | | | | | | | Switching to checking the size of the content element. We should be checking the dimensions of the .ui-dialog element, but that currently fails in Chromium-based browsers. Once we start using box-sizing: border-box, we should try to revert this change. Ref #9845
* Tests: Update to sane QUnit markupJörn Zaefferer2014-02-202-10/+2
|
* Tests: Fix andenable a couple of unit tests: dialog, tooltip, draggableBrian J. Dowling2014-02-112-3/+3
| | | | | | | | Some unit tests were disabled in phantomjs. Dialog and draggable depended on a larger viewPort. Tooltip just worked, that was reenabled as well. Closes gh-1173
* All: Rename all files, removing the "jquery.ui." prefix;Rafael Xavier de Souza2014-01-241-13/+13
| | | | | | | - By executing https://gist.github.com/jzaefferer/893fcf70b7eebc1dc271; Fixes #9464 Closes gh-1029
* Dialog: Keep track of instances to focus when elements outside the dialog ↵Jörn Zaefferer2013-11-201-0/+48
| | | | get focus. Works with inheritance. Adds tests for both. Fixes #9241 - Dialog: UI dialog inheritance causes undefined property '_focusTabbable' in IE9
* Dialog: Restore focus to the previously focused element when window regains ↵Jörn Zaefferer2013-11-151-14/+34
| | | | focus. Fixes #9101 - Dialog: Track last focused element instead of always focusing the first tabbable element
* Dialog tests: Work around focus issue in IE8.Scott González2013-11-141-0/+5
|
* Dialog test: Ensure dialog is tall enough to be scrolled.Scott González2013-11-141-0/+2
|
* Dialog: Switch back to shuffling z-index, but only look at .ui-front siblings.Jörn Zaefferer2013-10-021-4/+17
| | | | | Fixes #9166 - Dialog: moveToTop implementation resets flash/video/iframe/scroll Fixes #9364 - Dialog: Click of element with tooltip scrolls the dialog to the top