Here's an example of using getByDisplayValue to test a simple form input:

const submittedValue = getByDisplayValue('John Doe'); expect(submittedValue).toBeInTheDocument(); );

return ( <input type="text" value=value onChange=handleChange placeholder="Enter text here" /> ); ;