From commits-return-583-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Feb 2 19:28:43 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 2214E180608 for ; Fri, 2 Feb 2018 19:28:43 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 10F69160C49; Fri, 2 Feb 2018 18:28:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5A044160C25 for ; Fri, 2 Feb 2018 19:28:42 +0100 (CET) Received: (qmail 92270 invoked by uid 500); 2 Feb 2018 18:28:41 -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 92261 invoked by uid 99); 2 Feb 2018 18:28:41 -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; Fri, 02 Feb 2018 18:28:41 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id DD85A859BE; Fri, 2 Feb 2018 18:28:40 +0000 (UTC) Date: Fri, 02 Feb 2018 18:28:40 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: [explore] fix missing CacheLabel (#4326) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151759612075.18450.5593840692279152748@gitbox.apache.org> From: graceguo@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 75a2b4f610af757560e758fe557d5ea380d48887 X-Git-Newrev: 1f8fccc0f923de0b119b22303e504e9efeeff417 X-Git-Rev: 1f8fccc0f923de0b119b22303e504e9efeeff417 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. graceguo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/master by this push: new 1f8fccc [explore] fix missing CacheLabel (#4326) 1f8fccc is described below commit 1f8fccc0f923de0b119b22303e504e9efeeff417 Author: Maxime Beauchemin AuthorDate: Fri Feb 2 10:28:38 2018 -0800 [explore] fix missing CacheLabel (#4326) Also adding a basic unit test. --- .../explore/components/ExploreChartHeader.jsx | 21 +++++------- .../explore/components/ExploreChartHeader_spec.jsx | 40 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/superset/assets/javascripts/explore/components/ExploreChartHeader.jsx b/superset/assets/javascripts/explore/components/ExploreChartHeader.jsx index 30b4799..0faf164 100644 --- a/superset/assets/javascripts/explore/components/ExploreChartHeader.jsx +++ b/superset/assets/javascripts/explore/components/ExploreChartHeader.jsx @@ -74,7 +74,7 @@ class ExploreChartHeader extends React.PureComponent { json_endpoint: getExploreUrl(formData, 'json'), standalone_endpoint: getExploreUrl(formData, 'standalone'), }; - + const chartSucceeded = ['success', 'rendered'].indexOf(this.props.chart.chartStatus) > 0; return (
}
- {this.props.chart.chartStatus === 'success' && queryResponse && + {chartSucceeded && queryResponse && - } - {this.props.chart.chartStatus === 'success' && - queryResponse && - queryResponse.is_cached && - - - } + />} + {chartSucceeded && queryResponse && queryResponse.is_cached && + } { + let wrapper; + beforeEach(() => { + wrapper = shallow(); + }); + + it('is valid', () => { + expect( + React.isValidElement(), + ).to.equal(true); + }); + + it('renders', () => { + expect(wrapper.find(EditableTitle)).to.have.lengthOf(1); + expect(wrapper.find(ExploreActionButtons)).to.have.lengthOf(1); + }); +}); -- To stop receiving notification emails like this one, please contact graceguo@apache.org.