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 2021/02/02 14:49:38 UTC

[GitHub] [superset] adam-stasiak commented on a change in pull request #12254: test: added cypress tests for #11864 and #11682

adam-stasiak commented on a change in pull request #12254:
URL: https://github.com/apache/superset/pull/12254#discussion_r568661412



##########
File path: superset-frontend/cypress-base/cypress/integration/explore/control.test.ts
##########
@@ -233,8 +233,158 @@ describe('Time range filter', () => {
       });
     cy.get('[data-test=cancel-button]').click();
   });
-});
+  it('Chosen custom time range parameters are applied after change', () => {
+    const formData = {
+      ...FORM_DATA_DEFAULTS,
+      metrics: [NUM_METRIC],
+      viz_type: 'line',
+      time_range: '100 years ago : now',
+    };
+
+    cy.visitChartByParams(JSON.stringify(formData));
+    cy.verifySliceSuccess({ waitAlias: '@postJson' });
+
+    cy.get('[data-test=time-range-trigger]')
+      .click()
+      .then($range => {
+        const firstRange = $range.text();

Review comment:
       I cannot access text from element without using then. I think in Cypress it is impossible.




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