feat(Matrixify): add matrixify tag to list view and explore (#37247)

This commit is contained in:
Mehmet Salih Yavuz
2026-01-19 17:47:20 +03:00
committed by GitHub
parent 2900258e05
commit c0cbbe393a
5 changed files with 99 additions and 6 deletions

View File

@@ -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