aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/collapse.spec.js
AgeCommit message (Collapse)AuthorFilesLines
2023-03-29Tweak and re-organize ESLint config (#38369)XhmikosR1-3/+3
* Tweak and re-organize ESLint config * merge individual configs to the root config * enable more eslint-plugin-import rules * lint markdown files * Lint
2023-02-21Tests: remove unnecessary `id`/`aria-labelledby` from collapse unit tests ↵Julien Déramond1-15/+15
(#38089)
2022-11-12Docs: use `<button>` for dropdown/popover examples, explain preference over ↵Patrick H. Lauke1-3/+3
`<a>` for dropdowns, tweak collapse prose (#37432) * Expand dropdown explanation for use of `<a>`, use `<button>`s for modal examples * Remove redundant `role="button"` from collapse test `<button>` elements * Tweak language * Tweak collapse prose
2022-11-12ESLint: enable prefer-template rule (#37484)XhmikosR1-1/+1
2022-11-07Properly escape IDs in getSelector() to handle weird IDs (#35565) (#35566)Pierre Souchay1-3/+3
2022-05-31JS: tests fixes & standardization of spies usage (#36398)Louis-Maxime Piton1-14/+14
* Fix carousel spec typo * Change carousel test name in align with testing method * Make the spies declarations the same everywhere
2022-02-19tests: revisit all tests using Promise.reject instead of throwing an error ↵GeoSot1-4/+4
(#35765)
2022-01-30tests: replace 'done' callback with 'Promise' to fix deprecation errors (#35659)GeoSot1-562/+602
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.
2021-12-02Tests: Minor fixes (#35455)Louis-Maxime Piton1-4/+4
2021-12-01tests: remove extra spaces, unneeded arrays and add missing newlinesXhmikosR1-43/+44
2021-12-01tests: tweak Jasmine's matchers usageXhmikosR1-70/+70
Use: * toBeNull * toEqual * toBeTrue * toBeFalse * toHaveSize * toHaveClass
2021-10-08tests: minor cleanup (#35138)XhmikosR1-2/+0
* tests: minor cleanup * tests: use the util noop function
2021-09-15Fix Collapse regression of handling toggling between sibling chilldren (#34951)GeoSot1-0/+57
2021-09-15Rename `e` to `event` (#34979)XhmikosR1-4/+4
2021-09-13tests: fix lint warning (#34950)GeoSot1-3/+2
2021-08-30Collapse on toggle, should not hide descendant tabpanels (#34835)GeoSot1-0/+50
2021-07-29keep parent only as elementGeoSot1-4/+2
2021-07-05Add horizontal collapse supportMark Otto1-1/+1
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-05-13Move get element functionality to a helper (#33327)GeoSot1-1/+2
Looking around on js components I found out many checks, different expressed but with same purpose. Some of them are trying to parse string to element, others, jQuery element to js simple nodeElement etc With this Pr, I am trying to give a standard way to parse an element So this pr: * Creates `getElement` helper that tries to parse an argument to element or null * Changes `isElement` to make explicit checks and return Boolean * fixes tests deficiencies
2021-05-11Remove potential false positive assertions (#33288)Ben Lertlumprasertkul1-1/+1
* 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-02-22Allow constructors to accept a CSS selector (#32245)Rohit Sharma1-0/+11
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]>
2020-12-21collapse: prevent url change if `A` nested tag is clicked (#32438)Daniele Faraglia1-0/+23
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-14Add `bs` in data attributesRohit Sharma1-36/+36
- Add `bs` in data APIs everywhere - Update unit tests
2020-05-06tests: streamline HTML end tags (#30648)XhmikosR1-16/+16
2020-03-25fix: remove make array util function (#30430)Johann-S1-2/+1
2019-10-09Rename "js/tests/units" to "js/tests/unit". (#29503)XhmikosR1-0/+826