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: SliceHeaderControls #13895

Merged
merged 7 commits into from
Apr 5, 2021
Merged

Conversation

yardz
Copy link
Contributor

@yardz yardz commented Mar 31, 2021

SUMMARY

Tests for SliceHeaderControls

@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #13895 (cc5deb4) into master (d54cc6d) will increase coverage by 0.58%.
The diff coverage is 82.38%.

❗ Current head cc5deb4 differs from pull request most recent head 9de0d86. Consider uploading reports for the commit 9de0d86 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13895      +/-   ##
==========================================
+ Coverage   77.55%   78.14%   +0.58%     
==========================================
  Files         935      934       -1     
  Lines       47301    47352      +51     
  Branches     5907     5952      +45     
==========================================
+ Hits        36685    37003     +318     
+ Misses      10472    10204     -268     
- Partials      144      145       +1     
Flag Coverage Δ
cypress 56.03% <71.79%> (+<0.01%) ⬆️
hive ?
javascript 66.50% <86.44%> (+2.77%) ⬆️
mysql ?
presto ?

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

Impacted Files Coverage Δ
...tend/src/SqlLab/components/ScheduleQueryButton.tsx 28.12% <ø> (ø)
...et-frontend/src/SqlLab/components/TableElement.jsx 88.60% <ø> (+0.23%) ⬆️
...frontend/src/components/DatabaseSelector/index.tsx 92.70% <ø> (+1.04%) ⬆️
...rset-frontend/src/components/ProgressBar/index.tsx 100.00% <ø> (ø)
...et-frontend/src/components/TableSelector/index.tsx 84.92% <ø> (ø)
.../components/CrossFilterScopingModal/utils/index.ts 100.00% <ø> (ø)
...src/dashboard/components/PublishedStatus/index.jsx 100.00% <ø> (ø)
...dashboard/components/SliceHeaderControls/index.jsx 77.89% <ø> (ø)
...src/dashboard/components/dnd/handleScroll/index.ts 73.33% <ø> (ø)
...d/src/explore/components/DatasourcePanel/index.tsx 87.93% <ø> (ø)
... and 83 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 d54cc6d...9de0d86. Read the comment docs.

Comment on lines +104 to +121
// @ts-ignore
delete props.forceRefresh;
// @ts-ignore
delete props.toggleExpandSlice;
// @ts-ignore
delete props.exploreChart;
// @ts-ignore
delete props.exportCSV;
// @ts-ignore
delete props.cachedDttm;
// @ts-ignore
delete props.updatedDttm;
// @ts-ignore
delete props.isCached;
// @ts-ignore
delete props.isExpanded;
// @ts-ignore
delete props.sliceCanEdit;
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary?

Copy link
Member

Choose a reason for hiding this comment

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

Wondering the same thing... is this serving a purpose? Could do a minProps and extraProps object and combine them when needed, if these are not needed in some case. Are they causing a problem, or just noise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I explained it better to michael on a call. createProps is a "real prop" that is being used today in the preset (dev data). But the object has some items that are optional, so for those items I am deleting in order to do some test scenarios.

I could do that, but it would involve the cost of adjusting all the other tests. I find it easier to maintain just 2 "different" scenarios than to distribute this across multiple test cases.

This is part of the cost for complex components :-(

yardz and others added 5 commits April 1, 2021 11:17
…/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>
…/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>
…/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>
…/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>
@rusackas
Copy link
Member

rusackas commented Apr 2, 2021

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2021

@rusackas Ephemeral environment spinning up at http://34.215.93.68:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM

@rusackas rusackas merged commit d489d00 into apache:master Apr 5, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

Ephemeral environment shutdown and build artifacts deleted.

lyndsiWilliams pushed a commit to preset-io/superset that referenced this pull request Apr 7, 2021
* tests for SliceHeaderControls

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* fix lint error

* Improving accessibility

Co-authored-by: Michael S. Molina <[email protected]>
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* tests for SliceHeaderControls

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* fix lint error

* Improving accessibility

Co-authored-by: Michael S. Molina <[email protected]>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* tests for SliceHeaderControls

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* Update superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx

Co-authored-by: Michael S. Molina <[email protected]>

* fix lint error

* Improving accessibility

Co-authored-by: Michael S. Molina <[email protected]>
@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