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

chore(native-filters): Add unit tests for filter cards #18967

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

kgabryje
Copy link
Member

SUMMARY

This PR adds unit tests for filter cards implemented in #18874

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

{scope.map((element, index) => (
<span>{index === 0 ? element : `, ${element}`}</span>
))}
{scope
Copy link
Member Author

Choose a reason for hiding this comment

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

This change was added in #18793 (in review), copying it here in order to write a test for it before #18793 is merged

@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #18967 (9e6d355) into master (2072225) will increase coverage by 0.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18967      +/-   ##
==========================================
+ Coverage   66.40%   66.57%   +0.17%     
==========================================
  Files        1641     1641              
  Lines       63520    63519       -1     
  Branches     6422     6422              
==========================================
+ Hits        42178    42288     +110     
+ Misses      19681    19556     -125     
- Partials     1661     1675      +14     
Flag Coverage Δ
javascript 51.35% <100.00%> (+0.34%) ⬆️

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

Impacted Files Coverage Δ
...d/components/nativeFilters/FilterCard/ScopeRow.tsx 72.72% <100.00%> (+72.72%) ⬆️
...t-frontend/src/dashboard/actions/dashboardState.js 35.95% <0.00%> (+0.56%) ⬆️
...mponents/nativeFilters/FilterCard/useTruncation.ts 43.47% <0.00%> (+43.47%) ⬆️
...nents/nativeFilters/FilterCard/DependenciesRow.tsx 78.94% <0.00%> (+78.94%) ⬆️
...ponents/nativeFilters/FilterCard/useFilterScope.ts 81.13% <0.00%> (+81.13%) ⬆️
...oard/components/nativeFilters/FilterCard/Styles.ts 84.61% <0.00%> (+84.61%) ⬆️
...rd/components/nativeFilters/FilterCard/NameRow.tsx 85.71% <0.00%> (+85.71%) ⬆️
...rd/components/nativeFilters/FilterCard/TypeRow.tsx 100.00% <0.00%> (+100.00%) ⬆️
...nts/nativeFilters/FilterCard/FilterCardContent.tsx 100.00% <0.00%> (+100.00%) ⬆️
... and 2 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 2072225...9e6d355. Read the comment docs.

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.

LGTM

@kgabryje kgabryje merged commit ec746c2 into apache:master Mar 1, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
* chore(native-filters): Add unit tests for filter cards

* Fix test

(cherry picked from commit ec746c2)
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 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 lts-v1 size/L 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants