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 2020/09/18 19:56:23 UTC

[GitHub] [incubator-superset] eschutho opened a new pull request #10962: Fix cypress dashboard edit mode test

eschutho opened a new pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962


   ### SUMMARY
   Fixes broken/flaky test
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   should pass on cypress
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] 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] [incubator-superset] eschutho commented on pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho commented on pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#issuecomment-696458378


   @adam-stasiak is going to help out with Cypress tests, so closing this PR. 


----------------------------------------------------------------
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] [incubator-superset] eschutho closed pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho closed pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962


   


----------------------------------------------------------------
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] [incubator-superset] eschutho commented on pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho commented on pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#issuecomment-696458378


   @adam-stasiak is going to help out with Cypress tests, so closing this PR. 


----------------------------------------------------------------
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] [incubator-superset] eschutho closed pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho closed pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962


   


----------------------------------------------------------------
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] [incubator-superset] eschutho commented on pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho commented on pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#issuecomment-696458378


   @adam-stasiak is going to help out with Cypress tests, so closing this PR. 


----------------------------------------------------------------
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] [incubator-superset] eschutho commented on a change in pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho commented on a change in pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#discussion_r492261696



##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_mode.test.js
##########
@@ -23,34 +23,35 @@ describe('Dashboard edit mode', () => {
     cy.server();
     cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
+    cy.route('POST', '/superset/explore_json/*?dashboard_id=1').as('worldMap');
     cy.get('.dashboard-header [data-test=pencil]').click();
   });
 
   it('remove, and add chart flow', () => {
-    // wait for box plot to appear
-    cy.get('.grid-container .box_plot');
-
-    cy.get('.fa.fa-trash')
-      .last()
+    // wait for world map to appear
+    cy.wait('@worldMap');
+    cy.get('.world_map', { timeout: 60000 })

Review comment:
       @graceguo-supercat I agree, I don't think the `box_plot` is the issue. Apologies for the confusion, I posted this to test the ci while working out CSRF on Cypress and docker together locally. Will update this test here in a bit. 




----------------------------------------------------------------
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] [incubator-superset] eschutho closed pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho closed pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962


   


----------------------------------------------------------------
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] [incubator-superset] eschutho commented on a change in pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho commented on a change in pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#discussion_r492261696



##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_mode.test.js
##########
@@ -23,34 +23,35 @@ describe('Dashboard edit mode', () => {
     cy.server();
     cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
+    cy.route('POST', '/superset/explore_json/*?dashboard_id=1').as('worldMap');
     cy.get('.dashboard-header [data-test=pencil]').click();
   });
 
   it('remove, and add chart flow', () => {
-    // wait for box plot to appear
-    cy.get('.grid-container .box_plot');
-
-    cy.get('.fa.fa-trash')
-      .last()
+    // wait for world map to appear
+    cy.wait('@worldMap');
+    cy.get('.world_map', { timeout: 60000 })

Review comment:
       @graceguo-supercat I agree, I don't think the `box_plot` is the issue. Apologies for the confusion, I posted this to test the ci while working out CSRF on Cypress and docker together locally. Will update this test here in a bit. 




----------------------------------------------------------------
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] [incubator-superset] ktmud commented on a change in pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#discussion_r491200836



##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_mode.test.js
##########
@@ -23,34 +23,35 @@ describe('Dashboard edit mode', () => {
     cy.server();
     cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
+    cy.route('POST', '/superset/explore_json/*?dashboard_id=1').as('worldMap');
     cy.get('.dashboard-header [data-test=pencil]').click();
   });
 
   it('remove, and add chart flow', () => {
-    // wait for box plot to appear
-    cy.get('.grid-container .box_plot');
-
-    cy.get('.fa.fa-trash')
-      .last()
+    // wait for world map to appear
+    cy.wait('@worldMap');
+    cy.get('.world_map', { timeout: 60000 })

Review comment:
       Why wait 1 minute? If I'm understanding Cypress right, after you waited for the API requests, the additional wait time is only about UI render time. No matter how long you wait, the element may still be undiscoverable to Cypress if something is broken.




----------------------------------------------------------------
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] [incubator-superset] eschutho closed pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
eschutho closed pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962


   


----------------------------------------------------------------
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] [incubator-superset] codecov-commenter commented on pull request #10962: fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#issuecomment-695080859


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10962?src=pr&el=h1) Report
   > Merging [#10962](https://codecov.io/gh/apache/incubator-superset/pull/10962?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/d6be977d1b84344db6ad00bb2de2b51095226595?el=desc) will **increase** coverage by `0.56%`.
   > The diff coverage is `74.41%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10962/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10962?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10962      +/-   ##
   ==========================================
   + Coverage   59.84%   60.40%   +0.56%     
   ==========================================
     Files         781      382     -399     
     Lines       37209    24127   -13082     
     Branches     3346        0    -3346     
   ==========================================
   - Hits        22266    14575    -7691     
   + Misses      14763     9552    -5211     
   + Partials      180        0     -180     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #python | `60.40% <74.41%> (-1.07%)` | :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/incubator-superset/pull/10962?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.42% <ø> (ø)` | |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `85.86% <0.00%> (-1.64%)` | :arrow_down: |
   | [superset/jinja\_context.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvamluamFfY29udGV4dC5weQ==) | `80.00% <73.33%> (-0.96%)` | :arrow_down: |
   | [superset/models/helpers.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2hlbHBlcnMucHk=) | `87.27% <75.00%> (-1.93%)` | :arrow_down: |
   | [superset/common/query\_context.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X2NvbnRleHQucHk=) | `86.70% <100.00%> (-0.64%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `31.91% <0.00%> (-59.58%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `59.64% <0.00%> (-22.81%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.16% <0.00%> (-12.50%)` | :arrow_down: |
   | ... and [409 more](https://codecov.io/gh/apache/incubator-superset/pull/10962/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10962?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/incubator-superset/pull/10962?src=pr&el=footer). Last update [4a4fdb1...7aaed96](https://codecov.io/gh/apache/incubator-superset/pull/10962?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] [incubator-superset] graceguo-supercat commented on a change in pull request #10962: [WIP] fix: cypress dashboard edit mode test

Posted by GitBox <gi...@apache.org>.
graceguo-supercat commented on a change in pull request #10962:
URL: https://github.com/apache/incubator-superset/pull/10962#discussion_r491220432



##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/edit_mode.test.js
##########
@@ -23,34 +23,35 @@ describe('Dashboard edit mode', () => {
     cy.server();
     cy.login();
     cy.visit(WORLD_HEALTH_DASHBOARD);
+    cy.route('POST', '/superset/explore_json/*?dashboard_id=1').as('worldMap');
     cy.get('.dashboard-header [data-test=pencil]').click();
   });
 
   it('remove, and add chart flow', () => {
-    // wait for box plot to appear
-    cy.get('.grid-container .box_plot');
-
-    cy.get('.fa.fa-trash')
-      .last()
+    // wait for world map to appear
+    cy.wait('@worldMap');
+    cy.get('.world_map', { timeout: 60000 })

Review comment:
       I do not think the flaky problem is caused by `box_plot` chart




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