diff --git a/packages/core/popper/tests/__snapshots__/popper.test.ts.snap b/packages/core/popper/tests/__snapshots__/popper.test.ts.snap index a806791f5..8f291c876 100644 --- a/packages/core/popper/tests/__snapshots__/popper.test.ts.snap +++ b/packages/core/popper/tests/__snapshots__/popper.test.ts.snap @@ -1,41 +1,376 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`OkuPopper > Animated > document.body has correct html 1`] = `"
open
"`; +exports[`OkuPopper > Animated > document.body has correct html 1`] = ` + +
+
+
+
+
+
+
+ + +
+ open +
+ + + + +
+
+
+
+ + + + + + +
+
+ + +`; exports[`OkuPopper > Animated > renders correctly 1`] = ` -"
-
open
- - -
" + +
+
+
+
+
+
+ + +
+ open +
+ + + + +
+
+
+
+ + + + + + +
+
+ + +`; + +exports[`OkuPopper > Animated > should be able to close 1`] = ` + +
+
+
+
+
+
+
+
+ + +
+ open +
+ + + +
+
+ `; -exports[`OkuPopper > Animated > should be able to close 1`] = `"
open
"`; +exports[`OkuPopper > OkuPopper renders correctly 1`] = `""`; exports[`OkuPopper > OneScroll > renders correctly 1`] = `"

In scrolling container

9
9
"`; exports[`OkuPopper > OneScroll > should be able to close 1`] = `"

In scrolling container

9
9
"`; exports[`OkuPopper > StyledVue > renders correctly 1`] = ` -"
-
open
-
-
+ +
+
+
+ + +
+ open +
+
+
+ + + + + + +
+
+ + +
-
" + `; exports[`OkuPopper > StyledVue > should be able to close 1`] = ` -"
-
open
- -
" + +
+
+
+
+ + +
+ open +
+ + + +
+
+ `; exports[`OkuPopper > Transition > renders correctly 1`] = ` -"
Open
- -" + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ Open +
+ + + +
+ +
+
+ + + + + + +
+
+
+ + `; exports[`OkuPopper > Transition > renders correctly 2`] = `"
Open
"`; @@ -43,18 +378,202 @@ exports[`OkuPopper > Transition > renders correctly 2`] = `"
Transition > should be able to close 1`] = `"
Open
"`; exports[`OkuPopper > WithCustomArrow > renders correctly 1`] = ` -"
-
open
-
-
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ open +
+
+
+ + +
+ +
+
+ + +
-
" + `; exports[`OkuPopper > WithPortal > renders correctly 1`] = ` -"
-
open
- - -
" + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ open +
+ + + + +
+
+
+
+ + + + + + +
+
+ + `; diff --git a/packages/core/popper/tests/popper.test.ts b/packages/core/popper/tests/popper.test.ts index f34dda282..bd4b1a694 100644 --- a/packages/core/popper/tests/popper.test.ts +++ b/packages/core/popper/tests/popper.test.ts @@ -22,7 +22,7 @@ enableAutoUnmount(afterEach) describe('OkuPopper', () => { it('OkuPopper renders correctly', () => { const wrapper = mount(OkuPopper) - expect(wrapper.html()).toBe('') + expect(wrapper.html()).toMatchSnapshot() }) it('OkuPopperArrow renders correctly', () => { @@ -72,14 +72,14 @@ describe('OkuPopper', () => { }) it('renders correctly', () => { - expect(wrapper.html()).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) it('should be able to close', async () => { const button = wrapper.find('button') await button.trigger('click') await nextTick() - expect(wrapper.html()).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) }) @@ -106,18 +106,18 @@ describe('OkuPopper', () => { }) test('renders correctly', () => { - expect(wrapper.html()).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) test('document.body has correct html', () => { - expect(document.body.innerHTML).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) test('should be able to close', async () => { const button = document.querySelector('button') button?.dispatchEvent(new Event('click')) await nextTick() - expect(document.body.innerHTML).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) }) @@ -171,7 +171,7 @@ describe('OkuPopper', () => { }) test('renders correctly', () => { - expect(wrapper.html()).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) test('renders correctly', () => { @@ -205,7 +205,7 @@ describe('OkuPopper', () => { }) test('renders correctly', () => { - expect(wrapper.html()).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) }) @@ -228,7 +228,7 @@ describe('OkuPopper', () => { }) test('renders correctly', () => { - expect(wrapper.html()).toMatchSnapshot() + expect(document.body).toMatchSnapshot() }) }) })