From commits-return-1672-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Mon Oct 15 21:52:14 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7B1021807A6 for ; Mon, 15 Oct 2018 21:52:12 +0200 (CEST) Received: (qmail 44109 invoked by uid 500); 15 Oct 2018 19:52:11 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 44004 invoked by uid 99); 15 Oct 2018 19:52:11 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2018 19:52:11 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id B6E5682C26; Mon, 15 Oct 2018 19:52:10 +0000 (UTC) Date: Mon, 15 Oct 2018 19:52:19 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] 10/13: [cypress] fix tests from rebase MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: ccwilliams@apache.org In-Reply-To: <153963312961.26155.11736443246480780967@gitbox.apache.org> References: <153963312961.26155.11736443246480780967@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/chris--ajax-charts X-Git-Reftype: branch X-Git-Rev: dab175c02bb2b9ed5cbdc79bedac7966bcc2b095 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20181015195210.B6E5682C26@gitbox.apache.org> 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 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); }); });