Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 54c1df1

Browse filesBrowse files
committed
tests: update tests and snapshots
1 parent 8ab945e commit 54c1df1
Copy full SHA for 54c1df1

File tree

Expand file treeCollapse file tree

16 files changed

+67
-36
lines changed
Filter options
Expand file treeCollapse file tree

16 files changed

+67
-36
lines changed

‎packages/coreui-react/src/components/button-group/__tests__/CButtonGroup.spec.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/button-group/__tests__/CButtonGroup.spec.tsx
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ test('loads and displays CButtonGroup component', async () => {
1111
test('CButtonGroup customize', async () => {
1212
const { container } = render(
1313
<CButtonGroup className="bazinga" size="lg" vertical={false}>
14-
<CButton>Test A</CButton>
15-
<CButton>Test B</CButton>
16-
<CButton>Test C</CButton>
14+
<CButton color="primary">Test A</CButton>
15+
<CButton color="primary">Test B</CButton>
16+
<CButton color="primary">Test C</CButton>
1717
</CButtonGroup>,
1818
)
1919
expect(container).toMatchSnapshot()
@@ -25,9 +25,9 @@ test('CButtonGroup customize', async () => {
2525
test('CButtonGroup customize vertical', async () => {
2626
const { container } = render(
2727
<CButtonGroup className="bazinga" size="lg" vertical={true}>
28-
<CButton>Test A</CButton>
29-
<CButton>Test B</CButton>
30-
<CButton>Test C</CButton>
28+
<CButton color="primary">Test A</CButton>
29+
<CButton color="primary">Test B</CButton>
30+
<CButton color="primary">Test C</CButton>
3131
</CButtonGroup>,
3232
)
3333
expect(container).toMatchSnapshot()

‎packages/coreui-react/src/components/button-group/__tests__/CButtonToolbar.spec.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/button-group/__tests__/CButtonToolbar.spec.tsx
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ test('CButtonToolbar customize', async () => {
1212
const { container } = render(
1313
<CButtonToolbar className="bazinga" role="group" aria-label="Bazinga">
1414
<CButtonGroup role="group">
15-
<CButton>1</CButton>
16-
<CButton>2</CButton>
17-
<CButton>3</CButton>
15+
<CButton color="primary">1</CButton>
16+
<CButton color="primary">2</CButton>
17+
<CButton color="primary">3</CButton>
1818
</CButtonGroup>
1919
<CButtonGroup role="group">
20-
<CButton>A</CButton>
21-
<CButton>B</CButton>
22-
<CButton>C</CButton>
20+
<CButton color="primary">A</CButton>
21+
<CButton color="primary">B</CButton>
22+
<CButton color="primary">C</CButton>
2323
</CButtonGroup>
2424
</CButtonToolbar>,
2525
)

‎packages/coreui-react/src/components/button/__tests__/CButton.spec.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/button/__tests__/CButton.spec.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '@testing-library/jest-dom'
44
import { CButton } from '../../../index'
55

66
test('loads and displays CButton component', async () => {
7-
const { container } = render(<CButton>Test</CButton>)
7+
const { container } = render(<CButton color="primary">Test</CButton>)
88
expect(container).toMatchSnapshot()
99
})
1010

‎packages/coreui-react/src/components/dropdown/__tests__/CDropdownToggle.spec.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/dropdown/__tests__/CDropdownToggle.spec.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('loads and displays CDropdownToggle component', async () => {
1010

1111
test('CDropdownToggle customize', async () => {
1212
const { container } = render(
13-
<CDropdownToggle caret={true} split={true} trigger="focus">
13+
<CDropdownToggle caret={true} color="primary" split={true} trigger="focus">
1414
Test
1515
</CDropdownToggle>,
1616
)

‎packages/coreui-react/src/components/dropdown/__tests__/__snapshots__/CDropdown.spec.tsx.snap

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/dropdown/__tests__/__snapshots__/CDropdown.spec.tsx.snap
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports[`CDropdown example 1`] = `
1717
>
1818
<button
1919
aria-expanded="false"
20-
class="btn btn-primary dropdown-toggle"
20+
class="btn dropdown-toggle"
2121
tabindex="0"
2222
type="button"
2323
>

‎packages/coreui-react/src/components/dropdown/__tests__/__snapshots__/CDropdownToggle.spec.tsx.snap

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/dropdown/__tests__/__snapshots__/CDropdownToggle.spec.tsx.snap
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports[`CDropdownToggle customize 1`] = `
2020
exports[`loads and displays CDropdownToggle component 1`] = `
2121
<div>
2222
<button
23-
class="btn btn-primary dropdown-toggle"
23+
class="btn dropdown-toggle"
2424
tabindex="0"
2525
type="button"
2626
>

‎packages/coreui-react/src/components/modal/__tests__/CModal.spec.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/modal/__tests__/CModal.spec.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { render, fireEvent } from '@testing-library/react'
3-
import '@testing-library/jest-dom/extend-expect'
3+
import '@testing-library/jest-dom'
44
import { CModal } from '../../../index'
55

66
test('loads and displays CModal component', async () => {

‎packages/coreui-react/src/components/nav/__tests__/__snapshots__/CNavItem.spec.tsx.snap

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/nav/__tests__/__snapshots__/CNavItem.spec.tsx.snap
+12-8Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,39 @@
22

33
exports[`CNavItem customize 1`] = `
44
<div>
5-
<li
5+
<h3
66
class="nav-item bazinga"
77
>
8-
<h3
8+
<a
99
aria-current="page"
10+
aria-disabled="true"
1011
class="nav-link bazinga active disabled"
1112
disabled=""
1213
href="/bazinga"
14+
tabindex="-1"
1315
>
1416
Test
15-
</h3>
16-
</li>
17+
</a>
18+
</h3>
1719
</div>
1820
`;
1921

2022
exports[`CNavItem customize 2`] = `
2123
<div>
22-
<li
24+
<h3
2325
class="nav-item bazinga"
2426
>
25-
<h3
27+
<a
2628
aria-current="page"
29+
aria-disabled="true"
2730
class="nav-link bazinga active disabled"
2831
disabled=""
2932
href="/bazinga"
33+
tabindex="-1"
3034
>
3135
Test
32-
</h3>
33-
</li>
36+
</a>
37+
</h3>
3438
</div>
3539
`;
3640

‎packages/coreui-react/src/components/popover/__tests__/CPopover.spec.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/popover/__tests__/CPopover.spec.tsx
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CPopover, CButton } from '../../../index'
66
test('loads and displays CPopover component', async () => {
77
const { container } = render(
88
<CPopover content="A">
9-
<CButton>Test</CButton>
9+
<CButton color="primary">Test</CButton>
1010
</CPopover>,
1111
)
1212
expect(container).toMatchSnapshot()
@@ -17,7 +17,7 @@ test('CPopover customize', async () => {
1717
let arr, element
1818
const { container } = render(
1919
<CPopover content="content" title="title" trigger="click" placement="right">
20-
<CButton>Test</CButton>
20+
<CButton color="primary">Test</CButton>
2121
</CPopover>,
2222
{ container: document.body },
2323
)

‎packages/coreui-react/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,33 @@
33
exports[`CPopover customize 1`] = `
44
<body>
55
<button
6+
aria-describedby="popover744956"
67
class="btn btn-primary"
78
type="button"
89
>
910
Test
1011
</button>
12+
<div
13+
class="popover bs-popover-auto fade show"
14+
id="popover744956"
15+
role="tooltip"
16+
style="position: absolute; left: 0px; top: 0px; margin: 0px;"
17+
>
18+
<div
19+
class="popover-arrow"
20+
style="position: absolute;"
21+
/>
22+
<div
23+
class="popover-header"
24+
>
25+
title
26+
</div>
27+
<div
28+
class="popover-body"
29+
>
30+
content
31+
</div>
32+
</div>
1133
</body>
1234
`;
1335

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.