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

Add coverage script in the admin #14109

Merged
merged 5 commits into from Aug 22, 2022

Conversation

simotae14
Copy link
Contributor

@simotae14 simotae14 commented Aug 16, 2022

What does it do?

I have added a script to collect the coverage of the front end unit tests inside the admin

Why is it needed?

To know the percentage of the code covered with the tests

How to test it?

Just run
yarn test:front:ce:cov
from the packages/core/admin folder

@simotae14 simotae14 requested a review from gu-stav August 16, 2022 13:21
@simotae14 simotae14 self-assigned this Aug 16, 2022
@simotae14 simotae14 changed the title add the script chore/add-coverage-script-in-the-admin-package-json Aug 16, 2022
@simotae14 simotae14 added source: core:admin Source is core/admin package pr: chore This PR contains chore tasks (cleanups, configs, tooling...) labels Aug 16, 2022
@simotae14 simotae14 added this to the 4.3.5 milestone Aug 16, 2022
@simotae14 simotae14 changed the title chore/add-coverage-script-in-the-admin-package-json Add coverage script in the admin Aug 16, 2022
@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #14109 (a444122) into main (b13f3a5) will increase coverage by 6.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main   #14109      +/-   ##
==========================================
+ Coverage   49.38%   55.58%   +6.19%     
==========================================
  Files         263     1275    +1012     
  Lines        9290    31829   +22539     
  Branches     2020     5733    +3713     
==========================================
+ Hits         4588    17692   +13104     
- Misses       3878    12323    +8445     
- Partials      824     1814     +990     
Flag Coverage Δ
front 58.13% <ø> (?)
unit 49.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../admin/admin/src/content-manager/icons/Na/index.js 0.00% <0.00%> (ø)
...oles/EditPage/components/utils/getCheckboxState.js 100.00% <0.00%> (ø)
...nents/Permissions/utils/updateConditionsToFalse.js 100.00% <0.00%> (ø)
...aManagerProvider/utils/createModifiedDataSchema.js 100.00% <0.00%> (ø)
...ts/ComponentPicker/Category/ComponentCard/index.js 46.66% <0.00%> (ø)
...ermissions/admin/src/hooks/useFetchRole/reducer.js 100.00% <0.00%> (ø)
.../content-manager/components/SelectWrapper/Label.js 63.15% <0.00%> (ø)
...ions/admin/src/components/FormModal/Input/index.js 88.00% <0.00%> (ø)
...age/pages/Users/ListPage/utils/displayedFilters.js 100.00% <0.00%> (ø)
...plugins/i18n/admin/src/utils/getLocaleFromQuery.js 100.00% <0.00%> (ø)
... and 1002 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

gu-stav
gu-stav previously approved these changes Aug 17, 2022
Copy link
Contributor

@gu-stav gu-stav left a comment

Choose a reason for hiding this comment

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

I'm fine with that and think it is a good addition, but would also like to hear e.g. @alexandrebodin s opinion.

packages/core/admin/package.json Outdated Show resolved Hide resolved
alexandrebodin
alexandrebodin previously approved these changes Aug 19, 2022
Copy link
Contributor

@gu-stav gu-stav left a comment

Choose a reason for hiding this comment

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

@simotae14 Could you also update the test:front:cov script in the helper-plugin please, so that they are consistent?

Copy link
Contributor

@gu-stav gu-stav left a comment

Choose a reason for hiding this comment

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

Great addition! Thank you.

@simotae14 simotae14 merged commit f4c6a95 into main Aug 22, 2022
@simotae14 simotae14 deleted the chore/add-coverage-script-in-the-admin-package-json branch August 22, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: core:admin Source is core/admin package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants