diff --git a/workshop/src/__tests__/AmountPicker.test.tsx b/workshop/src/__tests__/AmountPicker.test.tsx index 46bbc9c619910dab2a116ab7f75c36a935757cb7..80e2761ea39f9a75702c7bcb8587826e9868a1d0 100644 --- a/workshop/src/__tests__/AmountPicker.test.tsx +++ b/workshop/src/__tests__/AmountPicker.test.tsx @@ -1,6 +1,10 @@ import { render, screen } from '@testing-library/react'; import AmountPicker from '../components/AmountPicker'; +//These are the min and max values set in AmountPicker, so you can use them in your tests as well +const min = 1 +const max = 20 + test('Testing + button rendering', () => { render(<AmountPicker />) const increaseButton = screen.getByRole('button',{name: '+'}) @@ -19,5 +23,4 @@ test('Testing count rendering', () => { expect(count).toBeInTheDocument() }) - -//Write your test cases below :) +//Write your test cases below :) \ No newline at end of file diff --git a/workshop/src/components/AmountPicker.tsx b/workshop/src/components/AmountPicker.tsx index 10bc4b36de9bc7451d29e3e42f28f7e5af96d9b5..234a98bfb8873c712b2205a7e0ef1553b16e9b72 100644 --- a/workshop/src/components/AmountPicker.tsx +++ b/workshop/src/components/AmountPicker.tsx @@ -4,7 +4,7 @@ import { TextField } from "@mui/material" import { Stack } from "@mui/system" function AmountPicker() { - + //These are the min and max values that count should be able to obtain const min = 1 const max = 20