Louis-Maxime Piton
d388bd6e1b
JS: tests fixes & standardization of spies usage ( #36398 )
...
* Fix carousel spec typo
* Change carousel test name in align with testing method
* Make the spies declarations the same everywhere
2022-05-31 11:18:32 +03:00
GeoSot
4b17868fb4
tests: revisit all tests using Promise.reject instead of throwing an error ( #35765 )
2022-02-19 16:08:16 +02:00
GeoSot
aa650f0f1e
tests: replace 'done' callback with 'Promise' to fix deprecation errors ( #35659 )
...
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-30 14:30:04 +02:00
XhmikosR
eb54e1a1ce
tests: tweak Jasmine's matchers usage
...
Use:
* toBeNull
* toEqual
* toBeTrue
* toBeFalse
* toHaveSize
* toHaveClass
2021-12-01 14:30:49 +02:00
GeoSot
1692fc6b4b
Alert: add a couple more tests ( #35419 )
...
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-11-29 14:32:11 +02:00
XhmikosR
a260967a55
tests: minor cleanup ( #35138 )
...
* tests: minor cleanup
* tests: use the util noop function
2021-10-08 12:32:11 +03:00
GeoSot
70dd7f6ff5
Changes to Alert component to match the others ( #33402 )
...
Alert.js: Refactor code to match the other components
* Use this._element
* Remove handleDismiss method and keep its functionality on event
* Change JqueryInterface to be more generic
* Correct docs to be aligned with code, and add undocumented functionality
* Update alerts.md
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-06-28 16:34:47 +03:00
GeoSot
c98657b830
Add getOrCreateInstance
method in base-component ( #33276 )
...
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-06-03 18:53:27 +03:00
Ben Lertlumprasertkul
052def4568
Remove potential false positive assertions ( #33288 )
...
* 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 <xhmikosr@gmail.com>
2021-05-11 08:45:57 +03:00
Rohit Sharma
dc5e3328c1
Allow constructors to accept a CSS selector ( #32245 )
...
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <otto@github.com>
2021-02-22 09:01:04 +02:00
GeoSot
3602828a90
Add tests for DATA_KEY
( #33090 )
...
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-02-16 08:58:08 +02:00
XhmikosR
51a208f119
Switch to Jasmine's toBeInstanceOf
matcher
2020-11-29 20:58:26 +02:00
Johann-S
9f6b342dc7
create a base component
2020-11-29 20:58:26 +02:00
Rohit Sharma
418f17ee2b
Add bs
in data attributes
...
- Add `bs` in data APIs everywhere
- Update unit tests
2020-11-14 07:09:15 +02:00
Johann-S
26d86fce2a
fix: remove make array util function ( #30430 )
2020-03-25 16:35:02 +02:00
yonikohen
7a60dcf9b0
Corrected grammatical error in test descriptions ( #30150 )
...
"without instantiate it" should be "without instantiating it"
2020-02-10 09:35:13 +02:00
XhmikosR
577bf8b14d
Rename "js/tests/units" to "js/tests/unit". ( #29503 )
2019-10-09 01:27:43 +03:00