Getbydisplayvalue React Testing Library Fix -
const nameInput = screen.getByLabelText(/name/i);
test('select element by display value', () => render(<RoleSelect defaultValue="Admin" />); getbydisplayvalue react testing library
// Edit the value await userEvent.clear(nameInput); await userEvent.type(nameInput, 'Bob'); const nameInput = screen