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

[BUG] The emptyStateIcon causes unit tests to fail #1236

Closed
Fewwy opened this issue Aug 11, 2021 · 1 comment · Fixed by #1237
Closed

[BUG] The emptyStateIcon causes unit tests to fail #1236

Fewwy opened this issue Aug 11, 2021 · 1 comment · Fixed by #1237
Labels
bug Something isn't working

Comments

@Fewwy
Copy link
Contributor

Fewwy commented Aug 11, 2021

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behaviour:

  1. Writing a basic shallow snapshot test for the class that has RuleTable inside of it
const wrapper = shallow(<My Component  {...some props}/>) 
 it('component renders correctly', () => {
    expect(wrapper).toMatchSnapshot();
  });
  1. The test is failing because
Failed prop type: Invalid prop `emptyStateIcon` supplied to `RuleTable`, expected a ReactNode.
        in RuleTable
  1. I tried to solve it but the only way that helped is actually removing
    emptyStateIcon: SearchIcon
    from line 284

Expected behavior
Tests are working :)

Desktop (please complete the following information):

  • OS: Fedora 33
  • Browser Chrome Version 92.0.4515.131 (Official Build) (64-bit)

Additional context

@Fewwy Fewwy added the bug Something isn't working label Aug 11, 2021
@rvsia
Copy link
Contributor

rvsia commented Aug 11, 2021

Thank you for noticing this! There is a wrong proptype, fixed here: https://github.com/RedHatInsights/frontend-components/pull/1237/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants