@@ -20,15 +20,14 @@ describe("Tabs states", () => {
2020 const tabs = container . firstChild
2121 expect ( tabs ) . toMatchSnapshot ( )
2222
23- expect ( getByText ( "hi" ) ) . toHaveStyleRule ( "font-weight" , "bold" )
2423 expect ( queryByText ( "Hello" ) ) . toBeInTheDocument ( )
2524 expect ( queryByText ( "Hello again" ) ) . not . toBeInTheDocument ( )
2625 expect ( queryByText ( "Goodbye" ) ) . not . toBeInTheDocument ( )
2726 expect ( queryByText ( "Fairwell" ) ) . not . toBeInTheDocument ( )
2827
2928 const tab = getByText ( "Bye Bye" )
3029 fireEvent . click ( tab )
31- expect ( tab ) . toHaveStyleRule ( "font-weight" , "bold" )
30+
3231 expect ( queryByText ( "Hello" ) ) . not . toBeInTheDocument ( )
3332 expect ( queryByText ( "Fairwell" ) ) . toBeInTheDocument ( )
3433 } )
@@ -55,13 +54,11 @@ describe("Tabs states", () => {
5554
5655 expect ( queryByText ( "Hello" ) ) . not . toBeInTheDocument ( )
5756 expect ( queryByText ( "Hello again" ) ) . not . toBeInTheDocument ( )
58- expect ( getByText ( "Bye" ) ) . toHaveStyleRule ( "font-weight" , "bold" )
5957 expect ( queryByText ( "Goodbye" ) ) . toBeInTheDocument ( )
6058 expect ( queryByText ( "Fairwell" ) ) . not . toBeInTheDocument ( )
6159
6260 const tab = getByText ( "Hi again" )
6361 fireEvent . click ( tab )
64- expect ( tab ) . toHaveStyleRule ( "font-weight" , "bold" )
6562 expect ( onChange ) . toBeCalledWith ( 1 )
6663 expect ( queryByText ( "Goodbye" ) ) . not . toBeInTheDocument ( )
6764 expect ( queryByText ( "Hello again" ) ) . toBeInTheDocument ( )
@@ -81,12 +78,10 @@ describe("Tabs states", () => {
8178 const { queryByText, getByText } = renderWithProviders ( < Component /> )
8279
8380 expect ( queryByText ( "Hello" ) ) . not . toBeInTheDocument ( )
84- expect ( getByText ( "Hi again" ) ) . toHaveStyleRule ( "font-weight" , "bold" )
8581 expect ( queryByText ( "Hello again" ) ) . toBeInTheDocument ( )
8682
8783 const tab = getByText ( "hi" )
8884 fireEvent . click ( tab )
89- expect ( tab ) . toHaveStyleRule ( "font-weight" , "normal" )
9085 expect ( queryByText ( "Hello" ) ) . not . toBeInTheDocument ( )
9186 expect ( queryByText ( "Hello again" ) ) . toBeInTheDocument ( )
9287 } )
0 commit comments