From 12905076909543b536e45fbfb601a7647a513aa0 Mon Sep 17 00:00:00 2001 From: Samuel Gesang Date: Wed, 5 Jun 2024 16:43:25 +0200 Subject: [PATCH] Update tests for RestaurantForm component --- .../RestaurantForm.component.test.tsx | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/RestaurantForm/RestaurantForm.component.test.tsx b/frontend/src/components/RestaurantForm/RestaurantForm.component.test.tsx index 374b2ee..887f5b1 100644 --- a/frontend/src/components/RestaurantForm/RestaurantForm.component.test.tsx +++ b/frontend/src/components/RestaurantForm/RestaurantForm.component.test.tsx @@ -6,7 +6,9 @@ import {MemoryRouter} from "react-router-dom"; test('RestaurantForm component displays label "title"', () => { render( - + { + return + }} restaurantData={null}/> ); const titleInput = screen.getByLabelText("Title"); expect(titleInput).toBeInTheDocument(); @@ -15,7 +17,9 @@ test('RestaurantForm component displays label "title"', () => { test('RestaurantForm component displays input field "title"', () => { render( - + { + return + }} restaurantData={null}/> ); const titleInput = screen.getByRole("textbox", { name: /title/i @@ -26,7 +30,9 @@ test('RestaurantForm component displays input field "title"', () => { test('RestaurantForm component displays label "city"', () => { render( - + { + return + }} restaurantData={null}/> ); const titleLabel = screen.getByLabelText("City"); expect(titleLabel).toBeInTheDocument(); @@ -35,7 +41,9 @@ test('RestaurantForm component displays label "city"', () => { test('RestaurantForm component displays input field "city"', () => { render( - + { + return + }} restaurantData={null}/> ); const cityInput = screen.getByRole("textbox", { name: /city/i @@ -46,7 +54,9 @@ test('RestaurantForm component displays input field "city"', () => { test('RestaurantForm component displays "add" button', () => { render( - + { + return + }} restaurantData={null}/> ); const addButton = screen.getByRole("button", { name: /add/i