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 2022/08/24 16:23:34 UTC

[GitHub] [superset] kgabryje opened a new pull request, #21184: chore: Add new e2e tests for Explore

kgabryje opened a new pull request, #21184:
URL: https://github.com/apache/superset/pull/21184

   ### SUMMARY
   
   1. Creating a chart from dataset list:
   - Open dataset list
   - Click on dataset name
   - Explore should open with the clicked dataset selected and table chart set by default
   
   2. Creating a chart from SqlLab
   - Open SqlLab run type a query
   - Click Create Chart
   - Explore should open with the query from SqlLab as source, table chart set by default and columns selected in the query set as columns in table chart
   
   3. Editing dataset from Explore (re-enable and fix skipped test):
   - Click Edit dataset
   - Add new metric
   - Add the new metric to metrics control
   - Click Edit dataset
   - Delete the newly added metric
   - Verify that it was removed from metrics control
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #21184:
URL: https://github.com/apache/superset/pull/21184#issuecomment-1227622814

   Storybook has completed and can be viewed at 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #21184:
URL: https://github.com/apache/superset/pull/21184#issuecomment-1226041264

   Storybook has completed and can be viewed at 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] kgabryje commented on a diff in pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
kgabryje commented on code in PR #21184:
URL: https://github.com/apache/superset/pull/21184#discussion_r954903893


##########
superset-frontend/cypress-base/cypress/integration/sqllab/query.test.ts:
##########
@@ -157,4 +147,52 @@ describe('SqlLab query panel', () => {
       assertSQLLabResultsAreEqual(initialResultsTable, savedQueryResultsTable);
     });
   });
