Skip to content
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

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Cb 5277 test components #2721

merged 4 commits into from
Jun 26, 2024

Conversation

devnaumov
Copy link
Member

No description provided.

@devnaumov devnaumov marked this pull request as ready for review June 20, 2024 13:28
@devnaumov devnaumov self-assigned this Jun 20, 2024
fireEvent.click(linkElement);

expect(handleClick).toHaveBeenCalled();
});
Copy link
Contributor

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));
Copy link
Contributor

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();
});
Copy link
Contributor

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not by className?

Copy link
Contributor

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

@Wroud Wroud merged commit 56a2e8c into devel Jun 26, 2024
5 of 6 checks passed
@Wroud Wroud deleted the CB-5277-test-components branch June 26, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants