diff --git a/src/web/components/menu/__tests__/__snapshots__/usermenu.jsx.snap b/src/web/components/menu/__tests__/__snapshots__/usermenu.jsx.snap deleted file mode 100644 index 56a85645d9..0000000000 --- a/src/web/components/menu/__tests__/__snapshots__/usermenu.jsx.snap +++ /dev/null @@ -1,435 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`UserMenu component tests > should render UserMenu 1`] = ` -.c7 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-pack: start; - -ms-flex-pack: start; - -webkit-justify-content: start; - justify-content: start; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.c12 { - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; -} - -.c9 { - margin-left: -5px; -} - -.c9>* { - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; -} - -.c9>* { - margin-left: 5px; -} - -.c8 { - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; -} - -.c11 { - cursor: pointer; -} - -.c2 { - height: 24px; - width: 24px; - line-height: 24px; -} - -.c2 * { - height: inherit; - width: inherit; -} - -.c10 { - height: 16px; - width: 16px; - line-height: 16px; -} - -.c10 * { - height: inherit; - width: inherit; -} - -.c1 { - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; -} - -.c4 { - position: relative; - display: none; - -webkit-animation: bNcXmX 0.1s ease-in; - animation: bNcXmX 0.1s ease-in; -} - -.c0:hover .c4 { - display: block; -} - -.c5 { - position: absolute; - margin: 0; - padding: 0; - right: 0; - top: 0; - z-index: 600; - list-style: none; - font-size: 10px; - width: 300px; -} - -.c6 { - height: 30px; - width: 300px; - border-left: 1px solid #7F7F7F; - border-right: 1px solid #7F7F7F; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - background-color: #fff; - padding-left: 12px; -} - -.c6:hover { - background: #11ab51; - color: #fff; - cursor: pointer; -} - -.c6:first-child { - border-top: 1px solid #7F7F7F; - cursor: default; -} - -background-color:#f3f3f3 .c6:first-child:hover { - color: #000; -} - -.c6:nth-child(2) { - cursor: default; -} - -background-color:#f3f3f3 .c6:nth-child(2):hover { - color: #000; -} - -.c6:last-child { - border-top: 1px solid #7F7F7F; - border-bottom: 1px solid #7F7F7F; -} - -.c3 { - margin-right: 10px; -} - -.c13 { - width: 100%; - height: 100%; -} - -.c13:link, -.c13:hover, -.c13:active, -.c13:visited, -.c13:hover { - color: inherit; - -webkit-text-decoration: none; - text-decoration: none; -} - -@media print { - .c11 { - display: none; - } -} - - - - - - - - - - - - - -
- -
-
-`; diff --git a/src/web/components/menu/__tests__/usermenu.jsx b/src/web/components/menu/__tests__/usermenu.jsx index e0effc14ea..d2a69a58a8 100644 --- a/src/web/components/menu/__tests__/usermenu.jsx +++ b/src/web/components/menu/__tests__/usermenu.jsx @@ -32,7 +32,7 @@ describe('UserMenu component tests', () => { const {element} = render(); - expect(element).toMatchSnapshot(); + expect(element).toBeInTheDocument(); }); test('should render username and sessionTimeout', () => { diff --git a/src/web/components/panel/__tests__/infopanel.jsx b/src/web/components/panel/__tests__/infopanel.jsx index 9c7b2bd466..c2132cab53 100644 --- a/src/web/components/panel/__tests__/infopanel.jsx +++ b/src/web/components/panel/__tests__/infopanel.jsx @@ -96,7 +96,7 @@ describe('InfoPanel tests', () => { expect(heading).toHaveStyleRule('background-color', Theme.mediumLightRed); }); - test('should call click handler', () => { + test('should call click handler', async () => { const handleCloseClick = testing.fn(); const {queryByRole} = render( { expect(closeButton).toBeInTheDocument(); - userEvent.click(closeButton); + await userEvent.click(closeButton); expect(handleCloseClick).toHaveBeenCalled(); });