@@ -28,33 +28,30 @@ describe('WelcomeTutorialCard', () => {
2828 } ) ;
2929 } ) ;
3030
31- it ( 'displays checkbox with correct label and helper text ' , async ( ) => {
31+ it ( 'displays checkbox with correct label' , async ( ) => {
3232 render ( < WelcomeTutorialCard /> , { initialEntries : [ '/browse' ] } ) ;
3333
3434 await waitFor ( ( ) => {
3535 expect (
36- screen . getByLabelText ( / h i d e t h i s c a r d .* h e l p p a g e / i)
37- ) . toBeInTheDocument ( ) ;
38- expect (
39- screen . getByText ( / y o u c a n a l w a y s a c c e s s t u t o r i a l s f r o m t h e h e l p p a g e / i)
36+ screen . getByLabelText ( / s h o w t h i s c a r d o n s t a r t u p / i)
4037 ) . toBeInTheDocument ( ) ;
4138 } ) ;
4239 } ) ;
4340
4441 it ( 'checkbox reflects showTutorial preference state' , async ( ) => {
4542 render ( < WelcomeTutorialCard /> , { initialEntries : [ '/browse' ] } ) ;
4643
47- const checkbox = await screen . findByLabelText ( / h i d e t h i s c a r d . * h e l p p a g e / i) ;
44+ const checkbox = await screen . findByLabelText ( / s h o w t h i s c a r d o n s t a r t u p / i) ;
4845
49- // showTutorial is true by default, so checkbox should be unchecked (inverse)
50- expect ( checkbox ) . not . toBeChecked ( ) ;
46+ // showTutorial is true by default, so checkbox should be checked
47+ expect ( checkbox ) . toBeChecked ( ) ;
5148 } ) ;
5249
5350 it ( 'toggles preference when checkbox is clicked and shows success toast' , async ( ) => {
5451 render ( < WelcomeTutorialCard /> , { initialEntries : [ '/browse' ] } ) ;
5552
5653 const user = userEvent . setup ( ) ;
57- const checkbox = await screen . findByLabelText ( / h i d e t h i s c a r d . * h e l p p a g e / i) ;
54+ const checkbox = await screen . findByLabelText ( / s h o w t h i s c a r d o n s t a r t u p / i) ;
5855
5956 await user . click ( checkbox ) ;
6057
@@ -78,7 +75,7 @@ describe('WelcomeTutorialCard', () => {
7875 render ( < WelcomeTutorialCard /> , { initialEntries : [ '/browse' ] } ) ;
7976
8077 const user = userEvent . setup ( ) ;
81- const checkbox = await screen . findByLabelText ( / h i d e t h i s c a r d . * h e l p p a g e / i) ;
78+ const checkbox = await screen . findByLabelText ( / s h o w t h i s c a r d o n s t a r t u p / i) ;
8279
8380 await user . click ( checkbox ) ;
8481
0 commit comments