]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Tests: fix dialog/drawer dispose-while-open scroll-lock assertions (#42575)
authorMark Otto <markd.otto@gmail.com>
Sat, 27 Jun 2026 03:24:43 +0000 (20:24 -0700)
committerGitHub <noreply@github.com>
Sat, 27 Jun 2026 03:24:43 +0000 (20:24 -0700)
* 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.

.bundlewatch.config.json
js/tests/unit/dialog.spec.js
js/tests/unit/drawer.spec.js

index eb14781be686c01ad51390a71a31105bcce8181b..5835ee13835788af36d6100b2aeae02e0e3f965d 100644 (file)
@@ -34,7 +34,7 @@
     },
     {
       "path": "./dist/js/bootstrap.bundle.js",
-      "maxSize": "82.75 kB"
+      "maxSize": "83.5 kB"
     },
     {
       "path": "./dist/js/bootstrap.bundle.min.js",
@@ -42,7 +42,7 @@
     },
     {
       "path": "./dist/js/bootstrap.js",
-      "maxSize": "54.0 kB"
+      "maxSize": "54.5 kB"
     },
     {
       "path": "./dist/js/bootstrap.min.js",
index 223c70f84efa4c0d96760928f2a91b1569fa1c51..e8e5895bdb5b9f351aa8aaff7da15b22b102871e 100644 (file)
@@ -723,12 +723,12 @@ describe('Dialog', () => {
 
         dialogEl.addEventListener('shown.bs.dialog', () => {
           expect(dialogEl.open).toBeTrue()
-          expect(document.body.classList.contains('dialog-open')).toBeTrue()
+          expect(document.documentElement.classList.contains('dialog-open')).toBeTrue()
 
           dialog.dispose()
 
           expect(dialogEl.open).toBeFalse()
-          expect(document.body.classList.contains('dialog-open')).toBeFalse()
+          expect(document.documentElement.classList.contains('dialog-open')).toBeFalse()
           resolve()
         })
 
index f87c10e54ada3eb5f422bc0580d8224a5e393300..5c2eb690f0d363913e5e835de29e887bcd6d8fa6 100644 (file)
@@ -580,12 +580,12 @@ describe('Drawer', () => {
 
         drawerEl.addEventListener('shown.bs.drawer', () => {
           expect(drawerEl.open).toBeTrue()
-          expect(document.body.classList.contains('dialog-open')).toBeTrue()
+          expect(document.documentElement.classList.contains('dialog-open')).toBeTrue()
 
           drawer.dispose()
 
           expect(drawerEl.open).toBeFalse()
-          expect(document.body.classList.contains('dialog-open')).toBeFalse()
+          expect(document.documentElement.classList.contains('dialog-open')).toBeFalse()
           resolve()
         })