@primer/components 30.0.0-rc.7552fa6d → 30.0.0-rc.9be85598
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/browser.esm.js +1 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.js +1 -1
- package/lib/__tests__/ActionList.js +0 -3
- package/lib/__tests__/ActionMenu.js +0 -3
- package/lib/__tests__/AnchoredOverlay.js +0 -1
- package/lib/__tests__/Avatar.js +1 -4
- package/lib/__tests__/AvatarStack.js +0 -3
- package/lib/__tests__/BorderBox.js +1 -4
- package/lib/__tests__/Box.js +1 -4
- package/lib/__tests__/BranchName.js +1 -4
- package/lib/__tests__/Breadcrumbs.js +1 -4
- package/lib/__tests__/BreadcrumbsItem.js +1 -4
- package/lib/__tests__/Button.js +7 -16
- package/lib/__tests__/CircleBadge.js +0 -4
- package/lib/__tests__/CircleOcticon.js +0 -3
- package/lib/__tests__/CounterLabel.js +1 -4
- package/lib/__tests__/Details.js +1 -4
- package/lib/__tests__/Dialog.js +1 -5
- package/lib/__tests__/Dropdown.js +1 -8
- package/lib/__tests__/DropdownMenu.js +0 -3
- package/lib/__tests__/FilterList.js +1 -4
- package/lib/__tests__/FilterListItem.js +1 -4
- package/lib/__tests__/FilteredSearch.js +1 -4
- package/lib/__tests__/Flash.js +1 -4
- package/lib/__tests__/Flex.js +1 -4
- package/lib/__tests__/FormGroup.js +2 -6
- package/lib/__tests__/Grid.js +1 -4
- package/lib/__tests__/Header.js +3 -8
- package/lib/__tests__/Heading.js +1 -4
- package/lib/__tests__/Label.js +1 -4
- package/lib/__tests__/LabelGroup.js +1 -4
- package/lib/__tests__/Link.js +1 -4
- package/lib/__tests__/Pagehead.js +1 -4
- package/lib/__tests__/Pagination/Pagination.js +0 -3
- package/lib/__tests__/PointerBox.js +1 -4
- package/lib/__tests__/Popover.js +0 -4
- package/lib/__tests__/Position.js +4 -10
- package/lib/__tests__/ProgressBar.js +1 -4
- package/lib/__tests__/SelectPanel.js +0 -3
- package/lib/__tests__/SideNav.js +2 -6
- package/lib/__tests__/Spinner.js +1 -4
- package/lib/__tests__/StateLabel.js +0 -3
- package/lib/__tests__/StyledOcticon.js +0 -3
- package/lib/__tests__/SubNav.js +1 -4
- package/lib/__tests__/SubNavLink.js +1 -4
- package/lib/__tests__/TabNav.js +2 -6
- package/lib/__tests__/Text.js +1 -4
- package/lib/__tests__/TextInput.js +0 -3
- package/lib/__tests__/Timeline.js +2 -7
- package/lib/__tests__/Tooltip.js +1 -4
- package/lib/__tests__/Truncate.js +0 -3
- package/lib/__tests__/UnderlineNav.js +1 -4
- package/lib/__tests__/UnderlineNavLink.js +1 -4
- package/lib/utils/testing.d.ts +0 -1
- package/lib-esm/ActionList/Item.js +1 -1
- package/lib-esm/__tests__/ActionList.js +0 -2
- package/lib-esm/__tests__/ActionMenu.js +0 -2
- package/lib-esm/__tests__/AnchoredOverlay.js +0 -1
- package/lib-esm/__tests__/Avatar.js +1 -3
- package/lib-esm/__tests__/AvatarStack.js +0 -2
- package/lib-esm/__tests__/BorderBox.js +1 -3
- package/lib-esm/__tests__/Box.js +1 -3
- package/lib-esm/__tests__/BranchName.js +1 -3
- package/lib-esm/__tests__/Breadcrumbs.js +1 -3
- package/lib-esm/__tests__/BreadcrumbsItem.js +1 -3
- package/lib-esm/__tests__/Button.js +7 -15
- package/lib-esm/__tests__/CircleBadge.js +0 -3
- package/lib-esm/__tests__/CircleOcticon.js +0 -2
- package/lib-esm/__tests__/CounterLabel.js +1 -3
- package/lib-esm/__tests__/Details.js +1 -3
- package/lib-esm/__tests__/Dialog.js +1 -4
- package/lib-esm/__tests__/Dropdown.js +1 -7
- package/lib-esm/__tests__/DropdownMenu.js +0 -2
- package/lib-esm/__tests__/FilterList.js +1 -3
- package/lib-esm/__tests__/FilterListItem.js +1 -3
- package/lib-esm/__tests__/FilteredSearch.js +1 -3
- package/lib-esm/__tests__/Flash.js +1 -3
- package/lib-esm/__tests__/Flex.js +1 -3
- package/lib-esm/__tests__/FormGroup.js +2 -5
- package/lib-esm/__tests__/Grid.js +1 -3
- package/lib-esm/__tests__/Header.js +3 -7
- package/lib-esm/__tests__/Heading.js +1 -3
- package/lib-esm/__tests__/Label.js +1 -3
- package/lib-esm/__tests__/LabelGroup.js +1 -3
- package/lib-esm/__tests__/Link.js +1 -3
- package/lib-esm/__tests__/Pagehead.js +1 -3
- package/lib-esm/__tests__/Pagination/Pagination.js +0 -2
- package/lib-esm/__tests__/PointerBox.js +1 -3
- package/lib-esm/__tests__/Popover.js +0 -3
- package/lib-esm/__tests__/Position.js +4 -9
- package/lib-esm/__tests__/ProgressBar.js +1 -3
- package/lib-esm/__tests__/SelectPanel.js +0 -2
- package/lib-esm/__tests__/SideNav.js +2 -5
- package/lib-esm/__tests__/Spinner.js +1 -3
- package/lib-esm/__tests__/StateLabel.js +0 -2
- package/lib-esm/__tests__/StyledOcticon.js +0 -2
- package/lib-esm/__tests__/SubNav.js +1 -3
- package/lib-esm/__tests__/SubNavLink.js +1 -3
- package/lib-esm/__tests__/TabNav.js +2 -5
- package/lib-esm/__tests__/Text.js +1 -3
- package/lib-esm/__tests__/TextInput.js +0 -2
- package/lib-esm/__tests__/Timeline.js +2 -6
- package/lib-esm/__tests__/Tooltip.js +1 -3
- package/lib-esm/__tests__/Truncate.js +0 -2
- package/lib-esm/__tests__/UnderlineNav.js +1 -3
- package/lib-esm/__tests__/UnderlineNavLink.js +1 -3
- package/lib-esm/utils/testing.d.ts +0 -1
- package/package-lock.json +69 -15
- package/package.json +3 -3
- package/src/ActionList/Item.tsx +1 -1
- package/src/__tests__/ActionList.tsx +0 -2
- package/src/__tests__/ActionMenu.tsx +0 -2
- package/src/__tests__/AnchoredOverlay.tsx +0 -1
- package/src/__tests__/Avatar.tsx +1 -2
- package/src/__tests__/AvatarStack.tsx +1 -2
- package/src/__tests__/BorderBox.tsx +1 -2
- package/src/__tests__/Box.tsx +1 -2
- package/src/__tests__/BranchName.tsx +1 -2
- package/src/__tests__/Breadcrumbs.tsx +1 -2
- package/src/__tests__/BreadcrumbsItem.tsx +1 -2
- package/src/__tests__/Button.tsx +7 -8
- package/src/__tests__/CircleBadge.tsx +0 -3
- package/src/__tests__/CircleOcticon.tsx +0 -2
- package/src/__tests__/CounterLabel.tsx +1 -2
- package/src/__tests__/Details.tsx +1 -2
- package/src/__tests__/Dialog.tsx +1 -3
- package/src/__tests__/Dropdown.tsx +2 -6
- package/src/__tests__/DropdownMenu.tsx +0 -2
- package/src/__tests__/FilterList.tsx +1 -2
- package/src/__tests__/FilterListItem.tsx +1 -2
- package/src/__tests__/FilteredSearch.tsx +1 -2
- package/src/__tests__/Flash.tsx +1 -2
- package/src/__tests__/Flex.tsx +1 -2
- package/src/__tests__/FormGroup.tsx +2 -3
- package/src/__tests__/Grid.tsx +1 -2
- package/src/__tests__/Header.tsx +3 -4
- package/src/__tests__/Heading.tsx +1 -2
- package/src/__tests__/Label.tsx +1 -2
- package/src/__tests__/LabelGroup.tsx +1 -2
- package/src/__tests__/Link.tsx +1 -2
- package/src/__tests__/Pagehead.tsx +1 -2
- package/src/__tests__/Pagination/Pagination.tsx +1 -2
- package/src/__tests__/PointerBox.tsx +1 -2
- package/src/__tests__/Popover.tsx +2 -3
- package/src/__tests__/Position.tsx +4 -5
- package/src/__tests__/ProgressBar.tsx +1 -2
- package/src/__tests__/SelectPanel.tsx +0 -2
- package/src/__tests__/SideNav.tsx +2 -3
- package/src/__tests__/Spinner.tsx +1 -3
- package/src/__tests__/StateLabel.tsx +0 -2
- package/src/__tests__/StyledOcticon.tsx +0 -2
- package/src/__tests__/SubNav.tsx +1 -2
- package/src/__tests__/SubNavLink.tsx +1 -2
- package/src/__tests__/TabNav.tsx +2 -3
- package/src/__tests__/Text.tsx +1 -2
- package/src/__tests__/TextInput.tsx +1 -2
- package/src/__tests__/Timeline.tsx +3 -4
- package/src/__tests__/Tooltip.tsx +1 -2
- package/src/__tests__/Truncate.tsx +0 -2
- package/src/__tests__/UnderlineNav.tsx +1 -2
- package/src/__tests__/UnderlineNavLink.tsx +1 -2
- package/src/utils/testing.tsx +0 -1
- package/stats.html +1 -1
package/src/__tests__/Button.tsx
CHANGED
@@ -10,7 +10,6 @@ import {
|
|
10
10
|
ButtonTableList
|
11
11
|
} from '..'
|
12
12
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
13
|
-
import {COMMON, FLEX, LAYOUT, TYPOGRAPHY} from '../constants'
|
14
13
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
15
14
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
16
15
|
import 'babel-polyfill'
|
@@ -20,7 +19,7 @@ expect.extend(toHaveNoViolations)
|
|
20
19
|
function noop() {}
|
21
20
|
|
22
21
|
describe('Button', () => {
|
23
|
-
behavesAsComponent({Component: Button
|
22
|
+
behavesAsComponent({Component: Button})
|
24
23
|
|
25
24
|
checkExports('Button', {
|
26
25
|
default: Button,
|
@@ -69,7 +68,7 @@ describe('Button', () => {
|
|
69
68
|
})
|
70
69
|
|
71
70
|
describe('ButtonPrimary', () => {
|
72
|
-
behavesAsComponent({Component: ButtonPrimary
|
71
|
+
behavesAsComponent({Component: ButtonPrimary})
|
73
72
|
|
74
73
|
it('renders a <button>', () => {
|
75
74
|
expect(render(<ButtonPrimary />).type).toEqual('button')
|
@@ -82,7 +81,7 @@ describe('ButtonPrimary', () => {
|
|
82
81
|
})
|
83
82
|
|
84
83
|
describe('ButtonDanger', () => {
|
85
|
-
behavesAsComponent({Component: ButtonDanger
|
84
|
+
behavesAsComponent({Component: ButtonDanger})
|
86
85
|
|
87
86
|
it('renders a <button>', () => {
|
88
87
|
expect(render(<ButtonDanger />).type).toEqual('button')
|
@@ -95,7 +94,7 @@ describe('ButtonDanger', () => {
|
|
95
94
|
})
|
96
95
|
|
97
96
|
describe('ButtonOutline', () => {
|
98
|
-
behavesAsComponent({Component: ButtonOutline
|
97
|
+
behavesAsComponent({Component: ButtonOutline})
|
99
98
|
|
100
99
|
it('renders a <button> by default', () => {
|
101
100
|
expect(render(<ButtonOutline />).type).toEqual('button')
|
@@ -108,7 +107,7 @@ describe('ButtonOutline', () => {
|
|
108
107
|
})
|
109
108
|
|
110
109
|
describe('ButtonInvisible', () => {
|
111
|
-
behavesAsComponent({Component: ButtonOutline
|
110
|
+
behavesAsComponent({Component: ButtonOutline})
|
112
111
|
|
113
112
|
it('renders a <button> by default', () => {
|
114
113
|
expect(render(<ButtonInvisible />).type).toEqual('button')
|
@@ -121,9 +120,9 @@ describe('ButtonInvisible', () => {
|
|
121
120
|
})
|
122
121
|
|
123
122
|
describe('ButtonGroup', () => {
|
124
|
-
behavesAsComponent({Component: ButtonGroup
|
123
|
+
behavesAsComponent({Component: ButtonGroup})
|
125
124
|
})
|
126
125
|
|
127
126
|
describe('ButtonTableList', () => {
|
128
|
-
behavesAsComponent({Component: ButtonTableList
|
127
|
+
behavesAsComponent({Component: ButtonTableList})
|
129
128
|
})
|
@@ -2,7 +2,6 @@ import React from 'react'
|
|
2
2
|
import {CircleBadge} from '..'
|
3
3
|
import {CheckIcon} from '@primer/octicons-react'
|
4
4
|
import {render, mount, behavesAsComponent, checkExports} from '../utils/testing'
|
5
|
-
import {COMMON} from '../constants'
|
6
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
7
6
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
8
7
|
import 'babel-polyfill'
|
@@ -13,7 +12,6 @@ const imgInput = <img alt="" src="primer.jpg" />
|
|
13
12
|
describe('CircleBadge', () => {
|
14
13
|
behavesAsComponent({
|
15
14
|
Component: CircleBadge,
|
16
|
-
systemPropArray: [COMMON],
|
17
15
|
toRender: () => <CircleBadge>{imgInput}</CircleBadge>
|
18
16
|
})
|
19
17
|
|
@@ -24,7 +22,6 @@ describe('CircleBadge', () => {
|
|
24
22
|
describe('CircleBadge.Icon', () => {
|
25
23
|
behavesAsComponent({
|
26
24
|
Component: CircleBadge.Icon,
|
27
|
-
systemPropArray: [COMMON],
|
28
25
|
toRender: () => <CircleBadge.Icon icon={CheckIcon} />
|
29
26
|
})
|
30
27
|
})
|
@@ -3,7 +3,6 @@ import {CheckIcon} from '@primer/octicons-react'
|
|
3
3
|
import theme from '../theme'
|
4
4
|
import {CircleOcticon} from '..'
|
5
5
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
6
|
-
import {COMMON, FLEX, LAYOUT} from '../constants'
|
7
6
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
8
7
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
9
8
|
import 'babel-polyfill'
|
@@ -12,7 +11,6 @@ expect.extend(toHaveNoViolations)
|
|
12
11
|
describe('CircleOcticon', () => {
|
13
12
|
behavesAsComponent({
|
14
13
|
Component: CircleOcticon,
|
15
|
-
systemPropArray: [COMMON, FLEX, LAYOUT],
|
16
14
|
toRender: () => <CircleOcticon icon={CheckIcon} />
|
17
15
|
})
|
18
16
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {CounterLabel} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import theme from '../theme'
|
6
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
7
6
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
@@ -10,7 +9,7 @@ import 'babel-polyfill'
|
|
10
9
|
expect.extend(toHaveNoViolations)
|
11
10
|
|
12
11
|
describe('CounterLabel', () => {
|
13
|
-
behavesAsComponent({Component: CounterLabel
|
12
|
+
behavesAsComponent({Component: CounterLabel})
|
14
13
|
|
15
14
|
checkExports('CounterLabel', {
|
16
15
|
default: CounterLabel
|
@@ -2,14 +2,13 @@ import React from 'react'
|
|
2
2
|
import {Details, useDetails, Button, ButtonPrimary, Box} from '..'
|
3
3
|
import {ButtonProps} from '../Button/Button'
|
4
4
|
import {mount, behavesAsComponent, checkExports} from '../utils/testing'
|
5
|
-
import {COMMON} from '../constants'
|
6
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
7
6
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
8
7
|
import 'babel-polyfill'
|
9
8
|
expect.extend(toHaveNoViolations)
|
10
9
|
|
11
10
|
describe('Details', () => {
|
12
|
-
behavesAsComponent({Component: Details
|
11
|
+
behavesAsComponent({Component: Details})
|
13
12
|
|
14
13
|
checkExports('Details', {
|
15
14
|
default: Details
|
package/src/__tests__/Dialog.tsx
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, {useState, useRef} from 'react'
|
2
2
|
import {Dialog, Box, Text, Button} from '..'
|
3
|
-
import {COMMON, FLEX, LAYOUT} from '../constants'
|
4
3
|
import {render as HTMLRender, cleanup, act, fireEvent} from '@testing-library/react'
|
5
4
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
6
5
|
import 'babel-polyfill'
|
@@ -75,7 +74,6 @@ describe('Dialog', () => {
|
|
75
74
|
// because Dialog returns a React fragment the as and sx tests fail always, so they are skipped
|
76
75
|
behavesAsComponent({
|
77
76
|
Component: Dialog,
|
78
|
-
systemPropArray: [COMMON, LAYOUT],
|
79
77
|
toRender: () => comp,
|
80
78
|
options: {skipAs: true, skipSx: true}
|
81
79
|
})
|
@@ -85,7 +83,7 @@ describe('Dialog', () => {
|
|
85
83
|
})
|
86
84
|
|
87
85
|
describe('Dialog.Header', () => {
|
88
|
-
behavesAsComponent({Component: Dialog.Header
|
86
|
+
behavesAsComponent({Component: Dialog.Header})
|
89
87
|
})
|
90
88
|
|
91
89
|
it('should have no axe violations', async () => {
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Dropdown} from '..'
|
3
3
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Dropdown', () => {
|
11
|
-
behavesAsComponent({Component: Dropdown,
|
10
|
+
behavesAsComponent({Component: Dropdown, toRender: () => <Dropdown>Hello!</Dropdown>})
|
12
11
|
|
13
12
|
checkExports('Dropdown', {
|
14
13
|
default: Dropdown
|
@@ -25,7 +24,6 @@ describe('Dropdown', () => {
|
|
25
24
|
describe('Dropdown.Item', () => {
|
26
25
|
behavesAsComponent({
|
27
26
|
Component: Dropdown.Item,
|
28
|
-
systemPropArray: [COMMON],
|
29
27
|
toRender: () => <Dropdown.Item>Hello!</Dropdown.Item>
|
30
28
|
})
|
31
29
|
})
|
@@ -33,19 +31,17 @@ describe('Dropdown.Item', () => {
|
|
33
31
|
describe('Dropdown.Button', () => {
|
34
32
|
behavesAsComponent({
|
35
33
|
Component: Dropdown.Button,
|
36
|
-
systemPropArray: [COMMON],
|
37
34
|
toRender: () => <Dropdown.Button>Hello!</Dropdown.Button>
|
38
35
|
})
|
39
36
|
})
|
40
37
|
|
41
38
|
describe('Dropdown.Caret', () => {
|
42
|
-
behavesAsComponent({Component: Dropdown.Caret
|
39
|
+
behavesAsComponent({Component: Dropdown.Caret})
|
43
40
|
})
|
44
41
|
|
45
42
|
describe('Dropdown.Menu', () => {
|
46
43
|
behavesAsComponent({
|
47
44
|
Component: Dropdown.Menu,
|
48
|
-
systemPropArray: [COMMON],
|
49
45
|
toRender: () => (
|
50
46
|
<Dropdown.Menu>
|
51
47
|
<li key="a">1</li>
|
@@ -4,7 +4,6 @@ import {axe, toHaveNoViolations} from 'jest-axe'
|
|
4
4
|
import React from 'react'
|
5
5
|
import theme from '../theme'
|
6
6
|
import {DropdownMenu, DropdownButton} from '../DropdownMenu'
|
7
|
-
import {COMMON} from '../constants'
|
8
7
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
9
8
|
import {BaseStyles, ThemeProvider, SSRProvider} from '..'
|
10
9
|
import {ItemInput} from '../ActionList/List'
|
@@ -41,7 +40,6 @@ describe('DropdownMenu', () => {
|
|
41
40
|
|
42
41
|
behavesAsComponent({
|
43
42
|
Component: DropdownMenu,
|
44
|
-
systemPropArray: [COMMON],
|
45
43
|
options: {skipAs: true, skipSx: true},
|
46
44
|
toRender: () => (
|
47
45
|
<SSRProvider>
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {FilterList} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('FilterList', () => {
|
11
|
-
behavesAsComponent({Component: FilterList
|
10
|
+
behavesAsComponent({Component: FilterList})
|
12
11
|
|
13
12
|
checkExports('FilterList', {
|
14
13
|
default: FilterList
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {FilterList} from '..'
|
3
3
|
import {render, behavesAsComponent} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('FilterList.Item', () => {
|
11
|
-
behavesAsComponent({Component: FilterList.Item
|
10
|
+
behavesAsComponent({Component: FilterList.Item})
|
12
11
|
|
13
12
|
it('should have no axe violations', async () => {
|
14
13
|
const {container} = HTMLRender(<FilterList.Item>stuff</FilterList.Item>)
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {FilteredSearch} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('FilteredSearch', () => {
|
11
|
-
behavesAsComponent({Component: FilteredSearch
|
10
|
+
behavesAsComponent({Component: FilteredSearch})
|
12
11
|
|
13
12
|
checkExports('FilteredSearch', {
|
14
13
|
default: FilteredSearch
|
package/src/__tests__/Flash.tsx
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Flash} from '..'
|
3
|
-
import {COMMON} from '../constants'
|
4
3
|
import theme from '../theme'
|
5
4
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
6
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
@@ -9,7 +8,7 @@ import 'babel-polyfill'
|
|
9
8
|
expect.extend(toHaveNoViolations)
|
10
9
|
|
11
10
|
describe('Flash', () => {
|
12
|
-
behavesAsComponent({Component: Flash
|
11
|
+
behavesAsComponent({Component: Flash})
|
13
12
|
|
14
13
|
checkExports('Flash', {
|
15
14
|
default: Flash
|
package/src/__tests__/Flex.tsx
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Flex} from '..'
|
3
|
-
import {COMMON, FLEX, LAYOUT} from '../constants'
|
4
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
@@ -8,7 +7,7 @@ import 'babel-polyfill'
|
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Flex', () => {
|
11
|
-
behavesAsComponent({Component: Flex
|
10
|
+
behavesAsComponent({Component: Flex})
|
12
11
|
|
13
12
|
checkExports('Flex', {
|
14
13
|
default: Flex
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {FormGroup} from '..'
|
3
|
-
import {COMMON, TYPOGRAPHY} from '../constants'
|
4
3
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
@@ -8,7 +7,7 @@ import 'babel-polyfill'
|
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('FormGroup', () => {
|
11
|
-
behavesAsComponent({Component: FormGroup
|
10
|
+
behavesAsComponent({Component: FormGroup})
|
12
11
|
|
13
12
|
checkExports('FormGroup', {
|
14
13
|
default: FormGroup
|
@@ -28,7 +27,7 @@ describe('FormGroup', () => {
|
|
28
27
|
})
|
29
28
|
|
30
29
|
describe('FormGroup.Label', () => {
|
31
|
-
behavesAsComponent({Component: FormGroup.Label
|
30
|
+
behavesAsComponent({Component: FormGroup.Label})
|
32
31
|
|
33
32
|
it('should have no axe violations', async () => {
|
34
33
|
const {container} = HTMLRender(<FormGroup.Label htmlFor="example-text">Example text</FormGroup.Label>)
|
package/src/__tests__/Grid.tsx
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Grid} from '..'
|
3
|
-
import {COMMON, FLEX, LAYOUT, GRID} from '../constants'
|
4
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
@@ -8,7 +7,7 @@ import 'babel-polyfill'
|
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Grid', () => {
|
11
|
-
behavesAsComponent({Component: Grid
|
10
|
+
behavesAsComponent({Component: Grid})
|
12
11
|
|
13
12
|
checkExports('Grid', {
|
14
13
|
default: Grid
|
package/src/__tests__/Header.tsx
CHANGED
@@ -1,25 +1,24 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Header} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {BORDER, COMMON, TYPOGRAPHY} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Header', () => {
|
11
|
-
behavesAsComponent({Component: Header
|
10
|
+
behavesAsComponent({Component: Header})
|
12
11
|
|
13
12
|
checkExports('Header', {
|
14
13
|
default: Header
|
15
14
|
})
|
16
15
|
|
17
16
|
describe('Header.Item', () => {
|
18
|
-
behavesAsComponent({Component: Header.Item
|
17
|
+
behavesAsComponent({Component: Header.Item})
|
19
18
|
})
|
20
19
|
|
21
20
|
describe('Header.Link', () => {
|
22
|
-
behavesAsComponent({Component: Header.Link
|
21
|
+
behavesAsComponent({Component: Header.Link})
|
23
22
|
})
|
24
23
|
|
25
24
|
it('should have no axe violations', async () => {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Heading} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {TYPOGRAPHY, COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
@@ -31,7 +30,7 @@ const theme = {
|
|
31
30
|
}
|
32
31
|
|
33
32
|
describe('Heading', () => {
|
34
|
-
behavesAsComponent({Component: Heading
|
33
|
+
behavesAsComponent({Component: Heading})
|
35
34
|
|
36
35
|
checkExports('Heading', {
|
37
36
|
default: Heading
|
package/src/__tests__/Label.tsx
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Label} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Label', () => {
|
11
|
-
behavesAsComponent({Component: Label
|
10
|
+
behavesAsComponent({Component: Label})
|
12
11
|
|
13
12
|
checkExports('Label', {
|
14
13
|
default: Label
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {LabelGroup, Label} from '..'
|
3
3
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
@@ -16,7 +15,7 @@ const comp = (
|
|
16
15
|
)
|
17
16
|
|
18
17
|
describe('LabelGroup', () => {
|
19
|
-
behavesAsComponent({Component: LabelGroup
|
18
|
+
behavesAsComponent({Component: LabelGroup})
|
20
19
|
|
21
20
|
checkExports('LabelGroup', {
|
22
21
|
default: LabelGroup
|
package/src/__tests__/Link.tsx
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Link} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON, TYPOGRAPHY} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Link', () => {
|
11
|
-
behavesAsComponent({Component: Link
|
10
|
+
behavesAsComponent({Component: Link})
|
12
11
|
|
13
12
|
checkExports('Link', {
|
14
13
|
default: Link
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Pagehead} from '..'
|
3
|
-
import {COMMON} from '../constants'
|
4
3
|
import theme from '../theme'
|
5
4
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
6
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
@@ -9,7 +8,7 @@ import 'babel-polyfill'
|
|
9
8
|
expect.extend(toHaveNoViolations)
|
10
9
|
|
11
10
|
describe('Pagehead', () => {
|
12
|
-
behavesAsComponent({Component: Pagehead
|
11
|
+
behavesAsComponent({Component: Pagehead})
|
13
12
|
|
14
13
|
checkExports('Pagehead', {
|
15
14
|
default: Pagehead
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Pagination from '../../Pagination'
|
3
3
|
import {behavesAsComponent} from '../../utils/testing'
|
4
|
-
import {COMMON} from '../../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
@@ -11,7 +10,7 @@ const reqProps = {pageCount: 10, currentPage: 1}
|
|
11
10
|
const comp = <Pagination {...reqProps} />
|
12
11
|
|
13
12
|
describe('Pagination', () => {
|
14
|
-
behavesAsComponent({Component: Pagination,
|
13
|
+
behavesAsComponent({Component: Pagination, toRender: () => comp})
|
15
14
|
|
16
15
|
it('should have no axe violations', async () => {
|
17
16
|
const {container} = HTMLRender(comp)
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {PointerBox} from '..'
|
3
|
-
import {COMMON, LAYOUT, BORDER, FLEX} from '../constants'
|
4
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
@@ -8,7 +7,7 @@ import 'babel-polyfill'
|
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('PointerBox', () => {
|
11
|
-
behavesAsComponent({Component: PointerBox
|
10
|
+
behavesAsComponent({Component: PointerBox})
|
12
11
|
|
13
12
|
checkExports('PointerBox', {
|
14
13
|
default: PointerBox
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Popover, {PopoverProps} from '../Popover'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {BORDER, COMMON, LAYOUT, POSITION} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
@@ -14,14 +13,14 @@ const comp = (
|
|
14
13
|
)
|
15
14
|
|
16
15
|
describe('Popover', () => {
|
17
|
-
behavesAsComponent({Component: Popover,
|
16
|
+
behavesAsComponent({Component: Popover, toRender: () => comp})
|
18
17
|
|
19
18
|
checkExports('Popover', {
|
20
19
|
default: Popover
|
21
20
|
})
|
22
21
|
|
23
22
|
describe('Popover.Content', () => {
|
24
|
-
behavesAsComponent({Component: Popover.Content,
|
23
|
+
behavesAsComponent({Component: Popover.Content, toRender: () => comp})
|
25
24
|
})
|
26
25
|
|
27
26
|
it('should have no axe violations', async () => {
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import {LAYOUT, POSITION} from '../constants'
|
3
2
|
import {Box, Position, Absolute, Fixed, Relative, Sticky} from '..'
|
4
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
@@ -9,7 +8,7 @@ expect.extend(toHaveNoViolations)
|
|
9
8
|
|
10
9
|
describe('position components', () => {
|
11
10
|
describe('Absolute', () => {
|
12
|
-
behavesAsComponent({Component: Absolute
|
11
|
+
behavesAsComponent({Component: Absolute})
|
13
12
|
|
14
13
|
checkExports('Position', {
|
15
14
|
default: Position,
|
@@ -41,7 +40,7 @@ describe('position components', () => {
|
|
41
40
|
})
|
42
41
|
|
43
42
|
describe('Fixed', () => {
|
44
|
-
behavesAsComponent({Component: Fixed
|
43
|
+
behavesAsComponent({Component: Fixed})
|
45
44
|
|
46
45
|
it('respects the "as" prop', () => {
|
47
46
|
expect(render(<Fixed as="span" />).type).toEqual('span')
|
@@ -69,7 +68,7 @@ describe('position components', () => {
|
|
69
68
|
})
|
70
69
|
|
71
70
|
describe('Relative', () => {
|
72
|
-
behavesAsComponent({Component: Relative
|
71
|
+
behavesAsComponent({Component: Relative})
|
73
72
|
|
74
73
|
it('should have no axe violations', async () => {
|
75
74
|
const {container} = HTMLRender(<Relative />)
|
@@ -93,7 +92,7 @@ describe('position components', () => {
|
|
93
92
|
})
|
94
93
|
|
95
94
|
describe('Sticky', () => {
|
96
|
-
behavesAsComponent({Component: Sticky
|
95
|
+
behavesAsComponent({Component: Sticky})
|
97
96
|
|
98
97
|
it('should have no axe violations', async () => {
|
99
98
|
const {container} = HTMLRender(<Sticky />)
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {ProgressBar} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('ProgressBar', () => {
|
11
|
-
behavesAsComponent({Component: ProgressBar
|
10
|
+
behavesAsComponent({Component: ProgressBar})
|
12
11
|
|
13
12
|
checkExports('ProgressBar', {
|
14
13
|
default: ProgressBar
|
@@ -4,7 +4,6 @@ import {axe, toHaveNoViolations} from 'jest-axe'
|
|
4
4
|
import React from 'react'
|
5
5
|
import theme from '../theme'
|
6
6
|
import {SelectPanel} from '../SelectPanel'
|
7
|
-
import {COMMON} from '../constants'
|
8
7
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
9
8
|
import {BaseStyles, SSRProvider, ThemeProvider} from '..'
|
10
9
|
import {ItemInput} from '../ActionList/List'
|
@@ -46,7 +45,6 @@ describe('SelectPanel', () => {
|
|
46
45
|
|
47
46
|
behavesAsComponent({
|
48
47
|
Component: SelectPanel,
|
49
|
-
systemPropArray: [COMMON],
|
50
48
|
options: {skipAs: true, skipSx: true},
|
51
49
|
toRender: () => <SimpleSelectPanel />
|
52
50
|
})
|
@@ -1,21 +1,20 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {SideNav} from '..'
|
3
3
|
import {render, behavesAsComponent, mount, checkExports} from '../utils/testing'
|
4
|
-
import {BORDER, COMMON, LAYOUT, FLEX, TYPOGRAPHY} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('SideNav', () => {
|
11
|
-
behavesAsComponent({Component: SideNav
|
10
|
+
behavesAsComponent({Component: SideNav})
|
12
11
|
|
13
12
|
checkExports('SideNav', {
|
14
13
|
default: SideNav
|
15
14
|
})
|
16
15
|
|
17
16
|
describe('SideNav.Link', () => {
|
18
|
-
behavesAsComponent({Component: SideNav.Link
|
17
|
+
behavesAsComponent({Component: SideNav.Link})
|
19
18
|
})
|
20
19
|
|
21
20
|
it('should have no axe violations', async () => {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Spinner, SpinnerProps} from '..'
|
3
3
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
@@ -13,8 +12,7 @@ describe('Spinner', () => {
|
|
13
12
|
})
|
14
13
|
|
15
14
|
behavesAsComponent({
|
16
|
-
Component: Spinner
|
17
|
-
systemPropArray: [COMMON]
|
15
|
+
Component: Spinner
|
18
16
|
})
|
19
17
|
|
20
18
|
checkExports('Spinner', {
|