diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js b/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js index 77cf0fb51949d..467a3dc3e6748 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/filter.js @@ -40,15 +40,9 @@ export default () => filterId = dashboard.slices.find( slice => slice.form_data.viz_type === 'filter_box', ).slice_id; - aliases = sliceIds.map(id => { - const alias = getAlias(id); - const url = `/superset/explore_json/?*{"slice_id":${id}}*`; - cy.route('POST', url).as(alias.slice(1)); - return alias; - }); // wait the initial page load requests - cy.wait(aliases); + cy.wait(10000); }); }); diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/load.js b/superset-frontend/cypress-base/cypress/integration/dashboard/load.js index 8b0e642f6e22a..3d87451304383 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/load.js +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/load.js @@ -21,8 +21,6 @@ import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper'; export default () => describe('load', () => { - const aliases = []; - beforeEach(() => { cy.server(); cy.login(); @@ -33,18 +31,12 @@ export default () => const bootstrapData = JSON.parse(data[0].dataset.bootstrap); const slices = bootstrapData.dashboard_data.slices; // 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}`); - }); }); }); it('should load dashboard', () => { // wait and verify one-by-one - cy.wait(aliases).then(requests => { + cy.wait(10000).then(requests => { return Promise.all( requests.map(async xhr => { expect(xhr.status).to.eq(200); diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/url_params.js b/superset-frontend/cypress-base/cypress/integration/dashboard/url_params.js index 54b74a6f7c8ab..17f939b4a605d 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/url_params.js +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/url_params.js @@ -39,17 +39,7 @@ export default () => }); it('should apply url params to slice requests', () => { - const aliases = []; - sliceIds.forEach(id => { - const alias = `getJson_${id}`; - aliases.push(`@${alias}`); - cy.route( - 'POST', - `/superset/explore_json/?form_data={"slice_id":${id}}&dashboard_id=${dashboardId}`, - ).as(alias); - }); - - cy.wait(aliases).then(requests => { + cy.wait(10000).then(requests => { requests.forEach(xhr => { const requestFormData = xhr.request.body; const requestParams = JSON.parse(requestFormData.get('form_data'));