eufemia
eufemia copied to clipboard
chore: fixes false positive tests in Field.OrganizationNumber
Previous tests were false positive.
When doing:
expect(screen.queryByRole('alert')).toBeNull()
It would in many tests always be true, even if an error should occur.
This PR also removes a lot of not needed fireEvent.blur(document.querySelector('input'))
, many times when removing it, the result of the test does not change.
I don't think this is needed when we test the validator prop, as the validator doesn't need a blur event to execute.