aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2020-11-30Add testsXhmikosR1-0/+53
2020-11-29Switch to Jasmine's `toBeInstanceOf` matcherXhmikosR11-11/+11
2020-11-29create a base componentJohann-S11-0/+96
2020-11-25Ability to add custom class in tooltip/popover (#32217)Rohit Sharma2-0/+71
Porting of #31834 to main. Co-authored-by: XhmikosR <[email protected]>
2020-11-21Be consistent with Popper's name. (#32224)XhmikosR2-8/+8
The npm package is named "popper.js" but the project is named "Popper", so use the latter consistently.
2020-11-20Add missing tags in unit tests (#32221)Rohit Sharma1-15/+15
2020-11-20Don't hide modal when keyboard is set to false in modal's configuration (#32179)Rohit Sharma1-3/+2
* Don't hide modal when config.keyboard is false * Update unit test - Modal should not be closed when pressing esc key if keyboard = false and backdrop is 'static' Co-authored-by: XhmikosR <[email protected]>
2020-11-20Make the attribute methods bs specific (#32173)Rohit Sharma1-18/+22
Co-authored-by: XhmikosR <[email protected]>
2020-11-14Switch to Number propertiesXhmikosR1-6/+6
2020-11-14Fix `.close` instances (#32152)XhmikosR2-10/+6
2020-11-14Get only bs prefixed data attributesRohit Sharma1-18/+2
2020-11-14Add `bs` in data attributesRohit Sharma14-262/+278
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-02tests: tweak Jasmine usage (#32046)XhmikosR4-9/+9
* jasmine/expect-matcher * jasmine/prefer-jasmine-matcher Found with `eslint-plugin-jasmine`
2020-11-02tests: fix sanitizer test. (#32045)XhmikosR1-1/+1
The test template does not include a `script` tag so the test always returned true.
2020-11-02tests: switch to using `toContain()` to check for substring presence (#32043)XhmikosR2-5/+5
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-0/+19
* extend jquery after domContentLoaded event is fired * add unittest for util onDOMContentLoaded * wait for trigger jquery event after domContentLoaded * remove domcontentready from eventHandler * move istanbul ignore statements to correct line Co-authored-by: XhmikosR <[email protected]>
2020-11-01Check for data-interval on the first slide of carousel (#31818)Mitchell Bryson1-8/+34
* check for data-interval on the first slide of carousel * add updateInterval method for elements of a carousel * add test for carousel interval being set during cycle * update activeElement as soon as slide has finished (before transition end) * only updateInterval before using it Co-authored-by: XhmikosR <[email protected]>
2020-10-31toast.spec.js: fix typo (#32026)XhmikosR1-2/+2
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-09-24fix tooltip hide method when already hidden (#31115)Hiws1-0/+14
Co-authored-by: XhmikosR <[email protected]>
2020-07-11Clear timeout before showing the toast (#31155)Rohit Sharma1-0/+27
* clear timeout before showing the toast * Add unit test * Remove the check for timeout * Check for clearTimeout to have been called Co-authored-by: XhmikosR <[email protected]>
2020-06-25Prevent overflowing static backdrop modal animation (#30326)Shohei Yoshida1-0/+19
Co-authored-by: XhmikosR <[email protected]>
2020-06-19Change whitelist to allowlist (#31066)Patrick H. Lauke1-7/+7
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2020-06-18Fix tooltip when hovering a children element (delegateTarget) (#30928)Tanguy Krotoff1-0/+22
Co-authored-by: XhmikosR <[email protected]>
2020-06-17data: reword storage key in domJohann-S1-7/+7
2020-06-15Remove checkbox/radio toggle from button plugin in favor of a CSS only solutionMartijn Cuppens1-161/+0
2020-06-09Remove .nav-item from .nav-link to make it consistentRohit Sharma1-5/+5
- Closes #28423
2020-06-04Add role="dialog" in modals via JavaScript (#30936)Rohit Sharma1-0/+6
2020-05-12Add a test about the scrollbar issue on non-integer widthDominik Kremer1-0/+32
2020-05-11Add missing closing `div` tags (#30775)XhmikosR1-28/+28
Missed those in 967e607
2020-05-06tests: streamline HTML end tags (#30648)XhmikosR7-121/+127
2020-05-06add unit tests to ensure our plugins works in jqueryJohann-S1-0/+57
2020-05-04Clean up lint rules (#30721)XhmikosR1-1/+3
* Remove unneeded rule suppression * Format tests/unit/.eslintrc.json * build/.eslintrc.json: add strict for consistency
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 Krotoff3-79/+75
2020-04-01Always modal scroll top to 0ysds1-8/+8
2020-03-29Remove `MSPointerEvent` and `ms-touch-action` in tests (#30463)XhmikosR1-5/+4
2020-03-29Use `textContent` instead of `innerText`. (#30462)XhmikosR1-1/+1
It's supported by all of our supported browsers.
2020-03-28v5 tabs - accessibility issue when using ul/li semanticLaussel Loïc1-17/+17
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-03-25fix: remove make array util function (#30430)Johann-S7-38/+18
2020-03-23Use next dropdown menu instead of first of the parentMartijn Cuppens2-27/+66
2020-03-18Remove Internet Explorer leftoversXhmikosR1-6/+0
2020-03-18fix: ensure `totype` always returns stringified null/undefined when ↵Johann-S1-1/+30
null/undefined is passed (#30383)
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
2020-02-10Corrected grammatical error in test descriptions (#30150)yonikohen1-2/+2
"without instantiate it" should be "without instantiating it"
2020-02-01tests: Remove button `href`s (#30119)Martijn Cuppens1-50/+50
2020-01-10Close modal with keyboard=true & backdrop=static (#29986)Giovanni Mendoza1-0/+58
* Close modal with keyboard=true & backdrop=static
2019-10-31Update normalizeDataKey to match the spec (#29609)Steffen Roßkamp1-10/+10
2019-10-25Added animation when modal backdrop is static (#29516)Higor Araújo dos Anjos1-0/+27