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



##########
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:
       Also wondering if we need the `get`->`find` chain here, or if we can 
just `get` the specific element we want to test on, with a specific enough 
attribute




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to