You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/03/19 13:51:31 UTC

[GitHub] [superset] michael-s-molina opened a new pull request #13705: test: Adds tests for the FixedOrMetricControl component

michael-s-molina opened a new pull request #13705:
URL: https://github.com/apache/superset/pull/13705


   ### SUMMARY
   Adds tests for the FixedOrMetricControl component.
   
   ### TEST PLAN
   1 - Execute `FixedOrMetricControl` 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (f91fe7e) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **decrease** coverage by `0.79%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f91fe7e differs from pull request most recent head 5919939. Consider uploading reports for the commit 5919939 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   - Coverage   77.83%   77.04%   -0.80%     
   ==========================================
     Files         934      935       +1     
     Lines       47320    47373      +53     
     Branches     5913     5932      +19     
   ==========================================
   - Hits        36831    36498     -333     
   - Misses      10346    10720     +374     
   - Partials      143      155      +12     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `51.50% <ø> (-4.53%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `9.25% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `85.96% <ø> (-4.10%)` | :arrow_down: |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `88.37% <ø> (ø)` | |
   | [...ponents/Select/WindowedSelect/WindowedMenuList.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1dpbmRvd2VkU2VsZWN0L1dpbmRvd2VkTWVudUxpc3QudHN4) | `10.71% <0.00%> (-85.72%)` | :arrow_down: |
   | [...nd/src/filters/components/Select/transformProps.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHJhbnNmb3JtUHJvcHMudHM=) | `0.00% <0.00%> (-81.82%)` | :arrow_down: |
   | [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `0.00% <0.00%> (-80.96%)` | :arrow_down: |
   | [...ontend/src/filters/components/Select/buildQuery.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvYnVpbGRRdWVyeS50cw==) | `0.00% <0.00%> (-77.78%)` | :arrow_down: |
   | [superset-frontend/src/filters/components/common.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9jb21tb24udHM=) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [superset-frontend/src/dataMask/reducer.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL3JlZHVjZXIudHM=) | `44.00% <0.00%> (-56.00%)` | :arrow_down: |
   | [superset-frontend/src/dataMask/actions.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFNYXNrL2FjdGlvbnMudHM=) | `33.33% <0.00%> (-46.67%)` | :arrow_down: |
   | ... and [39 more](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...5919939](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (f91fe7e) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **increase** coverage by `0.04%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f91fe7e differs from pull request most recent head 5919939. Consider uploading reports for the commit 5919939 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   + Coverage   77.83%   77.87%   +0.04%     
   ==========================================
     Files         934      934              
     Lines       47320    47320              
     Branches     5913     5923      +10     
   ==========================================
   + Hits        36831    36850      +19     
   + Misses      10346    10327      -19     
     Partials      143      143              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.05% <ø> (+0.01%)` | :arrow_up: |
   | javascript | `64.71% <ø> (+0.08%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `82.14% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `88.37% <ø> (ø)` | |
   | [.../controls/MetricControl/AdhocMetricEditPopover.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXIuanN4) | `78.78% <0.00%> (-0.76%)` | :arrow_down: |
   | [superset-frontend/src/filters/utils.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvdXRpbHMudHM=) | `100.00% <0.00%> (+4.76%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...5919939](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r612550367



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.jsx
##########
@@ -22,10 +22,10 @@ import { css } from '@emotion/core';
 import { t } from '@superset-ui/core';
 import Label from 'src/components/Label';
 import Collapse from 'src/common/components/Collapse';
-import TextControl from './TextControl';
-import MetricsControl from './MetricControl/MetricsControl';
-import ControlHeader from '../ControlHeader';
-import PopoverSection from '../../../components/PopoverSection';
+import TextControl from '../TextControl';
+import MetricsControl from '../MetricControl/MetricsControl';
+import ControlHeader from '../../ControlHeader';
+import PopoverSection from '../../../../components/PopoverSection';

Review comment:
       src path might be a good idea here for these ones that are further up the hierarchy




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (f91fe7e) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **increase** coverage by `0.04%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f91fe7e differs from pull request most recent head ea126af. Consider uploading reports for the commit ea126af to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   + Coverage   77.83%   77.87%   +0.04%     
   ==========================================
     Files         934      934              
     Lines       47320    47320              
     Branches     5913     5923      +10     
   ==========================================
   + Hits        36831    36850      +19     
   + Misses      10346    10327      -19     
     Partials      143      143              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.05% <ø> (+0.01%)` | :arrow_up: |
   | javascript | `64.71% <ø> (+0.08%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `82.14% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `88.37% <ø> (ø)` | |
   | [.../controls/MetricControl/AdhocMetricEditPopover.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXIuanN4) | `78.78% <0.00%> (-0.76%)` | :arrow_down: |
   | [superset-frontend/src/filters/utils.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvdXRpbHMudHM=) | `100.00% <0.00%> (+4.76%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...ea126af](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (f91fe7e) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **decrease** coverage by `0.07%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f91fe7e differs from pull request most recent head 5919939. Consider uploading reports for the commit 5919939 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   - Coverage   77.83%   77.75%   -0.08%     
   ==========================================
     Files         934      935       +1     
     Lines       47320    47374      +54     
     Branches     5913     5932      +19     
   ==========================================
   + Hits        36831    36837       +6     
   - Misses      10346    10394      +48     
     Partials      143      143              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.05% <ø> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `9.25% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `88.37% <ø> (ø)` | |
   | [.../controls/MetricControl/AdhocMetricEditPopover.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXIuanN4) | `78.78% <0.00%> (-0.76%)` | :arrow_down: |
   | [superset-frontend/src/filters/utils.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvdXRpbHMudHM=) | `100.00% <0.00%> (+4.76%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...5919939](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r605849314



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {

Review comment:
       Yes. Done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r605849574



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {
+  datasource: {
+    columns: [{ column_name: 'Column A' }],
+    metrics: [{ metric_name: 'Metric A', expression: 'COUNT(*)' }],
+  },
+};
+
+test('renders with minimal props', () => {
+  render(<FixedOrMetricControl {...defaultProps} />);
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('5')).toBeInTheDocument();
+});
+
+test('renders with default value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('10')).toBeInTheDocument();
+});
+
+test('renders with value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+      value={{ type: 'fix', value: 20 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('20')).toBeInTheDocument();
+});
+
+test('renders with metric type', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{
+        type: 'metric',
+        value: {
+          label: 'Metric A',
+          expressionType: 'SQL',
+          sqlExpression: 'COUNT(*)',
+        },
+      }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('Metric A')).toBeInTheDocument();
+});
+
+test('triggers onChange', () => {
+  const onChange = jest.fn();
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{ type: 'fix', value: 10 }}
+      onChange={onChange}
+    />,
+  );
+  userEvent.click(screen.getByText('10'));

