-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cb 5277 test components #2721
Cb 5277 test components #2721
Conversation
fireEvent.click(linkElement); | ||
|
||
expect(handleClick).toHaveBeenCalled(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the case where there is only a href
and if you click on it - it leads you with this link
app, | ||
); | ||
|
||
const icon = await waitFor(() => queryByAttribute('href', container, /external-link/i)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
searching by className
here seems a bit easier than by attribute
|
||
const description = await waitFor(() => getByText('Description Element')); | ||
expect(description).toBeInTheDocument(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also check in new test case that ripple, big
classnames are present here
const message = 'test_error'; | ||
const { container, getByTitle } = renderInApp(<StatusMessage message={message} type={ENotificationType.Error} />, app); | ||
const title = await waitFor(() => getByTitle(message)); | ||
const icon = await waitFor(() => queryByAttribute('src', container, /error/i)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not by className?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if possible please change it everywhere
229c337
to
e936194
Compare
No description provided.