Flaky and false positive tests on EditDataModelBindings
#11893
Labels
added-to-sprint
kind/bug
Used when there is a defect / something is not working as it should.
quality/code
Violations from current rules for code, best practices, etc. Or just bad code.
quality/debt
Shortcuts made for saving time. Fixing this will make us more efficient going forward.
quality/testing
Tests that are missing, needs to be created or could be improved.
status/ready-for-specification
Status: Used for issues that are ready for functional decription og detailed design.
There are several issues with the unit tests on the
EditDataModelBindings
component:expect
methods are not called, causing false positives.Code like
expect(something).toHaveBeenCalled
should be replaced byexpect(something).toHaveBeenCalled()
. However, this will cause at least one of the tests to fail, indicating that there is a bug, so this should also be investigated.UserEvent
object should be set up first usinguserEvent.setup()
and the events should be fired usingact
instead ofwaitFor
:await act(() => user.click(element));
toBeCalled
method needs to be replaced withtoHaveBeenCalled
.The text was updated successfully, but these errors were encountered: