aboutsummaryrefslogtreecommitdiff
path: root/js/tests
AgeCommit message (Collapse)AuthorFilesLines
2022-06-14Carousel: Remove redundant reference to `interval=false` from docs (#36545)GeoSot1-7/+7
* docs: remove redundant reference to `interval=false` * docs: remove redundant reference to `interval=false` from tests Co-authored-by: XhmikosR <[email protected]>
2022-06-08Fix typo in dropdown unit testJulien Déramond1-1/+1
2022-06-08Scrollspy: enable smooth-scroll behavior (#36528)GeoSot1-1/+1
2022-06-03Remove confusing unnecessary id/aria-labelledby for dropdown menus (#36487)Patrick H. Lauke2-12/+12
see https://github.com/twbs/bootstrap/discussions/35755 Note that even the APG guide for disclosure widgets doesn't use this optional "nice-to-have" extra bit https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ (though they do use `aria-controls`, which in most current browser/AT combos is borked though)
2022-05-31JS: tests fixes & standardization of spies usage (#36398)Louis-Maxime Piton18-342/+338
* Fix carousel spec typo * Change carousel test name in align with testing method * Make the spies declarations the same everywhere
2022-05-20Docs: quick fixes for HTML (#36395)Louis-Maxime Piton1-1/+1
* Using the new helper in the doc * Remove input from `Tab` access * Change scrollspy code examples * Reordering tables for JS * Fix for parcel file * Center align all the code example texts in layout * Alphabetical reorder the helpers
2022-05-12Revert backdrop utilization, handling clicks over modal (#36324)GeoSot1-7/+3
* refactor(Modal.js): stop using backdrop class to handle clicks over modal * Revert #35554 and backdrop callback usage Explanation: In order to bypass `.modal`, was applied a css rule `pointer-events:none` which caused the side effect, and user couldn't scroll "long content modals" * Update .bundlewatch.config.json Co-authored-by: Mark Otto <[email protected]>
2022-05-05Handle disabled focused tabs with tab JavaScript plugin (#36169)Julien Déramond1-0/+66
* Handle disabled tabs * Fix after feedback * Update js/src/tab.js Co-authored-by: GeoSot <[email protected]> * Update js/src/tab.js Co-authored-by: GeoSot <[email protected]> * Commit suggestions via GitHub broke the thing * Add some unit tests * Remove temp doc modification * Add tests for left arrow * Add disabled tabs in JavaScript Behavior section * Compact 4 tests to 2 tests * Compact 4 tests to 2 tests * Add 'disabled' attribute for all buttons * Change the disabled pane position only for the vertical version * Change ids for the confusing first example in JavaScript behavior * Use disabled attribute instead of the class for buttons in tabs Co-authored-by: GeoSot <[email protected]>
2022-04-30Doc: remove `role="group"` from some split drop* buttonsJulien Déramond1-3/+3
2022-04-21Carousel: Fix not used option (`ride`), simplify `cycle` method (#35983)GeoSot1-105/+104
* Fix not used option (`ride`) (according to docs), continuing of #35753 a247fe9 * separate concept of `programmatical cycle` vs `maybe cycle after click` functionality
2022-04-21Manipulator: Add JSON parse support (#35077)GeoSot3-7/+119
Support parsing JSON from each component's main element using the `data-bs-config` attribute. The `bs-config` attribute will be reserved and omitted during `getDataAttributes` parsing. With this commit, every component, will create its config object, using: * defaults * data-bs-config * the rest of data attributes * configuration object given during instance initialization Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2022-04-17v5.2.0 design refresh, plus responsive offcanvas classes (#35736)Mark Otto1-0/+22
* Add responsive offcanvas classes - Updates navbar-expand classes to de-dupe some styles—these shouldn't interfere now. - Adds some JS to the offcanvas component to help with responsiveness Co-Authored-By: GeoSot <[email protected]> * Redesign homepage, docs, and examples Homepage: - New Bootstrap purple navbar - Redesigned masthead - Rewrote and redesigned homepage content - Replace Copy text with icons like Bootstrap Icons site across all ClipboardJS instances - Fixed padding issues in site footer - Match homepage button styles to examples page, use gap instead of tons of responsive margin utils Docs: - New navbar, no more subnav. Migrated search and version picker into the main navbar and refreshed the design of it all, including the responsive toggles. - New sidebar navigation is always expanded, and now features Bootstrap Icons alongside section headings - Sidebar navigation autoscrolls to active link for better usability - Subnav and navbar padding issues ironed out - Enhanced the version picker in anticipation of v5.2: we can now link right to the same page in the previous version. - Redesign callouts to add more color to our pages - Collapse table of contents on mobile - Cleanup and redesign button styles with CSS variables - Update design for subnav version dropdown - Update highlight and example to be full-width until md - Improve the Added In badges - Turn the ToC into a well on mobile - Redesign code snippets to better house two action buttons Examples: - Redesign Examples page layout - Add new example for responsive offcanvases in navbars * Convert offcanvas to CSS vars * Feat: add resize handler to Offcanvas.js. If we could use as default the `.offcanvas` class without modifiers, we then, could add a simplified selector The selector itself, ignores the .offcanvas class as it doesn't have any responsive behavior The `aria-modal` addon is to protect us, selection backdrop elements * Separate examples code, Add some selectors, fix stackblitz btn Co-authored-by: GeoSot <[email protected]>
2022-04-13Revamp Scrollspy using Intersection observer (#33421)GeoSot2-316/+383
* Revamp scrollspy to use IntersectionObserver * Add smooth scroll support * Update scrollspy.js/md * move functionality to method * Update scrollspy.js * Add SmoothScroll to docs example * Refactor Using `Maps` and smaller methods * Update scrollspy.md/js * Update scrollspy.spec.js * Support backwards compatibility * minor optimizations * Merge activation functionality * Update scrollspy.md * Update scrollspy.js * Rewording some of the documentation changes * Update scrollspy.js * Update scrollspy.md * tweaking calculation functionality & drop text that suggests, to deactivate target when wrapper is not visible * tweak calculation * Fix lint * Support scrollspy in body & tests * change doc example to a more valid solution Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]>
2022-04-06Revamp tabs & follow ARIA 1.1 practices (#33079)GeoSot1-29/+197
* Tab: Revamp tab.js & add support Aria features * Tab: Add tab support, just to keep backwards compatibility. Better to remove it on v6 * Revert "Tab: Add tab support, just to keep backwards compatibility. Better to remove it on v6" * Support arrow down/up functionality * add prevent default to avoid scrolling the page during up/down keys handling * remove panel tabindex handling * Expand documentation text for JS plugin * Rearrange new docs to specifically call out a11y * properly place section Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2022-03-19No propagating escape event in an open dropdown.louismaxime.piton1-0/+35
2022-03-10Carousel: change class check as it can only exist if carousel is slidingGeoSot1-1/+2
Also, fix the corresponding test
2022-03-10Carousel: rename private propertyGeoSot1-4/+4
2022-03-10Carousel: omit redundant checks as we are always transforming the right valuesGeoSot1-4/+0
2022-03-09Carousel: refactor `_slide` method te accept only order as first argumentGeoSot1-20/+15
2022-03-09Carousel: reorder variables and refactor method to use it inlineGeoSot1-8/+8
2022-03-02Add static backdrop to offcanvas (#35832)Jann Westermann1-10/+61
* Add static backdrop option, to offcanvas * Trigger prevented event on esc with keyboard=false * Change offcanvas doc , moving backdrop examples to examples section
2022-03-01Modal: refactor listeners to reduce some code noise (#35902)GeoSot1-2/+2
2022-02-28add testsMark Otto1-0/+49
2022-02-19tests: revisit all tests using Promise.reject instead of throwing an error ↵GeoSot10-72/+72
(#35765)
2022-02-19Make event name helper and use it on tooltip & popover to reduce dist sizes ↵GeoSot2-13/+1
(#35856) * feat: create eventName getter function in baseComponent * refactor: use `eventName` getter on tooltip & popover
2022-02-15Update devDependencies (#35841)XhmikosR5-10/+10
* Update devDependencies * @babel/core ^7.17.0 → ^7.17.2 * @rollup/plugin-replace ^3.0.1 → ^3.1.0 * eslint ^8.8.0 → ^8.9.0 * eslint-config-xo ^0.39.0 → ^0.40.0 * hugo-bin ^0.80.1 → ^0.80.2 * karma ^6.3.15 → ^6.3.16 * rollup ^2.67.1 → ^2.67.2 * Fix new ESLint errors
2022-02-09Remove remaining `.navbar-light` classes (#35814)Julien Déramond2-3/+3
* Fix typo in CSS variables documentation * Drop remaining .navbar-light classes
2022-02-01Fix Popover test that randomly fails on BrowserStack (#35757)GeoSot1-12/+7
Co-authored-by: XhmikosR <[email protected]>
2022-02-01Dropdown: merge instance identification in `dataApiKeydownHandler`GeoSot1-0/+20
As we use the `dataApiKeydownHandler` only for events that are triggered on `[data-bs-toggle="dropdown"]` or on `.dropdown-menu`, we can ensure that their `parentNode` will ALWAYS be the `.dropdown` wrapper
2022-01-30Fix visual tests (#35585)XhmikosR11-86/+23
* Fix visual tests They broke in #34509 * load bundle.js in visual tests Co-authored-by: GeoSot <[email protected]>
2022-01-30Modal.js: remove unnecessary checks from testGeoSot1-4/+0
2022-01-30Modal: handle click event from backdrop callbackGeoSot1-4/+7
2022-01-30tests: replace 'done' callback with 'Promise' to fix deprecation errors (#35659)GeoSot20-6132/+6715
Reference: https://jasmine.github.io/tutorials/async 'DEPRECATION: An asynchronous function called its 'done' callback more than once. This is a bug in the spec, beforeAll, beforeEach, afterAll, or afterEach function in question. This will be treated as an error in a future version. See<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> for more information.
2022-01-30Event handler: replace deprecated `initEvent`GeoSot3-8/+3
2022-01-29Rename variablesXhmikosR2-38/+38
2022-01-13Fix: `isVisible` function behavior in case of a `<details>` element, on ↵Ryan Berliner1-0/+36
chrome 97 (#35682)
2022-01-05Remove explicit use of aria-hidden for offcanvas when closed (#35589)Patrick H. Lauke1-6/+53
Remove explicit use of aria-hidden & visibility for offcanvas when closed, handling it with css Co-authored-by: GeoSot <[email protected]> Co-authored-by: Gaël Poupard <[email protected]>
2021-12-21Carousel: move repeated code to a methodGeoSot1-6/+6
2021-12-15Popover.js: Accept empty content through `data-bs-content` (#35514)GeoSot1-14/+30
Co-authored-by: XhmikosR <[email protected]>
2021-12-10Extract Component config functionality to a separate class (#33872)GeoSot2-47/+78
Co-authored-by: XhmikosR <[email protected]>
2021-12-09Fix tests fixture type (#35501)XhmikosR5-30/+32
Previously we were adding an Array instead of a String
2021-12-09Dropdown: fix toggle focus after dropdown is hidden using the `ESC` button ↵GeoSot1-0/+28
(#35500)
2021-12-09ScrollBar.js. Minor refactoring and add test (#35492)GeoSot1-0/+21
2021-12-07Tooltip: remove title attribute before show & add tests (#35456)GeoSot1-0/+22
2021-12-02Tests: Minor fixes (#35455)Louis-Maxime Piton7-25/+26
2021-12-01Tooltip/Popover: add underscore prefix to protected functionsGeoSot2-35/+35
2021-12-01Tooltip: Change `_enter` & `_leave` to work without argumentsGeoSot1-2/+2
2021-12-01Dropdown: Merge `display='static'` & `isNavbar` functionality activating ↵GeoSot1-5/+5
static popper with no styles attached
2021-12-01Dropdown tests: Use a function to improve readability (#35448)GeoSot1-32/+13
2021-12-01Fix popover arrow & tooltip template after the `setContent` addition (#35441)GeoSot2-0/+31