aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/dropdown.js
AgeCommit message (Collapse)AuthorFilesLines
2019-07-23rewrite dropdown unit testsJohann-S1-1496/+0
2019-07-14Fix dropdown unit test (#29037)Patrick H. Lauke1-3/+4
swap jQuery's `trigger(...)` with the more verbose native `dispatchEvent(...)`, as the former may not always behave/bubble correctly (observed while trying to write unit tests for keyboard handling of ARIA tab navigation), which may lead to this test passing even though it fails in real usage.
2019-06-25Port new unit test for dropdown from v4 (#28913)Patrick H. Lauke1-0/+25
Add unit test from #28912 to v5
2019-06-19Closing dropdown with ESC correctly sets focus to toggle (#28928)Patrick H. Lauke1-0/+39
Just firing the focus event isn't enough ... need to actually call the proper `focus()` method for it to actually do it...
2019-03-11Comply to the new rules.XhmikosR1-3/+3
2019-02-27tests: add tests for plugins version. (#28366)XhmikosR1-0/+5
2019-02-20bump to 4.2.1Johann-S1-2/+2
2019-02-20chore(update): bump to 4.1.3Johann-S1-47/+20
2019-02-20fix(unit-test): dropdown, collapse and carouselJohann-S1-6/+15
2019-02-20fix(event-handler): remove the use of our event handler in unit testJohann-S1-74/+74
2019-02-20fix(data): do not use data object in our unit testsJohann-S1-4/+6
2019-02-20remove old references to jquery and some fixesJohann-S1-4/+4
2019-02-20upgrade to v4 stableJohann-S1-5/+5
2019-02-20Dropdown without jQueryJohann-S1-81/+104
2019-02-19Remove incorrect aria-haspopup from dropdown toggles (#28299)Patrick H. Lauke1-1/+1
`aria-haspopup` use requires the use of an ARIA `menu`, `listbox`, `tree`, `grid` or `dialog` (see https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup) in our use (as generic disclosure widgets), it's incorrect and sets up the wrong assumption/behavior from assistive technologies. in future, we likely want to change our dropdowns to essentially be like a `dialog` - move focus to it when opened, possibly make it modal so focus is maintained inside it and the rest of the page is hidden/inert. but for now, removing the incorrect attribute is probably the quickest, most immediate fix.
2019-02-05Move dropdown offset function logic into private function. (#28138)Jason Golieb1-0/+55
2018-10-20Add `show` and `hide` methods to dropdown (#27370)galczo51-0/+264
2018-09-13throw error when folks try to use a bad selectorJohann-S1-24/+0
2018-06-25feat(dropdown): add original click eventjakubhonisek1-0/+68
2018-05-22chore(deps): update qunit and karma-qunitJohann-S1-0/+1
2018-04-13fix issue related to Object.keys and Dropdown issueJohann-S1-21/+21
2018-04-10v4 improve coverage (#25945)Johann-S1-0/+112
* Improve code coverage for our Button plugin * improve coverage for our Alert plugin * test tooltip update method * test update and dispose for dropdown * increase code coverage requirements
2018-03-26Fix skip element disabled via attribute when using keyboard navigationvsn4ik1-19/+21
2018-02-11Dropdown - Allow to disable Popper.js style (#24092)Johann-S1-0/+30
* Dropdown - Allow to disable Popper.js style * Update dropdown.js * Update dropdown.html * copy changes
2018-01-11Comply to the new rules.XhmikosR1-382/+418
2017-12-12dropdown: add boundary config option (#24976)Troy Morehouse1-0/+44
2017-10-27Fix unit tests.Johann-S1-141/+184
2017-10-27Dropdown handle keydown on input and textarea.Pierre-Denis Vanduynslager1-5/+141
2017-08-23Tweak ESLint rules.XhmikosR1-2/+2
2017-07-04Dropdown - Disable applyStyle modifier instead of removing inline style ↵Johann-S1-0/+29
applied by Popper.js
2017-06-14Fix unit tests with no assertionJohann-S1-11/+23
2017-05-14Fix unit tests + Update Popper to 1.6.0Johann-S1-24/+24
2017-02-08Fixes #21941Pierre-Denis Vanduynslager1-5/+11
2017-01-20Harmonize document.activeElement comparisonPierre-Denis Vanduynslager1-3/+3
2017-01-20Refactor test to event and asyncPierre-Denis Vanduynslager1-64/+141
2017-01-20Add unit test for keyboard navigationPierre-Denis Vanduynslager1-0/+34
2017-01-20Fix test to retrieve the proper item instead of it's parentPierre-Denis Vanduynslager1-1/+1
2017-01-06Update dropdown unit test to new markupPierre-Denis Vanduynslager1-137/+136
2017-01-02Dropdown: close menu when focusing outside element (#21375)Pierre-Denis Vanduynslager1-0/+60
* Close dropdown menu when focusing an outside element * Update unit test to new markup
2016-12-07Rename `.active` to `.show`Starsam801-17/+17
2016-11-24Make JS compliant with the new ESLint rules.Bardi Harborow1-1/+1
2016-10-25Use a single class name for opened/expanded/shown state of widgetsJohann-S1-17/+17
2015-10-02Add throw error for undefined method on pluginsJohann-S1-0/+12
2015-07-27Fix triggering of {shown,hidden}.bs.dropdown events so relatedTarget gets ↵Johann-S1-0/+32
set properly Fixes #16828 Closes #16865
2015-06-02generalize dropdowns / drop role="menu"Patrick H. Lauke1-5/+5
as role="menu" is a very specific (and strict) ARIA pattern for desktop-like application menus, and our dropdowns are often used as pure navigation dropdowns, this change abandons ARIA menus for a more open-ended and light-weight approach (see http://heydonworks.com/practical_aria_examples/#submenus and http://www.w3.org/WAI/tutorials/menus/flyout/#improve-screen-reader-support-using-wai-aria) note that in dropdown.js, switched to now target ``.dropdown-menu`` instead of ``role["menu"]`` - this also prevents bootstrap scripts from "bleeding" into non-bootstrap components on the same page. also removed the ``role=["listbox"]`` part, which appears to be vestigial/unused (only place in bootstrap that uses that role are carousels, and their key handling is done separately)
2015-03-21Fix #16072: Clicking into input field within dropdown no longer closes the ↵Emmanuel Bourgerie1-0/+38
dropdown Closes #16073 by merging it
2015-03-09Disable jQuery event aliases when running test suiteChris Rebert1-21/+21
To ensure that we don't accidentally use any of the aliases. This should prevent any future regressions from #12761. Also updates the test suite since it now can't use these aliases either.
2015-03-03[Fixes #15953] Implement assert.expect in each unit testKevin Kirsche1-0/+15
[Fixes #15953] Implement `assert.expect` in each unit test
2015-02-26Unit tests: Use new names of module hooksHeinrich Fenkart1-2/+2
Refs #15893
2015-02-26Dropdowns: Skip `.disabled` instead of `.divider` on keydown eventvsn4ik1-0/+21
Fixes #15147. Closes #15520 by merging it.