aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/helper.js
Commit message (Collapse)AuthorAgeFilesLines
* Spinner: Prevent double mousewheel & wheel event handlingMichał Gołębiowski-Owczarek2025-03-211-0/+59
| | | | | | | | | | | | | | | | | As of gh-2338, if one has loaded the jQuery MouseWheel plugin, the `mousewheel` handler would fire the `wheel` one, but the `wheel` one would also run in response to the native `wheel` event, resulting in double the distance handled by the spinner. To prevent the issue, only fire the `wheel` handler from inside the `mousewheel` on if the event was triggered by jQuery - jQuery will not care that the underlying event is `wheel` and will only fire handlers for `mousewheel`. Also, add an iframe test using jQuery MouseWheel to not affect all the other tests. Plus, migrate from `QUnit.reset` to `QUnit.done` (see qunitjs/qunit#354). Closes gh-2342 Ref gh-2338
* Tests: Ensure no timers are running at the end of each test (#1920)Michał Gołębiowski-Owczarek2020-05-161-1/+24
| | | | | | | | | | | | | 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
* Tests: Style updatesAlexander Schmitz2015-08-211-4/+4
| | | | | Ref #14246 Ref gh-1588
* Tests: Remove core event/alias and deprecated module dependenciesAlexander Schmitz2015-05-201-2/+2
|
* Tests: Change test infrastructure to use AMD and reduce boilerplateScott González2015-04-091-0/+33
Ref #10119 Ref gh-1528 * Adds RequireJS and relies on AMD for loading dependencies. * Updates to grunt-contrib-qunit 0.6.0. * Convert `domEqual()` to a proper QUnit assertion. * Introduces two bootstrap files (JS and CSS) which use `data-` attributes to reduce the amount of boilerplate needed in each test