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: Adds tests to the AnnotationLayer component #13748

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Adds tests to the AnnotationLayer component.

TEST PLAN

1 - Execute AnnotationLayer tests
2 - All tests should pass

@rusackas @junlincc

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #13748 (8bcc7a0) into master (9156f08) will increase coverage by 0.17%.
The diff coverage is n/a.

❗ Current head 8bcc7a0 differs from pull request most recent head 60722af. Consider uploading reports for the commit 60722af to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13748      +/-   ##
==========================================
+ Coverage   77.83%   78.00%   +0.17%     
==========================================
  Files         934      934              
  Lines       47320    47320              
  Branches     5913     5931      +18     
==========================================
+ Hits        36831    36912      +81     
+ Misses      10346    10264      -82     
- Partials      143      144       +1     
Flag Coverage Δ
cypress 56.03% <ø> (ø)
javascript 65.60% <ø> (+0.97%) ⬆️

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

Impacted Files Coverage Δ
...ontrols/AnnotationLayerControl/AnnotationLayer.jsx 84.76% <ø> (ø)
...mponents/controls/AnnotationLayerControl/index.jsx 82.85% <ø> (ø)
.../src/explore/components/controls/SelectControl.jsx 93.75% <ø> (ø)
.../explore/components/controls/TextControl/index.tsx 88.37% <ø> (ø)
superset-frontend/src/setup/setupColors.ts 86.66% <0.00%> (+39.99%) ⬆️

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 9156f08...60722af. Read the comment docs.

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!

@junlincc
Copy link
Member

/testenv up

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Minor nit, other than that LGTM!

Comment on lines -32 to +34
import SelectControl from './SelectControl';
import TextControl from './TextControl';
import CheckboxControl from './CheckboxControl';

import SelectControl from 'src/explore/components/controls/SelectControl';
import TextControl from 'src/explore/components/controls/TextControl';
import CheckboxControl from 'src/explore/components/controls/CheckboxControl';
Copy link
Member

Choose a reason for hiding this comment

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

I personally prefer relative imports if they're in the same directory, but I don't have strong opinions on this. But it would be nice if we could enforce this with with some linting rules, e.g. requiring relative imports if in the same or parent directory, and absolute if elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

@villebro I agree with you. I'm using relative imports if they're in the same directory and full paths otherwise. Since in this case, they are not in the same directory anymore, I used full paths. Totally agree with the Lint rules.

Copy link
Member

Choose a reason for hiding this comment

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

My apologies, I didn't notice that this file moved 🤦 My "internal" linter is ok with relative imports from parent directories, but absolute is also just fine! But it would be great if the linter enforced fully deterministic imports (will try to poke around to see if this is possible/makes sense)

Copy link
Member Author

Choose a reason for hiding this comment

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

No problem at all! 😄

But it would be great if the linter enforced fully deterministic imports (will try to poke around to see if this is possible/makes sense)

This would be awesome!

@villebro @rusackas I think that after SIP-61 we'll have a more predictable structure, and that can allow us to use Webpack module aliases for our main folders and help with full imports.

@junlincc junlincc added the need:merge The PR is ready to be merged label Mar 31, 2021
@github-actions
Copy link
Contributor

@junlincc Ephemeral environment spinning up at http://52.41.255.186: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! Thanks - just needs a slight rebase.

@michael-s-molina michael-s-molina force-pushed the tests-audit-annotation-layer-control branch from 36152cd to 60722af Compare April 1, 2021 11:40
@michael-s-molina
Copy link
Member Author

LGTM! Thanks - just needs a slight rebase.

Rebased 😉

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

github-actions bot commented Apr 1, 2021

Ephemeral environment shutdown and build artifacts deleted.

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
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@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 need:merge The PR is ready to be merged test:component 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants