aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/dom
AgeCommit message (Collapse)AuthorFilesLines
2021-07-30Enable a few eslint-config-xo rules (#34620)XhmikosR2-5/+5
* unicorn/prefer-dom-node-append * unicorn/prefer-dom-node-remove
2021-07-28Fix `Manipulator.offset()` (#33603)alpadev1-0/+54
* test: add more test cases for Manipulator.offset() * fix: Manipulator.offset() is using obsolete properties to get scroll position Co-authored-by: XhmikosR <[email protected]> Co-authored-by: GeoSot <[email protected]>
2021-07-27Add shift-tab keyboard support for dialogs (modal & Offcanvas components) ↵Ryan Berliner1-0/+82
(#33865) * consolidate dialog focus trap logic * add shift-tab support to focustrap * remove redundant null check of trap element Co-authored-by: GeoSot <[email protected]> * remove area support forom focusableChildren * fix no expectations warning in focustrap tests Co-authored-by: GeoSot <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2021-04-19Fix regression for handling `mouseenter`/`mouseleave` events introduced by ↵alpadev1-1/+15
#33310 (#33679) * test: update spec for sibling adjacent mouseenter/mouseleave events there is a regression introduced by #33310 - this would have catched that * fix: fixup regression for mouseenter/mouseleave events introduced by #33310 the old logic only worked for parent-child movement since it checked for the relatedTarget to contain the delegateTarget - this should be fixed with this Co-authored-by: XhmikosR <[email protected]>
2021-04-13fix: make EventHandler better handle mouseenter/mouseleave events (#33310)alpadev1-1/+77
* fix: make EventHandler better handle mouseenter/mouseleave events * refactor: simplify custom events regex and move it to a variable
2021-03-02refactor: use a Map instead of an Object in dom/data (#32180)alpadev1-88/+63
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2020-12-07Remove `SelectorEngine.matches()`. (#32339)XhmikosR1-8/+0
It's basically unused.
2020-11-20Make the attribute methods bs specific (#32173)Rohit Sharma1-18/+22
Co-authored-by: XhmikosR <[email protected]>
2020-11-14Get only bs prefixed data attributesRohit Sharma1-18/+2
2020-11-14Add `bs` in data attributesRohit Sharma1-4/+20
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-02tests: tweak Jasmine usage (#32046)XhmikosR2-6/+6
* jasmine/expect-matcher * jasmine/prefer-jasmine-matcher Found with `eslint-plugin-jasmine`
2020-10-05Remove `Manipulator.toggleClass` (#31842)XhmikosR1-26/+0
It's only used in one place so it makes more sense to remove it for the time being.
2020-06-17data: reword storage key in domJohann-S1-7/+7
2020-03-25fix: remove make array util function (#30430)Johann-S1-6/+5
2020-03-23Use next dropdown menu instead of first of the parentMartijn Cuppens1-0/+39
2020-03-09`prev()` function fails when non-element nodes are present (#30117)Martijn Cuppens1-0/+15
The `prev()` function doesn't take nodes other than elements into account. Also we could simplify things a lot using the `previousElementSibling` property. This property isn't fully supported in IE, it only works for elements, but since the `element` variable is an element, we can safely use it here. I've also added an additional test. I don't think we had this issue in v4, since we relied on jQuery back then. Ref. https://developer.mozilla.org/en-US/docs/Web/API/NonDocumentTypeChildNode/nextElementSibling
2019-10-31Update normalizeDataKey to match the spec (#29609)Steffen Roßkamp1-10/+10
2019-10-09Rename "js/tests/units" to "js/tests/unit". (#29503)XhmikosR4-0/+731
2019-07-23rewrite unit tests for selector engineJohann-S1-77/+0
2019-07-23rewrite manipulator unit testsAnton Bershanskiy1-128/+0
2019-07-23Switch from QUnit to Jasmine.Johann-S2-423/+0
2019-07-17updated babelJohann-S1-10/+0
2019-05-08Rename `eventHandler` and `selectorEngine` files.XhmikosR2-0/+0
2019-02-20Improve manipulator coverageJohann-S1-1/+6
2019-02-20Remove IE support and button bsChecked hackAlessandro Chitolina1-46/+0
2019-02-20fix(selector-engine): increase coverage for selector engineJohann-S2-1/+78
2019-02-20fix(manipulator): increase coverage for manipulatorJohann-S1-0/+179
2019-02-20fix(data): increase coverage for dataJohann-S1-0/+83
2019-02-20Dropdown without jQueryJohann-S1-1/+0
2019-02-20allow register the same handler for different delegated selectors in ↵Alessandro Chitolina1-0/+70
eventHandler
2019-02-20tooltip without jqueryAlessandro Chitolina1-0/+14
2019-02-20Workaround for M$ Edge resetting defaultPrevented flag upon dispatchEventAlessandro Chitolina1-0/+18
2019-02-20Rewritten modal without jquery (#23955)Alessandro Chitolina1-0/+239
* Trigger jquery events if available in event handler * Rewritten modal without jquery