aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/carousel.spec.js
AgeCommit message (Collapse)AuthorFilesLines
2024-02-06Build(deps-dev): Bump eslint-config-xo from 0.43.1 to 0.44.0 (#39651)dependabot[bot]1-1/+3
* Build(deps-dev): Bump eslint-config-xo from 0.43.1 to 0.44.0 Bumps [eslint-config-xo](https://github.com/xojs/eslint-config-xo) from 0.43.1 to 0.44.0. - [Release notes](https://github.com/xojs/eslint-config-xo/releases) - [Commits](https://github.com/xojs/eslint-config-xo/compare/v0.43.1...v0.44.0) --- updated-dependencies: - dependency-name: eslint-config-xo dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update .eslintrc.json * Update .eslintrc.json * autofix --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <[email protected]>
2023-03-29Tweak and re-organize ESLint config (#38369)XhmikosR1-5/+5
* Tweak and re-organize ESLint config * merge individual configs to the root config * enable more eslint-plugin-import rules * lint markdown files * Lint
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-05-31JS: tests fixes & standardization of spies usage (#36398)Louis-Maxime Piton1-64/+62
* Fix carousel spec typo * Change carousel test name in align with testing method * Make the spies declarations the same everywhere
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-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-02-19tests: revisit all tests using Promise.reject instead of throwing an error ↵GeoSot1-2/+2
(#35765)
2022-01-30tests: replace 'done' callback with 'Promise' to fix deprecation errors (#35659)GeoSot1-581/+627
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-21Carousel: move repeated code to a methodGeoSot1-6/+6
2021-12-02Tests: Minor fixes (#35455)Louis-Maxime Piton1-5/+5
2021-12-01tests: remove extra spaces, unneeded arrays and add missing newlinesXhmikosR1-3/+2
2021-12-01tests: tweak Jasmine's matchers usageXhmikosR1-22/+22
Use: * toBeNull * toEqual * toBeTrue * toBeFalse * toHaveSize * toHaveClass
2021-10-13tests: try to fix a few random failures (#35184)GeoSot1-0/+1
* Change `Swipe` dispose spy on EventHandler * Modal hide spy on backdrop hide
2021-10-11Extract Carousel's swipe functionality to a separate Class (#32999)GeoSot1-7/+11
2021-10-08tests: minor cleanup (#35138)XhmikosR1-13/+11
* tests: minor cleanup * tests: use the util noop function
2021-10-05Enable `unicorn/no-array-for-each` ruleXhmikosR1-3/+3
2021-09-15Rename `e` to `event` (#34979)XhmikosR1-18/+18
2021-07-30Enable a few eslint-config-xo rules (#34620)XhmikosR1-5/+5
* unicorn/prefer-dom-node-append * unicorn/prefer-dom-node-remove
2021-06-22fix(carousel): arrow keys break animation if carousel sliding (#34307)alpadev1-4/+67
2021-06-16Fix carousel buttons (#34266)alpadev1-0/+28
* test(carousel): add test to check if next/prev button work as intended * fix(carousel): merge passed config with instance config in carouselInterface
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-11Remove potential false positive assertions (#33288)Ben Lertlumprasertkul1-2/+2
* 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-07Fix wrong carousel transformation, direction to order (#33499)GeoSot1-20/+20
2021-03-17Fix carousel RTL and refactor code, fix rtl swipe issues (#32913)GeoSot1-29/+101
* move common code to reusable functions * add/re-factor tests, directionToOrder func * add _orderToDirection tests 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-02-12Add the missing expectations for touch events (#33060)Rohit Sharma1-2/+10
2021-02-12Fix event handler removal in dropdown/carousel dispose (#33000)Kyle Tsang1-2/+21
* Fix event handler removal in carousel dispose * Fix event handler removal in dropdown dispose * Test event handlers in scrollspy dispose * Test event handlers in toast dispose * Test event handlers in tooltip dispose Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-01-28Make carousel indicators actual buttonsPatrick H. Lauke1-5/+9
2021-01-27Carousel: use buttons, not links, for prev/next controls (#32627)Patrick H. Lauke1-7/+31
* Carousel: use buttons, not links, for prev/next - expand the styles to neutralise border/background - change docs page - add extra unit test to check that links or buttons work as controls - modify visual test to use buttons as well - use buttons instead of links for prev/next - remove `role="button"` from links that are actually links * Clarify that controls can be button or link * Update site/content/docs/5.0/components/carousel.md Co-authored-by: Mark Otto <[email protected]> * Explicitly set padding to 0 to prevent dipping/moving on active in Firefox 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-18test(carousel): french word in the wild (#32528)Gaël Poupard1-1/+1
2020-11-29Switch to Jasmine's `toBeInstanceOf` matcherXhmikosR1-1/+1
2020-11-29create a base componentJohann-S1-0/+20
2020-11-14Add `bs` in data attributesRohit Sharma1-26/+26
- Add `bs` in data APIs everywhere - Update unit tests
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-05-06tests: streamline HTML end tags (#30648)XhmikosR1-1/+1
2020-04-17Replace event.which with event.key and event.buttonTanguy Krotoff1-19/+19
2020-03-29Remove `MSPointerEvent` and `ms-touch-action` in tests (#30463)XhmikosR1-5/+4
2019-10-09Rename "js/tests/units" to "js/tests/unit". (#29503)XhmikosR1-0/+1201