From 39e2433a2e821f6fe06b9db95130404884d17019 Mon Sep 17 00:00:00 2001 From: Nika Kolesnikova Date: Thu, 17 Oct 2024 18:29:00 -0400 Subject: [PATCH] fix: update List test --- tests/List.test.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/List.test.jsx b/tests/List.test.jsx index 075cac4..fcaa178 100644 --- a/tests/List.test.jsx +++ b/tests/List.test.jsx @@ -35,14 +35,13 @@ describe('List Component', () => { }); }); - test('shows welcome message and AddItems component when no items are present', () => { + test('shows AddItems component with existing items', () => { render( - + , ); - expect(screen.getByText('Welcome to groceries!')).toBeInTheDocument(); expect(screen.getByLabelText('Item Name:')).toBeInTheDocument(); expect(screen.getByLabelText('Soon')).toBeInTheDocument(); expect(screen.getByLabelText('Kind of soon')).toBeInTheDocument(); @@ -50,13 +49,14 @@ describe('List Component', () => { expect(screen.getByText('Submit')).toBeInTheDocument(); }); - test('shows AddItems component with existing items', () => { + test('shows welcome message and AddItems component when no items are present', () => { render( - + , ); + expect(screen.getByText('Welcome to groceries!')).toBeInTheDocument(); expect(screen.getByLabelText('Item Name:')).toBeInTheDocument(); expect(screen.getByLabelText('Soon')).toBeInTheDocument(); expect(screen.getByLabelText('Kind of soon')).toBeInTheDocument();