superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] eschutho commented on a change in pull request #10973: chore: cypress selectors refactor in explore module
Date Wed, 30 Sep 2020 18:10:13 GMT

eschutho commented on a change in pull request #10973:
URL: https://github.com/apache/incubator-superset/pull/10973#discussion_r497705951



##########
File path: superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
##########
@@ -70,12 +72,16 @@ describe('AdhocMetrics', () => {
     cy.get('[data-test=metrics]').find('.option-label').last().click();
 
     // add custom SQL
-    cy.get('#adhoc-metric-edit-tabs-tab-SQL').click();
-    cy.get('#metrics-edit-popover').find('.ace_content').click();
-    cy.get('#metrics-edit-popover')
+    cy.get('[data-test="adhoc-metric-edit-tabs"]')
+      .contains('Custom SQL')
+      .click();
+    cy.get('[data-test="metrics-edit-popover"]')
       .find('.ace_text-input')
       .type('/COUNT(DISTINCT name)', { force: true });
-    cy.get('#metrics-edit-popover').find('button').contains('Save').click();
+    cy.get('[data-test="metrics-edit-popover"]')
+      .find('[data-test="AdhocMetricEdit#save"]')
+      .contains('Save')

Review comment:
       do we still need the lookups by text if we're using the data-test attributes?




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


Mime
View raw message