Skip to content

Commit 89a9a1d

Browse files
committed
tests: update tests
1 parent 3764848 commit 89a9a1d

File tree

6 files changed

+38
-31
lines changed

6 files changed

+38
-31
lines changed

src/components/modal/__tests__/CModal.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ test('CModal customize', async () => {
1717
fullscreen="xl"
1818
scrollable={true}
1919
size="xl"
20-
transition="fade"
2120
visible={true}
2221
>
2322
Test

src/components/modal/__tests__/CModalBackdrop.spec.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/components/nav/__tests__/__snapshots__/CNav.spec.tsx.snap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,36 @@ exports[`CNav example 1`] = `
4848
>
4949
A
5050
</a>
51+
<ul
52+
aria-hidden="true"
53+
class="dropdown-menu"
54+
role="menu"
55+
>
56+
<li>
57+
<a
58+
class="dropdown-item"
59+
href="#"
60+
>
61+
B
62+
</a>
63+
</li>
64+
<li>
65+
<a
66+
class="dropdown-item"
67+
href="#"
68+
>
69+
C
70+
</a>
71+
</li>
72+
<li>
73+
<a
74+
class="dropdown-item"
75+
href="#"
76+
>
77+
D
78+
</a>
79+
</li>
80+
</ul>
5181
</li>
5282
<li
5383
class="nav-item"

src/components/sidebar/__tests__/CSidebar.spec.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ test('loads and displays CSidebar component', async () => {
1212
expect(container).toMatchSnapshot()
1313
})
1414

15-
test('CSidebar customize hide', async () => {
16-
const { container } = render(<CSidebar hide>Test</CSidebar>)
17-
expect(container).toMatchSnapshot()
18-
expect(container.firstChild).toHaveClass('hide')
19-
})
15+
// test('CSidebar customize hide', async () => {
16+
// const { container } = render(<CSidebar hide>Test</CSidebar>)
17+
// expect(container).toMatchSnapshot()
18+
// expect(container.firstChild).toHaveClass('hide')
19+
// })
2020

2121
test('CSidebar customize show', async () => {
2222
const { container } = render(
2323
<CSidebar
2424
className="bazinga"
25-
hide={false}
25+
// hide={false}
2626
narrow={true}
2727
position="fixed"
2828
selfHiding="lg"

src/components/toast/__tests__/CToast.spec.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ test('CToast customize', async () => {
1515
autohide={false}
1616
color="warning"
1717
delay={100}
18-
dismissible={true}
1918
key={1}
20-
title="title"
2119
visible={true}
2220
//onDismiss
2321
>
@@ -30,8 +28,6 @@ test('CToast customize', async () => {
3028
expect(container.firstChild).toHaveClass('fade')
3129
expect(container.firstChild).toHaveClass('bg-warning')
3230
expect(container.firstChild).toHaveClass('show')
33-
expect(container.firstChild).toHaveStyle('transition: opacity 150ms linear, height 150ms linear')
34-
expect(container.firstChild).toHaveStyle('opacity: 1')
3531
})
3632

3733
test('CToast click on dismiss button', async () => {
@@ -43,9 +39,7 @@ test('CToast click on dismiss button', async () => {
4339
autohide={false}
4440
color="warning"
4541
delay={100}
46-
dismissible={true}
4742
key={1}
48-
title="title"
4943
visible={true}
5044
onDismiss={onDismiss}
5145
>

src/components/toast/__tests__/CToaster.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import { render /* ,screen */ /* ,fireEvent */ /* ,waitFor */ } from '@testing-library/react'
33
import '@testing-library/jest-dom/extend-expect'
4-
import { CToaster } from '../../../index'
4+
import { CToast, CToaster } from '../../../index'
55

66
test('loads and displays CToaster component', async () => {
77
const { container } = render(<CToaster>Test</CToaster>)
@@ -11,7 +11,7 @@ test('loads and displays CToaster component', async () => {
1111
test('CToaster customize', async () => {
1212
const { container } = render(
1313
<CToaster className="bazinga" placement="bottom-start">
14-
Test
14+
<CToast autohide={false}>Toast</CToast>
1515
</CToaster>,
1616
)
1717
expect(container).toMatchSnapshot()

0 commit comments

Comments
 (0)