+
+  it('Create a chart from a query', () => {
+    cy.intercept('/superset/sql_json/').as('queryFinished');
+    cy.intercept('**/api/v1/explore/**').as('explore');
+    cy.intercept('**/api/v1/chart/**').as('chart');
+
+    // cypress doesn't handle opening a new tab, override window.open to open in the same tab
+    cy.window().then(win => {
+      cy.stub(win, 'open', url => {
+        // eslint-disable-next-line no-param-reassign
+        win.location.href = url;
+      });
+    });
+
+    const query = 'SELECT gender, name FROM main.birth_names';
+
+    cy.get('.ace_text-input')
+      .focus()
+      .clear({ force: true })
+      .type(`{selectall}{backspace}${query}`, { force: true });
+    cy.get('.sql-toolbar button').contains('Run').click();
+    cy.wait('@queryFinished');
+
+    cy.get(
+      '.SouthPane .ant-tabs-content > .ant-tabs-tabpane-active > div button:first',
+      { timeout: 10000 },

Review Comment:
   Sometimes there was a small delay in rendering the component with buttons. Even though we wait for the query to finish, the test was flaky because cypress couldn't find the button because of that delay. A smaller timeout would probably work just as well though



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 diff in pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
geido commented on code in PR #21184:
URL: https://github.com/apache/superset/pull/21184#discussion_r954873346


##########
superset-frontend/cypress-base/cypress/integration/sqllab/query.test.ts:
##########
@@ -157,4 +147,52 @@ describe('SqlLab query panel', () => {
       assertSQLLabResultsAreEqual(initialResultsTable, savedQueryResultsTable);
     });
   });
+
+  it('Create a chart from a query', () => {
+    cy.intercept('/superset/sql_json/').as('queryFinished');
+    cy.intercept('**/api/v1/explore/**').as('explore');
+    cy.intercept('**/api/v1/chart/**').as('chart');
+
+    // cypress doesn't handle opening a new tab, override window.open to open in the same tab
+    cy.window().then(win => {
+      cy.stub(win, 'open', url => {
+        // eslint-disable-next-line no-param-reassign
+        win.location.href = url;
+      });
+    });
+
+    const query = 'SELECT gender, name FROM main.birth_names';
+
+    cy.get('.ace_text-input')
+      .focus()
+      .clear({ force: true })
+      .type(`{selectall}{backspace}${query}`, { force: true });
+    cy.get('.sql-toolbar button').contains('Run').click();
+    cy.wait('@queryFinished');
+
+    cy.get(
+      '.SouthPane .ant-tabs-content > .ant-tabs-tabpane-active > div button:first',
+      { timeout: 10000 },

Review Comment:
   Just out of curiosity, what's the reason of this high timeout?



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] kgabryje merged pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
kgabryje merged PR #21184:
URL: https://github.com/apache/superset/pull/21184


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] kgabryje commented on pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
kgabryje commented on PR #21184:
URL: https://github.com/apache/superset/pull/21184#issuecomment-1225952964

   @adam-stasiak Can you take a look? πŸ™ 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #21184: chore: Add new e2e tests for Explore

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #21184:
URL: https://github.com/apache/superset/pull/21184#issuecomment-1226130431

   Storybook has completed and can be viewed at 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 #21184: chore: Add new e2e tests for Explore

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

   # [Codecov](https://codecov.io/gh/apache/superset/pull/21184?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 [#21184](https://codecov.io/gh/apache/superset/pull/21184?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f275a4e) into [master](https://codecov.io/gh/apache/superset/commit/756ed0e36acead74944112a8b678a7151319c26f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (756ed0e) will **increase** coverage by `0.10%`.
   > The diff coverage is `52.50%`.
   
   > :exclamation: Current head f275a4e differs from pull request most recent head 93680d3. Consider uploading reports for the commit 93680d3 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #21184      +/-   ##
   ==========================================
   + Coverage   66.29%   66.39%   +0.10%     
   ==========================================
     Files        1773     1781       +8     
     Lines       67680    67885     +205     
     Branches     7214     7244      +30     
   ==========================================
   + Hits        44866    45073     +207     
   + Misses      20971    20953      -18     
   - Partials     1843     1859      +16     
   ```
   
   | Flag | Coverage Ξ” | |
   |---|---|---|
   | javascript | `52.30% <48.50%> (+0.19%)` | :arrow_up: |
   
   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/21184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | |
   |---|---|---|
   | [...packages/superset-ui-core/src/query/types/Query.ts](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUXVlcnkudHM=) | `100.00% <ΓΈ> (ΓΈ)` | |
   | [...gins/legacy-plugin-chart-world-map/src/WorldMap.js](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXdvcmxkLW1hcC9zcmMvV29ybGRNYXAuanM=) | `0.00% <0.00%> (ΓΈ)` | |
   | [...egacy-plugin-chart-world-map/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXdvcmxkLW1hcC9zcmMvdHJhbnNmb3JtUHJvcHMuanM=) | `0.00% <0.00%> (ΓΈ)` | |
   | [...ns/plugin-chart-echarts/src/Gauge/EchartsGauge.tsx](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvR2F1Z2UvRWNoYXJ0c0dhdWdlLnRzeA==) | `0.00% <0.00%> (ΓΈ)` | |
   | [...rts/src/MixedTimeseries/EchartsMixedTimeseries.tsx](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvTWl4ZWRUaW1lc2VyaWVzL0VjaGFydHNNaXhlZFRpbWVzZXJpZXMudHN4) | `0.00% <0.00%> (ΓΈ)` | |
   | [...hart-echarts/src/MixedTimeseries/transformProps.ts](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvTWl4ZWRUaW1lc2VyaWVzL3RyYW5zZm9ybVByb3BzLnRz) | `0.00% <0.00%> (ΓΈ)` | |
   | [...chart-echarts/src/Timeseries/EchartsTimeseries.tsx](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9FY2hhcnRzVGltZXNlcmllcy50c3g=) | `0.00% <0.00%> (ΓΈ)` | |
   | [...ns/plugin-chart-echarts/src/utils/eventHandlers.ts](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvdXRpbHMvZXZlbnRIYW5kbGVycy50cw==) | `0.00% <0.00%> (ΓΈ)` | |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (ΓΈ)` | |
   | [superset-frontend/src/SqlLab/types.ts](https://codecov.io/gh/apache/superset/pull/21184/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi90eXBlcy50cw==) | `57.14% <ΓΈ> (ΓΈ)` | |
   | ... and [77 more](https://codecov.io/gh/apache/superset/pull/21184/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) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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