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

test: Tests, dedicated directory and Storybook for the Badge component #13513

Merged
merged 4 commits into from
Mar 10, 2021
Merged

test: Tests, dedicated directory and Storybook for the Badge component #13513

merged 4 commits into from
Mar 10, 2021

Conversation

geido
Copy link
Member

@geido geido commented Mar 8, 2021

Moves the Badge component to a dedicated directory in src/components while adding tests and a storybook entry.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

@geido Code LGTM. One thing that I noticed is that if I change the values of count, color, textColor and size in the storybook, nothing happens. Are these properties not being used?

@geido
Copy link
Member Author

geido commented Mar 8, 2021

@geido Code LGTM. One thing that I noticed is that if I change the values of count, color, textColor and size in the storybook, nothing happens. Are these properties not used?

@michael-s-molina some properties are exclusive. For instance, you should not use the property count together with the property text or the property status with color. That is the reason why I added undefined to the options so all the combinations can be tested exclusively. However, if you think there is a better way to achieve that, I'll be happy to revisit.

@geido geido changed the title test: Tests, dedicated directory and storybook for the Badge component test: Tests, dedicated directory and Storybook for the Badge component Mar 9, 2021
@geido
Copy link
Member Author

geido commented Mar 9, 2021

@junlincc @rusackas

@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #13513 (0882ff4) into master (375797f) will decrease coverage by 4.47%.
The diff coverage is 5.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13513      +/-   ##
==========================================
- Coverage   76.96%   72.48%   -4.48%     
==========================================
  Files         930      630     -300     
  Lines       46278    21707   -24571     
  Branches     5554     5555       +1     
==========================================
- Hits        35619    15735   -19884     
+ Misses      10525     5838    -4687     
  Partials      134      134              
Flag Coverage Δ
cypress 57.45% <ø> (+<0.01%) ⬆️
hive ?
javascript 62.45% <5.00%> (-0.04%) ⬇️
mysql ?
postgres ?
python ?
sqlite ?

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

Impacted Files Coverage Δ
...end/src/SqlLab/components/TemplateParamsEditor.jsx 23.80% <ø> (ø)
...-frontend/src/common/components/common.stories.tsx 0.00% <ø> (ø)
superset-frontend/src/common/components/index.tsx 100.00% <ø> (ø)
...et-frontend/src/components/Badge/Badge.stories.tsx 0.00% <0.00%> (ø)
superset-frontend/src/components/Badge/index.tsx 100.00% <ø> (ø)
...erset-frontend/src/datasource/DatasourceEditor.jsx 66.38% <ø> (ø)
...erset-frontend/src/profile/components/Security.tsx 100.00% <100.00%> (ø)
...set-frontend/src/dashboard/util/getDropPosition.js 90.90% <0.00%> (ø)
superset/migrations/env.py
superset/queries/saved_queries/commands/export.py
... and 300 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 375797f...bd85aba. Read the comment docs.

Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTM!

@pkdotson pkdotson merged commit d1f6245 into apache:master Mar 10, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
apache#13513)

* Move to dir and add storybook

* Add tests

* Remove no-restricted-imports
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L test:component 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants