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 21:34:49 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #10962: [WIP] fix: cypress dashboard edit mode test

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