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: DataTableControl #13668

Merged
merged 4 commits into from
Mar 31, 2021
Merged

test: DataTableControl #13668

merged 4 commits into from
Mar 31, 2021

Conversation

yardz
Copy link
Contributor

@yardz yardz commented Mar 17, 2021

SUMMARY

Tests for DataTableControl file

TEST PLAN

No behavior changes. All tests must pass.

@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #13668 (37c510f) into master (0e0c99b) will decrease coverage by 3.37%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master   #13668      +/-   ##
==========================================
- Coverage   76.46%   73.09%   -3.38%     
==========================================
  Files         921      611     -310     
  Lines       46769    21755   -25014     
  Branches     5644     5665      +21     
==========================================
- Hits        35761    15901   -19860     
+ Misses      10848     5718    -5130     
+ Partials      160      136      -24     
Flag Coverage Δ
cypress 56.59% <ø> (+5.27%) ⬆️
hive ?
javascript 63.27% <100.00%> (+0.12%) ⬆️
mysql ?
postgres ?
presto ?
python ?
sqlite ?

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

Impacted Files Coverage Δ
.../src/explore/components/DataTableControl/index.tsx 86.00% <100.00%> (ø)
...nts/controls/DateFilterControl/DateFilterLabel.tsx 67.10% <0.00%> (-4.58%) ⬇️
superset/charts/commands/export.py
superset/models/core.py
superset/dashboards/api.py
superset/models/dashboard.py
superset/db_engine_specs/__init__.py
superset/tasks/async_queries.py
superset/annotation_layers/schemas.py
superset/utils/urls.py
... and 363 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 0e0c99b...a066777. 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.

Just some small nits. Code LGTM.

yardz and others added 2 commits March 18, 2021 12:21
…ount.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
…ount.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

test('Render a button', () => {
render(<CopyButton>btn</CopyButton>);
expect(screen.getByRole('button')).toBeInTheDocument();
expect(screen.getByRole('button')).toHaveClass('superset-button');
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, why do you think checking the class here would benefit the tests?

Copy link
Contributor Author

@yardz yardz Mar 23, 2021

Choose a reason for hiding this comment

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

It doesn't really add much value. It’s just because a test that just checks that it’s a button doesn’t add much... At least with the class I check if "added the correct button"

@yardz
Copy link
Contributor Author

yardz commented Mar 26, 2021

@rusackas please take a look here!

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, thanks!

@rusackas rusackas merged commit 1252fd7 into apache:master Mar 31, 2021
amitmiran137 pushed a commit that referenced this pull request Apr 2, 2021
* master: (26 commits)
  chore: bump to new superset-ui version (#13932)
  fix: do not run containers as root by default in Helm chart (#13917)
  feat(explore): adhoc column formatting for Table chart (#13758)
  fix(sqla-query): order by aggregations in Presto and Hive (#13739)
  feat(alert/report): add ALERTS_ATTACH_REPORTS feature flags + feature (#13894)
  test: Fixes PropertiesModal_spec (#13548)
  fix: Pin Prophet dependency after breaking changes (#13852)
  test: Adds tests to dnd controls (#13650)
  test: Adds tests to the AnnotationLayer component (#13748)
  test: Refactor and enhance tests for the Explore DatasourcePanel Component (#13799)
  Add tests (#13778)
  test: DisplayQueryButton (#13750)
  Fixing condition around left margin for dashboard layout. Fixes #13863 (#13905)
  Revert "fix: select table overlay (#13694)" (#13901)
  test: Adds tests to the OptionControls component (#13729)
  test: DatasourceControl (#13605)
  tests for function handleScroll (#13896)
  test: Adds tests to the CustomFrame component (#13675)
  test: Adds tests to the AdvancedFrame component (#13664)
  test: DataTableControl (#13668)
  ...
lyndsiWilliams pushed a commit to preset-io/superset that referenced this pull request Apr 7, 2021
* Tests for DataTableControl

* Update superset-frontend/src/explore/components/DataTableControl/RowCount.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/DataTableControl/RowCount.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* Tests for DataTableControl

* Update superset-frontend/src/explore/components/DataTableControl/RowCount.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/explore/components/DataTableControl/RowCount.test.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@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.

6 participants