aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/modal.spec.js
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Rename `e` to `event` (#34979)XhmikosR1-14/+14
2021-08-10Fix modal when is triggered by `bs-toggle`, to hide other open instances ↵GeoSot1-0/+23
(#34701)
2021-07-30Enable a few eslint-config-xo rules (#34620)XhmikosR1-2/+2
* unicorn/prefer-dom-node-append * unicorn/prefer-dom-node-remove
2021-07-27Add shift-tab keyboard support for dialogs (modal & Offcanvas components) ↵Ryan Berliner1-24/+30
(#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-07-19modal: change `data-dismiss` so that it can be outside of a modal using ↵GeoSot1-1/+28
`bs-target` (#33403) * change data-dismiss, so can be outside modal, using a bs-target * Update site/content/docs/5.0/components/modal.md Co-authored-by: Gaël Poupard <[email protected]>
2021-06-06Refactor scrollbar.js to be used as a Class (#33947)GeoSot1-10/+9
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-06-03Fix handling of transitionend events dispatched by nested elements(#33845)alpadev1-0/+23
Fix handling of transitionend events dispatched by nested elements Properly handle events from nested elements Change `emulateTransitionEnd` to `executeAfterTransition` &&
2021-05-24Fix prevented show event disables modals with fade class from being ↵alpadev1-1/+30
displayed again (#34085) Fix modal, in case is faded, a prevented show event can cause show method to not be executed again.
2021-05-20Add Tests on scrollbar.js & better handling if a style property doesn't ↵GeoSot1-208/+4
exists (#33948) * scrollbar.js: add some tests transfer test from modal.spec. to scrollbar.spec proper handling if style property doesn't exist
2021-05-18Reset inside a Dialog does not work if `data-dismiss="modal"` is set (#33928)GeoSot1-0/+54
2021-05-11Remove potential false positive assertions (#33288)Ben Lertlumprasertkul1-19/+19
* 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-25Scrollbar: respect the initial body overflow value (#33706)GeoSot1-8/+3
* add method to handle overflow on body element & tests * replace duplicated code on modal/offcanvas tests
2021-04-18modal.js: fix test for scrollbar (#33666)GeoSot1-4/+6
Co-authored-by: XhmikosR <[email protected]>
2021-04-14Js: fix some testsGeoSot1-10/+9
2021-04-11Decouple Modal's scrollbar functionality (#33245)GeoSot1-39/+13
2021-04-08Remove unnecessary `data-bs-backdrop="static"` (#33578)Rohit Sharma1-3/+3
Since the value for the `backdrop` option is available in the configuration object.
2021-04-06Simplify Modal configGeoSot1-1/+18
2021-02-23modal: don't add margin & padding when sticky is not full width (#30621)Muhammadamin1-0/+24
* modal: don't add margin & padding when sticky is not full width * Check if element is shorter than window Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-22Allow constructors to accept a CSS selector (#32245)Rohit Sharma1-0/+13
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-01-13Throw a `TypeError` instead of the generic `Error` (#32585)Rohit Sharma1-4/+2
* 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]>
2021-01-13Fix toggling modal when clicking on `data-bs-toggle="modal"` (#32691)Rohit Sharma1-1/+10
Co-authored-by: XhmikosR <[email protected]>
2020-11-29Switch to Jasmine's `toBeInstanceOf` matcherXhmikosR1-1/+1
2020-11-29create a base componentJohann-S1-0/+1
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-14Switch to Number propertiesXhmikosR1-6/+6
2020-11-14Add `bs` in data attributesRohit Sharma1-27/+27
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-02tests: tweak Jasmine usage (#32046)XhmikosR1-1/+1
* jasmine/expect-matcher * jasmine/prefer-jasmine-matcher Found with `eslint-plugin-jasmine`
2020-06-25Prevent overflowing static backdrop modal animation (#30326)Shohei Yoshida1-0/+19
Co-authored-by: XhmikosR <[email protected]>
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)XhmikosR1-42/+42
2020-04-17Replace event.which with event.key and event.buttonTanguy Krotoff1-4/+4
2020-04-01Always modal scroll top to 0ysds1-8/+8
2020-03-25fix: remove make array util function (#30430)Johann-S1-5/+4
2020-03-18Remove Internet Explorer leftoversXhmikosR1-6/+0
2020-01-10Close modal with keyboard=true & backdrop=static (#29986)Giovanni Mendoza1-0/+58
* Close modal with keyboard=true & backdrop=static
2019-10-25Added animation when modal backdrop is static (#29516)Higor Araújo dos Anjos1-0/+27
2019-10-09Rename "js/tests/units" to "js/tests/unit". (#29503)XhmikosR1-0/+987