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/02/24 14:26:59 UTC

[GitHub] [superset] yardz opened a new pull request #13318: test: CacheLabel

yardz opened a new pull request #13318:
URL: https://github.com/apache/superset/pull/13318


   ### SUMMARY
   - Extended the label props to HTMLAttributes (avoid errors for invalid props when they are actually valid)
   - Spliting the content of tolltip into another component: `TolltipContent`.
   - Converting component to typescript.
   - Creating tests for these components
   
   
   ### TEST PLAN
   No change in behavior. All tests must pass.
   
   


----------------------------------------------------------------
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] geido commented on a change in pull request #13318: test: CacheLabel

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



##########
File path: superset-frontend/src/components/CachedLabel/CachedLabel.test.tsx
##########
@@ -0,0 +1,39 @@
+/**
+ * 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 moment from 'moment';
+import { TooltipContent } from './TooltipContent';
+
+test('Rendering TooltipContent correctly - no timestep', () => {

Review comment:
       Small typo timestep to be timestamp

##########
File path: superset-frontend/src/components/CachedLabel/CachedLabel.test.tsx
##########
@@ -0,0 +1,39 @@
+/**
+ * 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 moment from 'moment';
+import { TooltipContent } from './TooltipContent';
+
+test('Rendering TooltipContent correctly - no timestep', () => {
+  render(<TooltipContent />);
+  expect(screen.getByTestId('tooltip-content')?.textContent).toBe(
+    'Loaded from cache. Click to force-refresh',
+  );
+});
+
+test('Rendering TooltipContent correctly - with timestep', () => {

Review comment:
       Same typo. Found also in the other tests




----------------------------------------------------------------
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 #13318: test: CacheLabel

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13318?src=pr&el=h1) Report
   > Merging [#13318](https://codecov.io/gh/apache/superset/pull/13318?src=pr&el=desc) (b00415c) into [master](https://codecov.io/gh/apache/superset/commit/29d6420ecc2187db951f08dd47289277a11f4db5?el=desc) (29d6420) will **decrease** coverage by `4.45%`.
   > The diff coverage is `60.05%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13318/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13318?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13318      +/-   ##
   ==========================================
   - Coverage   77.20%   72.74%   -4.46%     
   ==========================================
     Files         872      577     -295     
     Lines       45101    21021   -24080     
     Branches     5435     5375      -60     
   ==========================================
   - Hits        34820    15292   -19528     
   + Misses      10158     5606    -4552     
     Partials      123      123              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `58.18% <20.95%> (-0.36%)` | :arrow_down: |
   | javascript | `62.31% <60.05%> (-0.03%)` | :arrow_down: |
   | python | `?` | |
   
   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/13318?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...et-frontend/src/components/Icons/icons.stories.jsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvSWNvbnMvaWNvbnMuc3Rvcmllcy5qc3g=) | `0.00% <0.00%> (ø)` | |
   | [superset-frontend/src/components/Label/index.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGFiZWwvaW5kZXgudHN4) | `100.00% <ø> (ø)` | |
   | [...c/components/ListViewCard/ListViewCard.stories.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0xpc3RWaWV3Q2FyZC5zdG9yaWVzLnRzeA==) | `0.00% <0.00%> (ø)` | |
   | [...set-frontend/src/components/ListViewCard/index.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL2luZGV4LnRzeA==) | `100.00% <ø> (+5.45%)` | :arrow_up: |
   | [...perset-frontend/src/views/CRUD/alert/AlertList.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYWxlcnQvQWxlcnRMaXN0LnRzeA==) | `75.75% <ø> (ø)` | |
   | [...ntend/src/views/CRUD/annotation/AnnotationList.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYW5ub3RhdGlvbi9Bbm5vdGF0aW9uTGlzdC50c3g=) | `76.92% <ø> (ø)` | |
   | [...ews/CRUD/annotationlayers/AnnotationLayersList.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvYW5ub3RhdGlvbmxheWVycy9Bbm5vdGF0aW9uTGF5ZXJzTGlzdC50c3g=) | `77.88% <ø> (ø)` | |
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `78.26% <ø> (ø)` | |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `71.55% <ø> (ø)` | |
   | [...perset-frontend/src/views/CRUD/chart/ChartCard.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY2hhcnQvQ2hhcnRDYXJkLnRzeA==) | `78.94% <40.00%> (+0.56%)` | :arrow_up: |
   | ... and [311 more](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13318?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/13318?src=pr&el=footer). Last update [29d6420...0a5b008](https://codecov.io/gh/apache/superset/pull/13318?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 #13318: test: CacheLabel

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



##########
File path: superset-frontend/src/components/CachedLabel/CachedLabel.test.tsx
##########
@@ -0,0 +1,39 @@
+/**
+ * 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 moment from 'moment';
+import { TooltipContent } from './TooltipContent';
+
+test('Rendering TooltipContent correctly - no timestep', () => {

Review comment:
       Copy and paste error rsrsrs
   Thanks




----------------------------------------------------------------
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 #13318: test: CacheLabel

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13318?src=pr&el=h1) Report
   > Merging [#13318](https://codecov.io/gh/apache/superset/pull/13318?src=pr&el=desc) (893bedb) into [master](https://codecov.io/gh/apache/superset/commit/29d6420ecc2187db951f08dd47289277a11f4db5?el=desc) (29d6420) will **decrease** coverage by `18.62%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13318/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13318?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13318       +/-   ##
   ===========================================
   - Coverage   77.20%   58.58%   -18.63%     
   ===========================================
     Files         872      481      -391     
     Lines       45101    15996    -29105     
     Branches     5435     4130     -1305     
   ===========================================
   - Hits        34820     9371    -25449     
   + Misses      10158     6625     -3533     
   + Partials      123        0      -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `58.58% <50.00%> (+0.04%)` | :arrow_up: |
   | javascript | `?` | |
   | python | `?` | |
   
   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/13318?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/components/Label/index.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGFiZWwvaW5kZXgudHN4) | `93.10% <ø> (-6.90%)` | :arrow_down: |
   | [...tend/src/components/CachedLabel/TooltipContent.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2FjaGVkTGFiZWwvVG9vbHRpcENvbnRlbnQudHN4) | `20.00% <20.00%> (ø)` | |
   | [...rset-frontend/src/components/CachedLabel/index.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2FjaGVkTGFiZWwvaW5kZXgudHN4) | `71.42% <71.42%> (ø)` | |
   | [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...tersConfigModal/Footer/CancelConfirmationAlert.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0Zvb3Rlci9DYW5jZWxDb25maXJtYXRpb25BbGVydC50c3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ConfigModal/FiltersConfigForm/FilterScope/state.ts](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlclNjb3BlL3N0YXRlLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...odal/FiltersConfigForm/FilterScope/ScopingTree.tsx](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlclNjb3BlL1Njb3BpbmdUcmVlLnRzeA==) | `6.25% <0.00%> (-93.75%)` | :arrow_down: |
   | [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
   | ... and [740 more](https://codecov.io/gh/apache/superset/pull/13318/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13318?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/13318?src=pr&el=footer). Last update [29d6420...0a5b008](https://codecov.io/gh/apache/superset/pull/13318?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 pull request #13318: test: CacheLabel

Posted by GitBox <gi...@apache.org>.
yardz commented on pull request #13318:
URL: https://github.com/apache/superset/pull/13318#issuecomment-785948999


   @ktmud or @rusackas 


----------------------------------------------------------------
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 #13318: test: CacheLabel

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


   


----------------------------------------------------------------
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