From: Mark Otto Date: Sat, 27 Jun 2026 03:24:43 +0000 (-0700) Subject: Tests: fix dialog/drawer dispose-while-open scroll-lock assertions (#42575) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d8019f77d994f10de6f00acf4eddcbd032755b8;p=thirdparty%2Fbootstrap.git 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. --- diff --git a/.bundlewatch.config.json b/.bundlewatch.config.json index eb14781be6..5835ee1383 100644 --- a/.bundlewatch.config.json +++ b/.bundlewatch.config.json @@ -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", diff --git a/js/tests/unit/dialog.spec.js b/js/tests/unit/dialog.spec.js index 223c70f84e..e8e5895bdb 100644 --- a/js/tests/unit/dialog.spec.js +++ b/js/tests/unit/dialog.spec.js @@ -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() }) diff --git a/js/tests/unit/drawer.spec.js b/js/tests/unit/drawer.spec.js index f87c10e54a..5c2eb690f0 100644 --- a/js/tests/unit/drawer.spec.js +++ b/js/tests/unit/drawer.spec.js @@ -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() })