You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When no image is provided for RelationCard or TopicCard
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.
Tests
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:
The text was updated successfully, but these errors were encountered: