// Edit the value await userEvent.clear(nameInput); await userEvent.type(nameInput, 'Bob');
// Assert updated display value expect(screen.getByDisplayValue('Bob')).toBeInTheDocument(); ); getbydisplayvalue react testing library
// Assert initial display value expect(screen.getByDisplayValue('Alice')).toBeInTheDocument(); // Edit the value await userEvent
const nameInput = screen.getByLabelText(/name/i); // Edit the value await userEvent.clear(nameInput)
test('select element by display value', () => render(<RoleSelect defaultValue="Admin" />);