Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Merge f12c7ea into d72e2f7
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyun1010 committed Apr 26, 2019
2 parents d72e2f7 + f12c7ea commit d41b354
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 119 deletions.
43 changes: 39 additions & 4 deletions __test__/MarkerGeneHeatmap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ describe(`MarkerGeneHeatmap`, () => {
{
x: 0,
y: 0,
name: `foo`,
geneName: `foo`,
value: 13,
clusterIdWhereMarker: 1
},
{
x: 1,
y: 1,
name: `bar`,
geneName: `bar`,
value: 2,
clusterIdWhereMarker: 2
},
{
x: 2,
y: 2,
name: `foobar`,
geneName: `foobar`,
value: 1,
clusterIdWhereMarker: 3
}
Expand All @@ -52,7 +52,7 @@ describe(`MarkerGeneHeatmap`, () => {
{
x: 0,
y: 0,
name: `foo`,
geneName: `foo`,
value: 13,
clusterIdWhereMarker: 1
}
Expand All @@ -68,4 +68,39 @@ describe(`MarkerGeneHeatmap`, () => {

expect(chartOptions.yAxis[0].plotLines).toHaveLength(0)
})

test(`does have data export options`, () => {
const wrapper = shallow(<MarkerGeneHeatmap
data={[
{
x: 0,
y: 0,
geneName: `foo`,
value: 13,
clusterIdWhereMarker: 1
}
]}
xAxisCategories={[`1`, `2`, `3`]}
yAxisCategories={[`a`, `b`, `c`]}
chartHeight={200}
isDataFiltered={true}
heatmapRowHeight={20}
hasDynamicHeight={false} />)

const chartOptions = wrapper.find(`t`).props().options

expect(chartOptions.exporting.buttons.contextButton.menuItems).toEqual(
[
'printChart',
'separator',
'downloadPNG',
'downloadJPEG',
'downloadPDF',
'downloadSVG',
'separator',
'downloadCSV',
'downloadXLS'
]
)
})
})

0 comments on commit d41b354

Please sign in to comment.