Open DomVinyard opened 1 year ago
An onError
function is triggered which then fires a callBack function called replaceImage
which replaces the src
of that image element with a placeholder image.
The TopicCard and RelationCard components are rendered within the test, img
element is selected using getByRole
and then the error is fired using fireEvent.error
which then fires the callBack function which replaces the src
with the placeholder whose value can now be tested.
User Story:
As a user, I want to see a placeholder image in the RelationCard component when no image is provided. Currently it just shows the alt text
Acceptance Criteria: