Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-10-10 15:09:57 +0300
committerXhmikosR <xhmikosr@gmail.com>2021-12-01 18:10:39 +0300
commitfb5921dec49da37e9bab745d7319037e89e2f31e (patch)
tree2f9eb720f5ad7607cdeb5b70a0388c37cd3e402f /js/tests/unit/dropdown.spec.js
parent137b3249304b9ffeb76c72b7094ae7f170993016 (diff)
Dropdown: Merge `display='static'` & `isNavbar` functionality activating static popper with no styles attached
Diffstat (limited to 'js/tests/unit/dropdown.spec.js')
-rw-r--r--js/tests/unit/dropdown.spec.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/tests/unit/dropdown.spec.js b/js/tests/unit/dropdown.spec.js
index bec0aae62e..aec70063ec 100644
--- a/js/tests/unit/dropdown.spec.js
+++ b/js/tests/unit/dropdown.spec.js
@@ -1054,7 +1054,7 @@ describe('Dropdown', () => {
btnDropdown.click()
})
- it('should not use Popper in navbar', done => {
+ it('should not use "static" Popper in navbar', done => {
fixtureEl.innerHTML = [
'<nav class="navbar navbar-expand-md navbar-light bg-light">',
' <div class="dropdown">',
@@ -1071,8 +1071,8 @@ describe('Dropdown', () => {
const dropdown = new Dropdown(btnDropdown)
btnDropdown.addEventListener('shown.bs.dropdown', () => {
- expect(dropdown._popper).toBeNull()
- expect(dropdownMenu.getAttribute('style')).toBeNull()
+ expect(dropdown._popper).not.toBeNull()
+ expect(dropdownMenu.getAttribute('data-bs-popper')).toEqual('static')
done()
})
@@ -1120,7 +1120,7 @@ describe('Dropdown', () => {
dropdown.show()
})
- it('should manage bs attribute `data-bs-popper`="none" when dropdown is in navbar', done => {
+ it('should manage bs attribute `data-bs-popper`="static" when dropdown is in navbar', done => {
fixtureEl.innerHTML = [
'<nav class="navbar navbar-expand-md navbar-light bg-light">',
' <div class="dropdown">',
@@ -1137,7 +1137,7 @@ describe('Dropdown', () => {
const dropdown = new Dropdown(btnDropdown)
btnDropdown.addEventListener('shown.bs.dropdown', () => {
- expect(dropdownMenu.getAttribute('data-bs-popper')).toEqual('none')
+ expect(dropdownMenu.getAttribute('data-bs-popper')).toEqual('static')
dropdown.hide()
})