11import '@testing-library/jest-dom' ;
2- import { Fragment } from 'react' ;
32import { render , screen } from '@testing-library/react' ;
43
54import { Accordion } from '../Accordion' ;
@@ -26,10 +25,10 @@ test('Renders with the passed aria label', () => {
2625
2726test ( 'Renders with inherited element props spread to the component' , ( ) => {
2827 render (
29- < Fragment >
28+ < >
3029 < Accordion aria-labelledby = "labelling-id" > Test</ Accordion >
3130 < p id = "labelling-id" > Label</ p >
32- </ Fragment >
31+ </ >
3332 ) ;
3433
3534 expect ( screen . getByText ( 'Test' ) ) . toHaveAccessibleName ( 'Label' ) ;
@@ -111,16 +110,16 @@ test('Provides a ToggleContainer of "h2" in a context when asDefinitionList is f
111110 expect ( screen . getByText ( 'h2' ) ) . toBeVisible ( ) ;
112111} ) ;
113112
114- test ( ' Renders without pf-m- bordered by default' , ( ) => {
113+ test ( ` Renders without class ${ styles . modifiers . bordered } by default` , ( ) => {
115114 render ( < Accordion > Test</ Accordion > ) ;
116115
117- expect ( screen . getByText ( 'Test' ) ) . not . toHaveClass ( 'pf-m- bordered' ) ;
116+ expect ( screen . getByText ( 'Test' ) ) . not . toHaveClass ( styles . modifiers . bordered ) ;
118117} ) ;
119118
120- test ( ' Renders with pf-m- bordered when isBordered=true' , ( ) => {
119+ test ( ` Renders with class ${ styles . modifiers . bordered } when isBordered=true` , ( ) => {
121120 render ( < Accordion isBordered > Test</ Accordion > ) ;
122121
123- expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( 'pf-m- bordered' ) ;
122+ expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( styles . modifiers . bordered ) ;
124123} ) ;
125124
126125test ( `Renders without class ${ styles . modifiers . noPlain } by default` , ( ) => {
@@ -147,16 +146,16 @@ test(`Renders with class ${styles.modifiers.plain} when isPlain`, () => {
147146 expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( styles . modifiers . plain ) ;
148147} ) ;
149148
150- test ( ' Renders without pf-m-display-lg by default' , ( ) => {
149+ test ( ` Renders without class ${ styles . modifiers . displayLg } by default` , ( ) => {
151150 render ( < Accordion > Test</ Accordion > ) ;
152151
153- expect ( screen . getByText ( 'Test' ) ) . not . toHaveClass ( 'pf-m-display-lg' ) ;
152+ expect ( screen . getByText ( 'Test' ) ) . not . toHaveClass ( styles . modifiers . displayLg ) ;
154153} ) ;
155154
156- test ( ' Renders with pf-m-display-lg when displaySize="lg"' , ( ) => {
155+ test ( ` Renders with class ${ styles . modifiers . displayLg } when displaySize="lg"` , ( ) => {
157156 render ( < Accordion displaySize = "lg" > Test</ Accordion > ) ;
158157
159- expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( 'pf-m-display-lg' ) ;
158+ expect ( screen . getByText ( 'Test' ) ) . toHaveClass ( styles . modifiers . displayLg ) ;
160159} ) ;
161160
162161test ( `Renders without class ${ styles . modifiers . toggleStart } by default` , ( ) => {
0 commit comments