mirror of
https://github.com/apache/superset.git
synced 2026-06-02 22:29:26 +00:00
feat(Matrixify): add matrixify tag to list view and explore (#37247)
This commit is contained in:
committed by
GitHub
parent
2900258e05
commit
c0cbbe393a
@@ -383,6 +383,34 @@ describe('ExploreChartHeader', () => {
|
||||
|
||||
expect(setShowModal).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
test('renders Matrixify tag when matrixify is enabled', async () => {
|
||||
const props = createProps({
|
||||
formData: {
|
||||
...createProps().chart.latestQueryFormData,
|
||||
matrixify_enable_vertical_layout: true,
|
||||
matrixify_mode_rows: 'metrics',
|
||||
matrixify_rows: [{ label: 'COUNT(*)', expressionType: 'SIMPLE' }],
|
||||
},
|
||||
});
|
||||
render(<ExploreHeader {...props} />, { useRedux: true });
|
||||
|
||||
const matrixifyTag = await screen.findByText('Matrixify');
|
||||
expect(matrixifyTag).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('does not render Matrixify tag when matrixify is disabled', async () => {
|
||||
const props = createProps({
|
||||
formData: {
|
||||
...createProps().chart.latestQueryFormData,
|
||||
},
|
||||
});
|
||||
render(<ExploreHeader {...props} />, { useRedux: true });
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.queryByText('Matrixify')).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
|
||||
|
||||
Reference in New Issue
Block a user