Skip to content

Commit f455aab

Browse files
committed
tests: update tests
1 parent 2e48f7b commit f455aab

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

packages/coreui-react/src/components/form/__tests__/CFormRange.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import '@testing-library/jest-dom/extend-expect'
44
import { CFormRange } from '../../../index'
55

66
test('loads and displays CFormRange component', async () => {
7-
const { container } = render(<CFormRange steps={3} />)
7+
const { container } = render(<CFormRange step={3} />)
88
expect(container).toMatchSnapshot()
99
})
1010

1111
test('CFormRange customize', async () => {
1212
const { container } = render(
1313
<CFormRange
1414
className="bazinga"
15-
steps={2}
15+
step={2}
1616
disabled={true}
1717
max={150}
1818
min={20}

packages/coreui-react/src/components/form/__tests__/CInputGroupText.spec.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ test('loads and displays CInputGroupText component', async () => {
88
expect(container).toMatchSnapshot()
99
})
1010

11+
test('renders CInputGroupText component as a label', async () => {
12+
const { container } = render(
13+
<CInputGroupText component="label" htmlFor="input">
14+
Test
15+
</CInputGroupText>,
16+
)
17+
expect(container).toMatchSnapshot()
18+
})
19+
1120
test('CInputGroupText customize', async () => {
1221
const { container } = render(<CInputGroupText className="bazinga">Test</CInputGroupText>)
1322
expect(container).toMatchSnapshot()

packages/coreui-react/src/components/form/__tests__/__snapshots__/CInputGroupText.spec.tsx.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,14 @@ exports[`loads and displays CInputGroupText component 1`] = `
1919
</span>
2020
</div>
2121
`;
22+
23+
exports[`renders CInputGroupText component as a label 1`] = `
24+
<div>
25+
<label
26+
class="input-group-text"
27+
for="input"
28+
>
29+
Test
30+
</label>
31+
</div>
32+
`;

0 commit comments

Comments
 (0)