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

feat: Jest test wrapper component created, CypressTestUtils folder relocated #2039

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

mkholjuraev
Copy link
Contributor

This PR is intended to share our TestWrapper component that is used to render React components in Jest tests. I have also relocated the CypressTestUtils into the new TestUtils folder which is supposed to hold all test related utils. I made sure exports are fixed after relocation.

@mkholjuraev mkholjuraev requested review from Hyperkid123 and Fewwy July 22, 2024 09:53
@mkholjuraev
Copy link
Contributor Author

@Fewwy I am tagging you as you were the author of CypressTestUtils. @gkarat This is the continuation of our discussion in the PR for vulnerability.

@mkholjuraev mkholjuraev requested review from gkarat and a team July 22, 2024 09:55
@Hyperkid123 Hyperkid123 added the release Once merged it will trigger bugfix release label Jul 22, 2024
@mkholjuraev
Copy link
Contributor Author

@Hyperkid123 @gkarat PTAL, I forgot about this PR. Now, it has all the necessary changes.

</IntlProvider>
);
};
const TestWrapper = (children, routerProps = { initialEntries: ['/'] }, componentPath, store = mockStore()) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the props should be wrapped in an object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Contributor

@gkarat gkarat left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @mkholjuraev

@mkholjuraev mkholjuraev merged commit f29f303 into RedHatInsights:master Aug 13, 2024
1 check passed
@Hyperkid123 Hyperkid123 added release Once merged it will trigger bugfix release and removed release Once merged it will trigger bugfix release labels Aug 13, 2024
@nacho-bot
Copy link
Collaborator

                      :soon::shipit::octocat:
     :bug:Shipit Squirrel has this release bugfix surrounded, be ready for a new version:beetle:

@nacho-bot
Copy link
Collaborator

     🌱 🌸 🌷 🌻 🌟 New version of package has been released 🌟 🌻 🌷 🌸 🌱

                The release is available on:

        :package:@redhat-cloud-services/frontend-components-utilities/v/4.0.16📦

             :boom:This feature is brought to you by probot🚀

@nacho-bot nacho-bot added the released Pr has been released label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Once merged it will trigger bugfix release released Pr has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants