@@ -186,3 +186,39 @@ test(`Does not render with class ${styles.modifiers.noPlainOnGlass} when isNoPla
186186
187187 expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . not . toHaveClass ( styles . modifiers . noPlainOnGlass ) ;
188188} ) ;
189+
190+ test ( `Renders with class ${ styles . modifiers . stickyHeaderBase } when isStickyHeaderBase is true` , ( ) => {
191+ render ( < Table isStickyHeaderBase aria-label = "Test table" /> ) ;
192+
193+ expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . toHaveClass ( styles . modifiers . stickyHeaderBase ) ;
194+ } ) ;
195+
196+ test ( `Does not render with class ${ styles . modifiers . stickyHeaderBase } when isStickyHeaderBase is false` , ( ) => {
197+ render ( < Table isStickyHeaderBase = { false } aria-label = "Test table" /> ) ;
198+
199+ expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . not . toHaveClass ( styles . modifiers . stickyHeaderBase ) ;
200+ } ) ;
201+
202+ test ( `Does not render with class ${ styles . modifiers . stickyHeaderBase } when isStickyHeaderBase is undefined` , ( ) => {
203+ render ( < Table aria-label = "Test table" /> ) ;
204+
205+ expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . not . toHaveClass ( styles . modifiers . stickyHeaderBase ) ;
206+ } ) ;
207+
208+ test ( `Renders with class ${ styles . modifiers . stickyHeaderStuck } when isStickyHeaderStuck is true` , ( ) => {
209+ render ( < Table isStickyHeaderStuck aria-label = "Test table" /> ) ;
210+
211+ expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . toHaveClass ( styles . modifiers . stickyHeaderStuck ) ;
212+ } ) ;
213+
214+ test ( `Does not render with class ${ styles . modifiers . stickyHeaderStuck } when isStickyHeaderStuck is false` , ( ) => {
215+ render ( < Table isStickyHeaderStuck = { false } aria-label = "Test table" /> ) ;
216+
217+ expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . not . toHaveClass ( styles . modifiers . stickyHeaderStuck ) ;
218+ } ) ;
219+
220+ test ( `Does not render with class ${ styles . modifiers . stickyHeaderStuck } when isStickyHeaderStuck is undefined` , ( ) => {
221+ render ( < Table aria-label = "Test table" /> ) ;
222+
223+ expect ( screen . getByRole ( 'grid' , { name : 'Test table' } ) ) . not . toHaveClass ( styles . modifiers . stickyHeaderStuck ) ;
224+ } ) ;
0 commit comments