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

UIIN-2668: Jest/RTL: Cover InstancePlugin component with unit tests #2466

Merged
merged 3 commits into from Apr 29, 2024

Conversation

UladzislauKutarkin
Copy link
Contributor

https://folio-org.atlassian.net/browse/UIIN-2668
We added tests for InstancePlugin
image

@UladzislauKutarkin UladzislauKutarkin requested review from vashjs and a team April 26, 2024 05:33
Copy link

github-actions bot commented Apr 26, 2024

Jest Unit Test Statistics

    1 files  ±0  244 suites  +1   12m 11s ⏱️ -10s
986 tests +1  984 ✔️ +1  2 💤 ±0  0 ±0 
992 runs  +1  990 ✔️ +1  2 💤 ±0  0 ±0 

Results for commit 9cd2ca3. ± Comparison against base commit 93f6845.

♻️ This comment has been updated with latest results.

jest.clearAllMocks();
});

it('should InstancePlugin', () => {

Choose a reason for hiding this comment

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

What does it mean 'should InstancePlugin'?
Maybe you meant something like 'should render InstancePlugin'?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed

});

it('should InstancePlugin', () => {
renderWithIntl(<InstancePlugin onSelectMock={onSelectMock} isDisabled={false} />);

Choose a reason for hiding this comment

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

I think onSelectMock property is not expected.
Maybe you meant

Suggested change
renderWithIntl(<InstancePlugin onSelectMock={onSelectMock} isDisabled={false} />);
renderWithIntl(<InstancePlugin onSelect={onSelectMock} isDisabled={false} />);

Copy link
Contributor

Choose a reason for hiding this comment

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

src/components/InstancePlugin/InstancePlugin.test.js Outdated Show resolved Hide resolved
@artem-blazhko artem-blazhko requested a review from a team April 26, 2024 09:33
Copy link

sonarcloud bot commented Apr 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@NikitaSedyx NikitaSedyx merged commit 8284194 into master Apr 29, 2024
5 checks passed
@NikitaSedyx NikitaSedyx deleted the UIIN-2668 branch April 29, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants