File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,18 @@ describe('List Component', () => {
4949 expect ( screen . getByLabelText ( 'Not soon' ) ) . toBeInTheDocument ( ) ;
5050 expect ( screen . getByText ( 'Submit' ) ) . toBeInTheDocument ( ) ;
5151 } ) ;
52+
53+ test ( 'shows AddItems component with existing items' , ( ) => {
54+ render (
55+ < MemoryRouter >
56+ < List data = { mockShoppingListData } listPath = { '/groceries' } />
57+ </ MemoryRouter > ,
58+ ) ;
59+
60+ expect ( screen . getByLabelText ( 'Item Name:' ) ) . toBeInTheDocument ( ) ;
61+ expect ( screen . getByLabelText ( 'Soon' ) ) . toBeInTheDocument ( ) ;
62+ expect ( screen . getByLabelText ( 'Kind of soon' ) ) . toBeInTheDocument ( ) ;
63+ expect ( screen . getByLabelText ( 'Not soon' ) ) . toBeInTheDocument ( ) ;
64+ expect ( screen . getByText ( 'Submit' ) ) . toBeInTheDocument ( ) ;
65+ } ) ;
5266} ) ;
You can’t perform that action at this time.
0 commit comments