Skip to content

Commit 52a59f5

Browse files
fix(deps): update dependency @headlessui/vue to v1.7.12 (#2302)
* fix(deps): update dependency @headlessui/vue to v1.7.12 * fix frontend tests --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Stephan Köninger <[email protected]>
1 parent 72c326a commit 52a59f5

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

spring-boot-admin-server-ui/.jest/jest.setup.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@ import '@testing-library/jest-dom';
22

33
import { server } from '@/mocks/server';
44

5+
// Add IntersectionObserver and ResizeObserver to global. HeadlessUI relies on this.
6+
// IntersectionObserver isn't available in test environment
7+
global.IntersectionObserver = jest.fn().mockImplementation(() => ({
8+
observe: jest.fn(),
9+
unobserve: jest.fn(),
10+
disconnect: jest.fn()
11+
}));
12+
global.ResizeObserver = jest.fn().mockImplementation(() => ({
13+
observe: jest.fn(),
14+
unobserve: jest.fn(),
15+
disconnect: jest.fn()
16+
}));
17+
518
afterEach(() => {
619
document.body.innerHTML = '';
720
});
821

922
beforeAll(async () => {
1023
server.listen();
11-
12-
// IntersectionObserver isn't available in test environment
13-
const mockIntersectionObserver = jest.fn();
14-
mockIntersectionObserver.mockReturnValue({
15-
observe: () => null,
16-
unobserve: () => null,
17-
disconnect: () => null,
18-
});
19-
window.IntersectionObserver = mockIntersectionObserver;
2024
});
2125

2226
afterAll((done) => {

spring-boot-admin-server-ui/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spring-boot-admin-server-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@fortawesome/free-regular-svg-icons": "5.15.4",
2222
"@fortawesome/free-solid-svg-icons": "5.15.4",
2323
"@fortawesome/vue-fontawesome": "3.0.3",
24-
"@headlessui/vue": "1.7.10",
24+
"@headlessui/vue": "1.7.12",
2525
"@stekoe/vue-toast-notificationcenter": "https://github.com/SteKoe/vue-toast-notificationcenter/archive/refs/tags/1.0.0-RC3.tar.gz",
2626
"@tailwindcss/forms": "0.5.3",
2727
"@tailwindcss/typography": "0.5.9",

0 commit comments

Comments
 (0)