aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Remove unneeded conditionalXhmikosR3-13/+7
2021-09-15Remove duplicate test.XhmikosR1-23/+0
2021-09-15Change test description so that it's uniqueXhmikosR1-1/+1
2021-09-15Merge duplicate test.XhmikosR1-34/+2
2021-09-15Remove commented out testXhmikosR1-16/+0
2021-09-15Skip tests if `attachShadow` is not presentXhmikosR1-22/+7
2021-09-15tests: comply to the new rulesXhmikosR12-459/+468
Use `assert.strictEqual`/`assert.true`/`assert.false`
2021-09-15Add eslint-plugin-qunitXhmikosR1-1/+2
2021-09-15Update devDependenciesXhmikosR1-0/+1
* @babel/cli ^7.14.8 → ^7.15.5 * @babel/core ^7.14.8 → ^7.15.4 * @babel/preset-env ^7.14.8 → ^7.15.6 * @rollup/plugin-commonjs ^19.0.1 → ^20.0.0 * @rollup/plugin-node-resolve ^13.0.2 → ^13.0.4 * autoprefixer ^10.3.1 → ^10.3.4 * clean-css-cli ^5.3.0 → ^5.3.3 * eslint ^7.31.0 → ^7.32.0 * eslint-config-xo ^0.37.0 → ^0.38.0 * eslint-plugin-import ^2.23.4 → ^2.24.2 * eslint-plugin-unicorn ^34.0.1 → ^36.0.0 * hugo-bin ^0.74.0 → ^0.76.1 * qunit ^2.16.0 → ^2.17.1 * postcss ^8.3.5 → ^8.3.6 * rollup ^2.53.3 → ^2.56.3 * vnu-jar 21.6.11 → 21.9.2
2021-07-25fix(modal): change the order we return from show() method (#34087)alpadev1-0/+26
In case of a modal with fading enabled, a prevented show event can cause show to not showing the modal anymore. See #34055 Co-authored-by: XhmikosR <[email protected]>
2021-04-28Backport #33634 (#33649)Carson Sievert1-0/+22
Dropdown: support `.dropdown-item` wrapped in `<li>` tags
2021-04-15Remove aria-haspopup from dropdowns (#33624)Patrick H. Lauke1-1/+1
`aria-haspopup="true"` is really intended to signal that an ARIA `menu` will be opened on activation. as a result, some assistive technologies will announce controls with `aria-haspopup="true"` as a menu or menu item (e.g. JAWS and NVDA). In addition, `aria-haspopup` seems to trigger a bug in Edge/Narrator where the `aria-expanded` state is not correctly announced at the moment when `aria-haspopup` is present. This now makes the dropdown button more like a generic disclosure widget control - see also https://www.w3.org/TR/wai-aria-practices-1.2/examples/disclosure/disclosure-navigation.html01
2021-03-02Adjust `SAFE_URL_PATTERN` regex for use with `test` method. (#33153)Nikon the Third1-0/+20
The `test` method on regexes does not behave like `match` on strings for checks if the regex matches when the global modifier (g) is present. Also adds a unit test on tooltips for sanitizing the same template twice. Co-authored-by: XhmikosR <[email protected]>
2021-01-27Update devDependencies (#32852)XhmikosR1-1/+2
Pin karma and linkinator due to failures
2020-11-24Backport #32224XhmikosR2-10/+10
Be consistent with Popper's name.
2020-11-21Backport #32179 (#32220)Rohit Sharma1-3/+2
Don't hide modal when `config.keyboard` is false
2020-11-20tooltip/popover: add a `customClass` option (#31834)James Remeika2-0/+63
Co-authored-by: XhmikosR <[email protected]>
2020-11-12Check for data-interval on the first slide of carousel - v4 (#31820)Mitchell Bryson1-1/+14
When starting a cycle for a carousel, it only checks for a default interval, and not an interval defined on the slide element via data props. This adds a check in before creating the interval to move to the next slide. Co-authored-by: XhmikosR <[email protected]>
2020-11-05Backport #32045XhmikosR1-1/+1
tests: fix sanitizer test. The test template does not include a `script` tag so the test always returned true.
2020-10-13Update .eslintrc.jsonXhmikosR1-30/+26
Enforce ES5 for tests
2020-10-02buttons plugin : avoid multiple change event trigger (#31000)Laussel Loïc1-0/+26
- add unit test to count how many events are thrown when widget contains multiple tags inside label - add a parameter to toggle, if click event is provided onto an input then don't trigger another change event already thrown by the browser - simplify the case where toggle interface is called click provide from input itself OR it's a button without label. If label is present, then browser propagate click event from childrens through label and then cause multiple calls to toggle - the test assumes that `.btn` class is always set onto the label if there's one, otherwise need to update this plugin and look for label around the input Test with keyboard, mouse and js click call Co-authored-by: XhmikosR <[email protected]>
2020-09-21ensure `hidePrevented.bs.modal` can be prevented (#31696)Joakim Riedel1-0/+39
2020-09-10Comply to the new rulesXhmikosR10-41/+41
2020-09-10Switch to xo and remove babel-eslintXhmikosR1-38/+33
2020-08-03Add unit test for toast to check clearTimeout to have been called (#31298)Rohit Sharma1-0/+31
2020-07-06Backport #30326 (Unit test)ysds1-0/+17
2020-06-24Backport #30973XhmikosR1-5/+5
Remove the class `.nav-item` from `.nav-link` inside the non `ul` or `ol` based navs. This makes the consistency for `.nav-item` (This class will not be required on the `.nav-link`). `.nav-item` was only required when you use `.nav-fill` or `.nav-justified` on the `.nav`. In other cases, it was redundant. And the purpose of `.nav-item` on `.nav-link`s can be achieved via flexbox utilities as well (Mentioned in the docs also).
2020-06-10avoid preventing input event onclick (#30992)Laussel Loïc1-0/+40
* instead of stopping event if onclick is triggered on input, call toggle method only if its not on checkbox inside a label * add unit test * add a dedicated test to ensure click event is forward to label Co-authored-by: XhmikosR <[email protected]>
2020-06-04Backport #30936XhmikosR1-0/+17
Add role="dialog" in modals via JavaScript
2020-05-12Backport d59de33 from #30772XhmikosR1-0/+39
Add a test about the scrollbar issue on non-integer width
2020-05-12Minor lint tweaks and rules cleanupXhmikosR3-3/+0
2020-05-12tests: switch to strictEqual/notStrictEqualXhmikosR5-27/+27
2020-05-12scrollspy.js add more testsXhmikosR1-0/+137
2020-05-07enforce element check on scrollspy targetJohann-S1-1/+1
2020-04-28Backport #30633Martijn Cuppens1-3/+3
Remove caret element
2020-04-17Fix tests for jQuery v3.5.0.XhmikosR2-26/+26
2020-04-10 v4 tabs - accessibility issue when using ul/li semantic (#30381)Laussel Loïc1-12/+12
Add aria-role presentation on li element when ul element has role tablist and remove dropdown from visual tests as they've been removed from doc
2020-04-07Fix event propagation from inactive and disabled dropdowns (#30510) (#30511)luktom1-0/+64
2020-03-31Backport (#30383)Johann-S1-0/+20
fix: ensure totype always return stringified null when null passed
2020-03-16fix `$().button('toggle')` not working for checkbox inside label (#30388)Laussel Loïc1-1/+29
2020-02-17Backport #29886Giovanni Mendoza1-0/+49
Close modal with keyboard=true & backdrop=static
2019-11-02backport #29516: added animation when modal backdrop is staticJohann-S1-0/+22
2019-11-02backport #29523: skip hidden dropdowns while focusingJohann-S1-0/+41
2019-08-27Backport #29298Johann-S1-1/+36
dropdown show method should do the same as toggle
2019-08-27Backport #29277Johann-S1-1/+45
dropdown - destroy old popper.js references
2019-08-27Backport #29251Johann-S2-0/+43
allow to pass popper.js configuration for tooltip/popover and dropdown
2019-07-31Backport #29155Johann-S1-0/+21
allow dynamic modal body for scrollable modals
2019-07-31Fix Typos across Bootstrap repository (#29082)Kitten King1-1/+1
2019-07-10Ensure button plugin sets/removes active class correctly on page load (#28952)Patrick H. Lauke1-10/+70
* Ensure correct active class is set on button toggles/checkboxes/radios on page load Sanity check, ensures that the UI visually matches the actual values/states of controls. Also ensures that if any autocomplete/autofill happened, this is visually accounted for by having the correct class set. Includes unit tests (and `autocomplete` has been removed from these as it's no longer necessary) * Remove now unnecessary autocomplete attribute As the attribute was there to force/ensure that the visual presentation matched the state, and this is now taken care of programmatically, there's no need to unnecessarily suppress autocomplete...let them autocomplete if they want to...
2019-06-19Add missing dropdown unit test for closing with ESC (#28929)Patrick H. Lauke1-0/+39
Backport of the unit test from https://github.com/twbs/bootstrap/pull/28928