Review comment:
       Done. I put an assertion before `onChange`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (112afa8) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **decrease** coverage by `0.68%`.
   > The diff coverage is `87.50%`.
   
   > :exclamation: Current head 112afa8 differs from pull request most recent head ea126af. Consider uploading reports for the commit ea126af to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   - Coverage   77.83%   77.14%   -0.69%     
   ==========================================
     Files         934      939       +5     
     Lines       47320    47781     +461     
     Branches     5913     6058     +145     
   ==========================================
   + Hits        36831    36862      +31     
   - Misses      10346    10776     +430     
     Partials      143      143              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.03% <0.00%> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...ontrols/AnnotationLayerControl/AnnotationLayer.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sL0Fubm90YXRpb25MYXllci5qc3g=) | `52.40% <ø> (ø)` | |
   | [...mponents/controls/AnnotationLayerControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sL2luZGV4LmpzeA==) | `82.85% <ø> (ø)` | |
   | [...ponents/controls/DndColumnSelectControl/Option.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbi50c3g=) | `0.00% <ø> (ø)` | |
   | [.../controls/DndColumnSelectControl/OptionWrapper.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbldyYXBwZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `9.25% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [.../src/explore/components/controls/SelectControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TZWxlY3RDb250cm9sLmpzeA==) | `94.30% <ø> (+0.55%)` | :arrow_up: |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `83.92% <ø> (-4.45%)` | :arrow_down: |
   | [...ontrols/DndColumnSelectControl/DndFilterSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZEZpbHRlclNlbGVjdC50c3g=) | `6.46% <83.33%> (-2.77%)` | :arrow_down: |
   | [...ontrols/DndColumnSelectControl/DndColumnSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZENvbHVtblNlbGVjdC50c3g=) | `22.58% <100.00%> (ø)` | |
   | ... and [11 more](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...ea126af](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] yardz commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
yardz commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r605832326



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {

Review comment:
       Don't you think it would be nice to apply a factory here to ensure the correct values?

##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {
+  datasource: {
+    columns: [{ column_name: 'Column A' }],
+    metrics: [{ metric_name: 'Metric A', expression: 'COUNT(*)' }],
+  },
+};
+
+test('renders with minimal props', () => {
+  render(<FixedOrMetricControl {...defaultProps} />);
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('5')).toBeInTheDocument();
+});
+
+test('renders with default value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('10')).toBeInTheDocument();
+});
+
+test('renders with value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+      value={{ type: 'fix', value: 20 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('20')).toBeInTheDocument();
+});
+
+test('renders with metric type', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{
+        type: 'metric',
+        value: {
+          label: 'Metric A',
+          expressionType: 'SQL',
+          sqlExpression: 'COUNT(*)',
+        },
+      }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('Metric A')).toBeInTheDocument();
+});
+
+test('triggers onChange', () => {
+  const onChange = jest.fn();
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{ type: 'fix', value: 10 }}
+      onChange={onChange}
+    />,
+  );
+  userEvent.click(screen.getByText('10'));

Review comment:
       I like to put an assert before the click, to show/ensure that the function was not called by any side effect.

##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {
+  datasource: {
+    columns: [{ column_name: 'Column A' }],
+    metrics: [{ metric_name: 'Metric A', expression: 'COUNT(*)' }],
+  },
+};
+
+test('renders with minimal props', () => {
+  render(<FixedOrMetricControl {...defaultProps} />);
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('5')).toBeInTheDocument();
+});
+
+test('renders with default value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('10')).toBeInTheDocument();
+});
+
+test('renders with value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+      value={{ type: 'fix', value: 20 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('20')).toBeInTheDocument();
+});
+
+test('renders with metric type', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{
+        type: 'metric',
+        value: {
+          label: 'Metric A',
+          expressionType: 'SQL',
+          sqlExpression: 'COUNT(*)',
+        },
+      }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('Metric A')).toBeInTheDocument();
+});
+
+test('triggers onChange', () => {
+  const onChange = jest.fn();
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{ type: 'fix', value: 10 }}
+      onChange={onChange}
+    />,
+  );
+  userEvent.click(screen.getByText('10'));
+  userEvent.type(screen.getByRole('textbox'), '20');
+  expect(onChange).toHaveBeenCalled();
+});
+
+test('switches control type', () => {

Review comment:
       I didn't understand this test. After clicking the 10 should it disappear? Is he always there?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas merged pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
rusackas merged pull request #13705:
URL: https://github.com/apache/superset/pull/13705


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (112afa8) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **decrease** coverage by `1.42%`.
   > The diff coverage is `87.50%`.
   
   > :exclamation: Current head 112afa8 differs from pull request most recent head ea126af. Consider uploading reports for the commit ea126af to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   - Coverage   77.83%   76.40%   -1.43%     
   ==========================================
     Files         934      939       +5     
     Lines       47320    47781     +461     
     Branches     5913     6058     +145     
   ==========================================
   - Hits        36831    36509     -322     
   - Misses      10346    11116     +770     
   - Partials      143      156      +13     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `52.35% <0.00%> (-3.68%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...ontrols/AnnotationLayerControl/AnnotationLayer.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sL0Fubm90YXRpb25MYXllci5qc3g=) | `2.40% <ø> (ø)` | |
   | [...mponents/controls/AnnotationLayerControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sL2luZGV4LmpzeA==) | `42.85% <ø> (ø)` | |
   | [...ponents/controls/DndColumnSelectControl/Option.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbi50c3g=) | `0.00% <ø> (ø)` | |
   | [.../controls/DndColumnSelectControl/OptionWrapper.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbldyYXBwZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `9.25% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `85.38% <ø> (-4.68%)` | :arrow_down: |
   | [.../src/explore/components/controls/SelectControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TZWxlY3RDb250cm9sLmpzeA==) | `94.30% <ø> (+0.55%)` | :arrow_up: |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `73.21% <ø> (-15.16%)` | :arrow_down: |
   | [...ontrols/DndColumnSelectControl/DndFilterSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZEZpbHRlclNlbGVjdC50c3g=) | `6.46% <83.33%> (-2.77%)` | :arrow_down: |
   | [...ontrols/DndColumnSelectControl/DndColumnSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZENvbHVtblNlbGVjdC50c3g=) | `22.58% <100.00%> (ø)` | |
   | ... and [42 more](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...ea126af](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc) (112afa8) into [master](https://codecov.io/gh/apache/superset/commit/9156f089ffb96fe765d67766cc015cf3d7df2faa?el=desc) (9156f08) will **increase** coverage by `0.52%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 112afa8 differs from pull request most recent head ea126af. Consider uploading reports for the commit ea126af to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   + Coverage   77.83%   78.35%   +0.52%     
   ==========================================
     Files         934      934              
     Lines       47320    47320              
     Branches     5913     5937      +24     
   ==========================================
   + Hits        36831    37078     +247     
   + Misses      10346    10098     -248     
   - Partials      143      144       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.03% <0.00%> (ø)` | |
   | javascript | `66.37% <100.00%> (+1.74%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...ontrols/AnnotationLayerControl/AnnotationLayer.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sL0Fubm90YXRpb25MYXllci5qc3g=) | `84.76% <ø> (ø)` | |
   | [...mponents/controls/AnnotationLayerControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Bbm5vdGF0aW9uTGF5ZXJDb250cm9sL2luZGV4LmpzeA==) | `82.85% <ø> (ø)` | |
   | [...ponents/controls/DndColumnSelectControl/Option.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL09wdGlvbi50c3g=) | `100.00% <ø> (ø)` | |
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `82.14% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [.../src/explore/components/controls/SelectControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TZWxlY3RDb250cm9sLmpzeA==) | `93.75% <ø> (ø)` | |
   | [.../explore/components/controls/TextControl/index.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9UZXh0Q29udHJvbC9pbmRleC50c3g=) | `88.37% <ø> (ø)` | |
   | [...ontrols/DndColumnSelectControl/DndColumnSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZENvbHVtblNlbGVjdC50c3g=) | `58.06% <100.00%> (+35.48%)` | :arrow_up: |
   | [...ontrols/DndColumnSelectControl/DndFilterSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZEZpbHRlclNlbGVjdC50c3g=) | `45.38% <100.00%> (+36.15%)` | :arrow_up: |
   | [...ontrols/DndColumnSelectControl/DndMetricSelect.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZE1ldHJpY1NlbGVjdC50c3g=) | `43.65% <100.00%> (+33.33%)` | :arrow_up: |
   | ... and [14 more](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer). Last update [9156f08...ea126af](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (883eaba) into [master](https://codecov.io/gh/apache/superset/commit/4b23d0eccabcc3932369c90468be8b4f36ec64d0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4b23d0e) will **increase** coverage by `0.08%`.
   > The diff coverage is `20.00%`.
   
   > :exclamation: Current head 883eaba differs from pull request most recent head 8d30382. Consider uploading reports for the commit 8d30382 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   + Coverage   79.54%   79.62%   +0.08%     
   ==========================================
     Files         942      943       +1     
     Lines       47705    47763      +58     
     Branches     6010     6028      +18     
   ==========================================
   + Hits        37948    38033      +85     
   + Misses       9636     9609      -27     
     Partials      121      121              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.32% <0.00%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `9.25% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [superset-frontend/src/views/CRUD/utils.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdXRpbHMudHN4) | `60.60% <0.00%> (-2.56%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `73.72% <100.00%> (ø)` | |
   | [superset-frontend/src/filters/utils.ts](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvdXRpbHMudHM=) | `95.23% <0.00%> (-4.77%)` | :arrow_down: |
   | [...ols/MetricControl/AdhocMetricEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL0FkaG9jTWV0cmljRWRpdFBvcG92ZXIvaW5kZXguanN4) | `83.33% <0.00%> (-0.76%)` | :arrow_down: |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `88.83% <0.00%> (+0.12%)` | :arrow_up: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.61% <0.00%> (+0.24%)` | :arrow_up: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.44% <0.00%> (+0.44%)` | :arrow_up: |
   | ... and [4 more](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4b23d0e...8d30382](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r605849574



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {
+  datasource: {
+    columns: [{ column_name: 'Column A' }],
+    metrics: [{ metric_name: 'Metric A', expression: 'COUNT(*)' }],
+  },
+};
+
+test('renders with minimal props', () => {
+  render(<FixedOrMetricControl {...defaultProps} />);
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('5')).toBeInTheDocument();
+});
+
+test('renders with default value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('10')).toBeInTheDocument();
+});
+
+test('renders with value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+      value={{ type: 'fix', value: 20 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('20')).toBeInTheDocument();
+});
+
+test('renders with metric type', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{
+        type: 'metric',
+        value: {
+          label: 'Metric A',
+          expressionType: 'SQL',
+          sqlExpression: 'COUNT(*)',
+        },
+      }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('Metric A')).toBeInTheDocument();
+});
+
+test('triggers onChange', () => {
+  const onChange = jest.fn();
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{ type: 'fix', value: 10 }}
+      onChange={onChange}
+    />,
+  );
+  userEvent.click(screen.getByText('10'));

Review comment:
       Done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r612587805



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/index.jsx
##########
@@ -22,10 +22,10 @@ import { css } from '@emotion/core';
 import { t } from '@superset-ui/core';
 import Label from 'src/components/Label';
 import Collapse from 'src/common/components/Collapse';
-import TextControl from './TextControl';
-import MetricsControl from './MetricControl/MetricsControl';
-import ControlHeader from '../ControlHeader';
-import PopoverSection from '../../../components/PopoverSection';
+import TextControl from '../TextControl';
+import MetricsControl from '../MetricControl/MetricsControl';
+import ControlHeader from '../../ControlHeader';
+import PopoverSection from '../../../../components/PopoverSection';

Review comment:
       Fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a change in pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #13705:
URL: https://github.com/apache/superset/pull/13705#discussion_r605851669



##########
File path: superset-frontend/src/explore/components/controls/FixedOrMetricControl/FixedOrMetricControl.test.tsx
##########
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import userEvent from '@testing-library/user-event';
+import FixedOrMetricControl from '.';
+
+const defaultProps = {
+  datasource: {
+    columns: [{ column_name: 'Column A' }],
+    metrics: [{ metric_name: 'Metric A', expression: 'COUNT(*)' }],
+  },
+};
+
+test('renders with minimal props', () => {
+  render(<FixedOrMetricControl {...defaultProps} />);
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('5')).toBeInTheDocument();
+});
+
+test('renders with default value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('10')).toBeInTheDocument();
+});
+
+test('renders with value', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      default={{ type: 'fix', value: 10 }}
+      value={{ type: 'fix', value: 20 }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('20')).toBeInTheDocument();
+});
+
+test('renders with metric type', () => {
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{
+        type: 'metric',
+        value: {
+          label: 'Metric A',
+          expressionType: 'SQL',
+          sqlExpression: 'COUNT(*)',
+        },
+      }}
+    />,
+  );
+  expect(screen.getByRole('button')).toBeInTheDocument();
+  expect(screen.getByText('Metric A')).toBeInTheDocument();
+});
+
+test('triggers onChange', () => {
+  const onChange = jest.fn();
+  render(
+    <FixedOrMetricControl
+      {...defaultProps}
+      value={{ type: 'fix', value: 10 }}
+      onChange={onChange}
+    />,
+  );
+  userEvent.click(screen.getByText('10'));
+  userEvent.type(screen.getByRole('textbox'), '20');
+  expect(onChange).toHaveBeenCalled();
+});
+
+test('switches control type', () => {

Review comment:
       `10` is there because of `value={{ type: 'fix', value: 10 }}`. I clicked on `10` to edit to `20`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #13705: test: Adds tests for the FixedOrMetricControl component

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #13705:
URL: https://github.com/apache/superset/pull/13705#issuecomment-811884697


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#13705](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (112afa8) into [master](https://codecov.io/gh/apache/superset/commit/4b23d0eccabcc3932369c90468be8b4f36ec64d0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4b23d0e) will **decrease** coverage by `1.19%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 112afa8 differs from pull request most recent head 8d30382. Consider uploading reports for the commit 8d30382 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13705/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13705      +/-   ##
   ==========================================
   - Coverage   79.54%   78.35%   -1.20%     
   ==========================================
     Files         942      934       -8     
     Lines       47705    47320     -385     
     Branches     6010     5937      -73     
   ==========================================
   - Hits        37948    37078     -870     
   - Misses       9636    10098     +462     
   - Partials      121      144      +23     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `56.03% <ø> (-0.32%)` | :arrow_down: |
   | javascript | `66.37% <ø> (-3.31%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...components/controls/FixedOrMetricControl/index.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaXhlZE9yTWV0cmljQ29udHJvbC9pbmRleC5qc3g=) | `82.14% <ø> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `90.05% <ø> (ø)` | |
   | [...tend/src/dashboard/util/getFilterFieldNodesTree.js](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlckZpZWxkTm9kZXNUcmVlLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...end/src/dashboard/util/getKeyForFilterScopeTree.js](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEtleUZvckZpbHRlclNjb3BlVHJlZS5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...nd/src/dashboard/util/getFilterScopeParentNodes.js](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlUGFyZW50Tm9kZXMuanM=) | `0.00% <0.00%> (-91.67%)` | :arrow_down: |
   | [...ponents/filterscope/renderFilterFieldTreeNodes.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2ZpbHRlcnNjb3BlL3JlbmRlckZpbHRlckZpZWxkVHJlZU5vZGVzLmpzeA==) | `0.00% <0.00%> (-90.00%)` | :arrow_down: |
   | [...ponents/filterscope/renderFilterScopeTreeNodes.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2ZpbHRlcnNjb3BlL3JlbmRlckZpbHRlclNjb3BlVHJlZU5vZGVzLmpzeA==) | `0.00% <0.00%> (-86.67%)` | :arrow_down: |
   | [superset/reports/commands/log\_prune.py](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9sb2dfcHJ1bmUucHk=) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [...ard/components/filterscope/FilterScopeSelector.jsx](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2ZpbHRlcnNjb3BlL0ZpbHRlclNjb3BlU2VsZWN0b3IuanN4) | `2.05% <0.00%> (-85.62%)` | :arrow_down: |
   | [...board/util/getSelectedChartIdForFilterScopeTree.js](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldFNlbGVjdGVkQ2hhcnRJZEZvckZpbHRlclNjb3BlVHJlZS5qcw==) | `0.00% <0.00%> (-80.00%)` | :arrow_down: |
   | ... and [200 more](https://codecov.io/gh/apache/superset/pull/13705/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [4b23d0e...8d30382](https://codecov.io/gh/apache/superset/pull/13705?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org