aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/dropdown.spec.js
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Rename `e` to `event` (#34979)XhmikosR1-14/+14
2021-07-22handle click event in one place, remove undocumented click listener on ↵GeoSot1-24/+2
element in case of not having the proper markup
2021-06-03Add `getOrCreateInstance` method in base-component (#33276)GeoSot1-0/+54
Co-authored-by: Rohit Sharma <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2021-05-22Automatically select an item in the dropdown when using arrow keys (#34052)alpadev1-8/+33
2021-05-13Move get element functionality to a helper (#33327)GeoSot1-1/+2
Looking around on js components I found out many checks, different expressed but with same purpose. Some of them are trying to parse string to element, others, jQuery element to js simple nodeElement etc With this Pr, I am trying to give a standard way to parse an element So this pr: * Creates `getElement` helper that tries to parse an argument to element or null * Changes `isElement` to make explicit checks and return Boolean * fixes tests deficiencies
2021-05-11Fix test warning for dropdown, without expectations (#33938)GeoSot1-0/+1
Co-authored-by: XhmikosR <[email protected]>
2021-05-11Fix: Click on input outside of dropdown-menu prevents dropdown from closing ↵alpadev1-2/+28
(#33920) * test: add test if user clicks on input not contained within dropdown-menu * fix: click on inputs that are not contained within dropdown-menu prevent dropdown from closing
2021-05-11Remove potential false positive assertions (#33288)Ben Lertlumprasertkul1-7/+7
* Remove potential false positive assertions querySelector() returns null but expect(document.querySelector('...')).toBeDefined() tests that the value is not undefined * Migrated assertions from .toBeDefined() to .not.toBeNull() for .getInstance() calls in tests * Migrate offcanvas assertions from .toBeDefined() to .not.toBeNull() for .getInstance() call * convert more cases to not.toBeNull assertions Co-authored-by: XhmikosR <[email protected]>
2021-04-25Add missing test for clicking select option in a dropdown (#33734)alpadev1-0/+41
2021-04-20Dropdown — Add option to make the dropdown menu clickable (#33389)Rohit Sharma1-4/+97
2021-04-11Update tests to check for `noop` to be removedRohit Sharma1-2/+3
2021-04-01Add missing things in `hide` method of dropdown (#33451)Rohit Sharma1-1/+35
* Update `aria-expanded` attribute in `hide` method * Remove empty mouseover listeners added for iOS
2021-04-01Fix dropdown escape propagation (#33479)alpadev1-0/+33
2021-03-23Allow data-toggle="dropdown" and form click events to bubbleCasey Holzer1-2/+49
* remove stopPropagation from button click event * test for delegated click events * ensure button children can open menu * test to ensure clicking button opens the menu * check current element and parents * allow dropdown form click events to bubble
2021-03-17Update unit tests for Popper V2 (#32662)Rohit Sharma1-1/+1
2021-02-22Allow constructors to accept a CSS selector (#32245)Rohit Sharma1-0/+18
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-16Add tests for `DATA_KEY` (#33090)GeoSot1-0/+6
Co-authored-by: XhmikosR <[email protected]>
2021-02-12Fix event handler removal in dropdown/carousel dispose (#33000)Kyle Tsang1-0/+5
* Fix event handler removal in carousel dispose * Fix event handler removal in dropdown dispose * Test event handlers in scrollspy dispose * Test event handlers in toast dispose * Test event handlers in tooltip dispose Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-09Add function type for `popperConfig` option (#32882)Rohit Sharma1-0/+22
* Add function type for `popperConfig` option * Update .bundlewatch.config.json * copy edits Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-09Remove .dropdown-menu[style] reset and adjust .dropdown-menu-* modifiersMark Otto1-1/+59
- Removes the &[style] selector that was used for resetting Popper styles - Separate Popper-based alignment from static alignment with `data-bs-popover` attribute that separates the --bs-position and custom right/left properties Co-Authored-By: Rohit Sharma <[email protected]>
2021-02-03Fix dropdown keys to open menu (#32750)Siju Samson1-0/+48
Co-authored-by: XhmikosR <[email protected]>
2021-02-03Dropdown — Emit events on the `.dropdown-toggle` button (#32625)Rohit Sharma1-103/+99
* Emit events on the dropdown button Emit the events on `.dropdown-toggle` button and then bubble up * Add migration note for events * Update the docs for events * Add unit test to check the event bubbling Co-authored-by: XhmikosR <[email protected]>
2021-01-28Restore offset option for dropdown componentjoke2k1-0/+48
2021-01-13Throw a `TypeError` instead of the generic `Error` (#32585)Rohit Sharma1-6/+4
* Change from Error to TypeError * Convert the `NAME` to upper case to make the consistency in the error message * Update the remaining tests to be stricter Co-authored-by: XhmikosR <[email protected]>
2020-12-21Support Popper virtual elements (#32376)Nils K1-0/+52
Adds the ability to use objects implementing the virtual element interface as the value for the reference option of a dropdown config. Co-authored-by: XhmikosR <[email protected]>
2020-12-06Update to popper.js v2.xJohann-S1-93/+2
2020-12-04feat(RTL): implement RTLGaël Poupard1-10/+10
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-11-29Switch to Jasmine's `toBeInstanceOf` matcherXhmikosR1-1/+1
2020-11-29create a base componentJohann-S1-0/+1
2020-11-21Be consistent with Popper's name. (#32224)XhmikosR1-7/+7
The npm package is named "popper.js" but the project is named "Popper", so use the latter consistently.
2020-11-14Add `bs` in data attributesRohit Sharma1-106/+106
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-02tests: tweak Jasmine usage (#32046)XhmikosR1-2/+2
* jasmine/expect-matcher * jasmine/prefer-jasmine-matcher Found with `eslint-plugin-jasmine`
2020-05-06tests: streamline HTML end tags (#30648)XhmikosR1-4/+4
2020-04-24Remove caret element (#30633)Tanguy Krotoff1-1/+1
2020-04-17Fix crash when pressing ArrowUp the first timeTanguy Krotoff1-0/+28
2020-04-17Replace event.which with event.key and event.buttonTanguy Krotoff1-56/+52
2020-03-23Use next dropdown menu instead of first of the parentMartijn Cuppens1-27/+27
2020-02-01tests: Remove button `href`s (#30119)Martijn Cuppens1-50/+50
2019-10-17Skip hidden dropdowns while focusing (#29523)Jeremy Jackson1-0/+37
2019-10-09Rename "js/tests/units" to "js/tests/unit". (#29503)XhmikosR1-0/+1564