Skip to content

Commit 9d8019f

Browse files
authored
Tests: fix dialog/drawer dispose-while-open scroll-lock assertions (#42575)
* Tests: assert dialog-open on documentElement in dispose-while-open specs The dispose-while-open specs added in #42544 asserted the scroll-lock class on document.body, but #42545 moved the lock to the root element (documentElement). The two changes were each green in isolation but broke once both landed on v6-dev. Align these specs with the rest of the suite, which already asserts on documentElement. * Build: bump bundlewatch thresholds for cumulative JS growth on v6-dev bootstrap.bundle.js (83.15KB) and bootstrap.js (54.39KB) now exceed the prior thresholds after the dialog/drawer/tooltip/popover/menu fixes landed; each PR bumped only relative to its own base.
1 parent ab18765 commit 9d8019f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.bundlewatch.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
},
3535
{
3636
"path": "./dist/js/bootstrap.bundle.js",
37-
"maxSize": "82.75 kB"
37+
"maxSize": "83.5 kB"
3838
},
3939
{
4040
"path": "./dist/js/bootstrap.bundle.min.js",
4141
"maxSize": "53.25 kB"
4242
},
4343
{
4444
"path": "./dist/js/bootstrap.js",
45-
"maxSize": "54.0 kB"
45+
"maxSize": "54.5 kB"
4646
},
4747
{
4848
"path": "./dist/js/bootstrap.min.js",

js/tests/unit/dialog.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,12 +723,12 @@ describe('Dialog', () => {
723723

724724
dialogEl.addEventListener('shown.bs.dialog', () => {
725725
expect(dialogEl.open).toBeTrue()
726-
expect(document.body.classList.contains('dialog-open')).toBeTrue()
726+
expect(document.documentElement.classList.contains('dialog-open')).toBeTrue()
727727

728728
dialog.dispose()
729729

730730
expect(dialogEl.open).toBeFalse()
731-
expect(document.body.classList.contains('dialog-open')).toBeFalse()
731+
expect(document.documentElement.classList.contains('dialog-open')).toBeFalse()
732732
resolve()
733733
})
734734

js/tests/unit/drawer.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,12 @@ describe('Drawer', () => {
580580

581581
drawerEl.addEventListener('shown.bs.drawer', () => {
582582
expect(drawerEl.open).toBeTrue()
583-
expect(document.body.classList.contains('dialog-open')).toBeTrue()
583+
expect(document.documentElement.classList.contains('dialog-open')).toBeTrue()
584584

585585
drawer.dispose()
586586

587587
expect(drawerEl.open).toBeFalse()
588-
expect(document.body.classList.contains('dialog-open')).toBeFalse()
588+
expect(document.documentElement.classList.contains('dialog-open')).toBeFalse()
589589
resolve()
590590
})
591591

0 commit comments

Comments
 (0)