@@ -3,7 +3,6 @@ import {describe, expect, test} from 'vitest'
33import {
44 ActionList ,
55 Box ,
6- Breadcrumbs ,
76 Button ,
87 Dialog ,
98 Flash ,
@@ -18,8 +17,6 @@ import {
1817 Spinner ,
1918 Text ,
2019 TextInput ,
21- Timeline ,
22- Truncate ,
2320 UnderlineNav ,
2421} from '../'
2522
@@ -35,17 +32,6 @@ describe('@primer/react', () => {
3532 expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
3633 } )
3734
38- test ( 'Breadcrumbs supports `sx` prop' , ( ) => {
39- render ( < Breadcrumbs sx = { { background : 'red' } } /> )
40- expect ( window . getComputedStyle ( screen . getByLabelText ( 'Breadcrumbs' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
41- } )
42-
43- test ( 'Breadcrumbs.Item supports `sx` prop' , ( ) => {
44- render ( < Breadcrumbs . Item as = "li" data-testid = "component" sx = { { background : 'red' } } selected /> )
45- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
46- expect ( screen . getByTestId ( 'component' ) . className . includes ( 'selected' ) ) . toBe ( true )
47- } )
48-
4935 test ( 'Button supports `sx` prop' , ( ) => {
5036 render ( < Button as = "button" data-testid = "component" sx = { { background : 'red' } } size = "medium" /> )
5137 expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
@@ -197,37 +183,6 @@ describe('@primer/react', () => {
197183 expect ( window . getComputedStyle ( screen . getByRole ( 'button' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
198184 } )
199185
200- test ( 'Timeline supports `sx` prop' , ( ) => {
201- render ( < Timeline data-testid = "component" sx = { { background : 'red' } } /> )
202- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
203- } )
204-
205- test ( 'Timeline.Badge supports `sx` prop' , ( ) => {
206- render ( < Timeline . Badge data-testid = "component" sx = { { background : 'red' } } /> )
207- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
208- } )
209-
210- test ( 'Timeline.Break supports `sx` prop' , ( ) => {
211- render ( < Timeline . Break data-testid = "component" sx = { { background : 'red' } } /> )
212- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
213- } )
214-
215- test ( 'Timeline.Item supports `sx` prop' , ( ) => {
216- render ( < Timeline . Item data-testid = "component" sx = { { background : 'red' } } /> )
217- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
218- } )
219-
220- test ( 'Timeline.Body supports `sx` prop' , ( ) => {
221- render ( < Timeline . Body data-testid = "component" sx = { { background : 'red' } } /> )
222- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
223- } )
224-
225- test ( 'Truncate supports `sx` prop' , ( ) => {
226- render ( < Truncate as = "div" data-testid = "component" sx = { { background : 'red' } } title = "test" /> )
227- expect ( window . getComputedStyle ( screen . getByTestId ( 'component' ) ) . backgroundColor ) . toBe ( 'rgb(255, 0, 0)' )
228- expect ( screen . getByTestId ( 'component' ) ) . toHaveAttribute ( 'title' , 'test' )
229- } )
230-
231186 test ( 'UnderlineNav supports `sx` prop' , ( ) => {
232187 render (
233188 < UnderlineNav as = "nav" aria-label = "navigation" data-testid = "component" sx = { { background : 'red' } } variant = "inset" >
0 commit comments