forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apache#7 from graceguo-supercat/gg-CherryPickFixJS…
…Error Cherrypick a few fixes
- Loading branch information
Showing
14 changed files
with
269 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
superset/assets/spec/javascripts/explore/components/ExploreChartHeader_spec.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import ExploreChartHeader from '../../../../javascripts/explore/components/ExploreChartHeader'; | ||
import ExploreActionButtons from '../../../../javascripts/explore/components/ExploreActionButtons'; | ||
import EditableTitle from '../../../../javascripts/components/EditableTitle'; | ||
|
||
const mockProps = { | ||
actions: {}, | ||
can_overwrite: true, | ||
can_download: true, | ||
isStarred: true, | ||
slice: {}, | ||
table_name: 'foo', | ||
form_data: {}, | ||
timeout: 1000, | ||
chart: { | ||
queryResponse: {}, | ||
}, | ||
}; | ||
|
||
describe('ExploreChartHeader', () => { | ||
let wrapper; | ||
beforeEach(() => { | ||
wrapper = shallow(<ExploreChartHeader {...mockProps} />); | ||
}); | ||
|
||
it('is valid', () => { | ||
expect( | ||
React.isValidElement(<ExploreChartHeader {...mockProps} />), | ||
).to.equal(true); | ||
}); | ||
|
||
it('renders', () => { | ||
expect(wrapper.find(EditableTitle)).to.have.lengthOf(1); | ||
expect(wrapper.find(ExploreActionButtons)).to.have.lengthOf(1); | ||
}); | ||
}); |
Oops, something went wrong.