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/12/22 02:44:23 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #12151: test(dashboard): fix flaky Cypress test

ktmud commented on a change in pull request #12151:
URL: https://github.com/apache/incubator-superset/pull/12151#discussion_r547035933



##########
File path: superset-frontend/cypress-base/cypress/integration/dashboard/filter.test.ts
##########
@@ -80,9 +82,8 @@ describe('Dashboard filter', () => {
     cy.get('.Select__menu').first().contains('South Asia').click();
 
     // should still have all filter indicators
-    // and since the select is closed, all filter indicators should be visible
     cy.get('svg[data-test="filter"]:visible').should(nodes => {
-      expect(nodes).to.have.length(10);
+      expect(nodes.length).to.least(9);

Review comment:
       <img src="https://user-images.githubusercontent.com/335541/102842559-19c22a80-43bc-11eb-981a-cc283920d88d.png" width="400">
   
   Oh, so it looks the filter indicator expander also has `data-test="filter"`. The test updated it to `10` because `DASHBOARD_NATIVE_FILTERS` is flag is turned on in test config. But obviously this test would fail when the feature flag is disabled.
   
   I think this PR still helps by making the test more lenient. @suddjian wdyt?




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