villebro commented on a change in pull request #11199:
URL: 
https://github.com/apache/incubator-superset/pull/11199#discussion_r509999737



##########
File path: 
superset-frontend/cypress-base/cypress/integration/dashboard/load.test.js
##########
@@ -30,18 +32,26 @@ describe('Dashboard load', () => {
 
     cy.get('#app').then(data => {
       const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
-      const { slices } = bootstrapData.dashboard_data;
-      // then define routes and create alias for each requests
-      slices.forEach(slice => {
-        const alias = `getJson_${slice.slice_id}`;
-        const formData = `{"slice_id":${slice.slice_id}}`;
-        cy.route('POST', `/superset/explore_json/?*${formData}*`).as(alias);
-        aliases.push(`@${alias}`);
-      });
+      dashboard = bootstrapData.dashboard_data;
     });
   });
 
-  it('should load dashboard', () => {
+  xit('should load dashboard', () => {
+    const { slices } = dashboard;
+
+    // then define routes and create alias for each requests
+    slices.forEach(slice => {
+      const vizType = slice.form_data.viz_type;
+      const isLegacy = isLegacyChart(vizType);
+      const alias = `getJson_${slice.slice_id}_${vizType}_${isLegacy}`;
+      const formData = `{"slice_id":${slice.slice_id}}`;
+      const route = isLegacy
+        ? `/superset/explore_json/?*${formData}*`
+        : `/api/v1/chart/data?dashboard_id=${dashboard.id}`;
+      cy.route('POST', `${route}`).as(alias);
+      aliases.push(`@${alias}`);
+    });
+

Review comment:
       For some reason this test started flaking out on the legacy plugins, 
despite those being unchanged. Although I `xit`ed this test, I updated it in a 
way which IMO should work.




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