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 dab175c02bb2b9ed5cbdc79bedac7966bcc2b095 Author: Chris Williams <[email protected]> AuthorDate: Wed Sep 19 11:07:05 2018 -0700 [cypress] fix tests from rebase --- .../cypress/integration/explore/visualizations/table.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/superset/assets/cypress/integration/explore/visualizations/table.js b/superset/assets/cypress/integration/explore/visualizations/table.js index 92aabb6..0f70106 100644 --- a/superset/assets/cypress/integration/explore/visualizations/table.js +++ b/superset/assets/cypress/integration/explore/visualizations/table.js @@ -1,4 +1,5 @@ import { FORM_DATA_DEFAULTS, NUM_METRIC, SIMPLE_FILTER } from './shared.helper'; +import readResponseBlob from '../../../utils/readResponseBlob'; // Table @@ -59,10 +60,11 @@ export default () => describe('Table chart', () => { cy.visitChartByParams(JSON.stringify(formData)); - cy.wait('@getJson').then((data) => { - cy.verifyResponseCodes(data); + cy.wait('@getJson').then(async (xhr) => { + cy.verifyResponseCodes(xhr); cy.verifySliceContainer('table'); - expect(data.response.body.data.records.length).to.eq(limit); + const responseBody = await readResponseBlob(xhr.response.body); + expect(responseBody.data.records.length).to.eq(limit); }); }); @@ -85,10 +87,11 @@ export default () => describe('Table chart', () => { }; cy.visitChartByParams(JSON.stringify(formData)); - cy.wait('@getJson').then((data) => { - cy.verifyResponseCodes(data); + cy.wait('@getJson').then(async (xhr) => { + cy.verifyResponseCodes(xhr); cy.verifySliceContainer('table'); - const records = data.response.body.data.records; + const responseBody = await readResponseBlob(xhr.response.body); + const { records } = responseBody.data; expect(records[0].num).greaterThan(records[records.length - 1].num); }); });
