superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccwilli...@apache.org
Subject [incubator-superset] 13/13: [cypress][dashboard][fetch] fix filter test for fetch
Date Mon, 15 Oct 2018 19:52:22 GMT
This is an automated email from the ASF dual-hosted git repository.

ccwilliams pushed a commit to branch chris--ajax-charts
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit da7d5f1d715023be98ee8dc36fc55aecfa014c79
Author: Chris Williams <chris.williams@airbnb.com>
AuthorDate: Mon Oct 15 12:51:53 2018 -0700

    [cypress][dashboard][fetch] fix filter test for fetch
---
 superset/assets/cypress/integration/dashboard/filter.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/superset/assets/cypress/integration/dashboard/filter.js b/superset/assets/cypress/integration/dashboard/filter.js
index fe236db..e0e65d8 100644
--- a/superset/assets/cypress/integration/dashboard/filter.js
+++ b/superset/assets/cypress/integration/dashboard/filter.js
@@ -40,11 +40,11 @@ export default () => describe('dashboard filter', () => {
       .type('South Asia{enter}', { force: true });
 
     cy.wait(aliases).then((requests) => {
-      requests.forEach((request) => {
-        const requestBody = request.request.body.substring('form_data='.length);
-        const requestParams = JSON.parse(decodeURIComponent(requestBody));
+      requests.forEach((xhr) => {
+        const requestFormData = xhr.request.body;
+        const requestParams = JSON.parse(requestFormData.get('form_data'));
         expect(requestParams.extra_filters[0])
-          .deep.eq({ col: 'region', op: 'in', val: ['South+Asia'] });
+          .deep.eq({ col: 'region', op: 'in', val: ['South Asia'] });
       });
     });
   });


Mime
View raw message