mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
feat(theming): land Ant Design v5 overhaul — dynamic themes, real dark mode + massive styling refactor (#31590)
Co-authored-by: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com> Co-authored-by: Diego Pucci <diegopucci.me@gmail.com> Co-authored-by: Mehmet Salih Yavuz <salih.yavuz@proton.me> Co-authored-by: Geido <60598000+geido@users.noreply.github.com> Co-authored-by: Alexandru Soare <37236580+alexandrusoare@users.noreply.github.com> Co-authored-by: Damian Pendrak <dpendrak@gmail.com> Co-authored-by: Pius Iniobong <67148161+payose@users.noreply.github.com> Co-authored-by: Enzo Martellucci <enzomartellucci@gmail.com> Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2cc1ef88c8
commit
dd129fa403
@@ -17,8 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import '@testing-library/jest-dom';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { ThemeProvider, supersetTheme } from '@superset-ui/core';
|
||||
import { render, screen } from '@superset-ui/core/spec';
|
||||
import TableChart from '../src/TableChart';
|
||||
import transformProps from '../src/transformProps';
|
||||
import DateWithFormatter from '../src/utils/DateWithFormatter';
|
||||
@@ -268,9 +267,7 @@ describe('plugin-chart-table', () => {
|
||||
describe('TableChart', () => {
|
||||
it('render basic data', () => {
|
||||
render(
|
||||
<ThemeProvider theme={supersetTheme}>
|
||||
<TableChart {...transformProps(testData.basic)} sticky={false} />,
|
||||
</ThemeProvider>,
|
||||
<TableChart {...transformProps(testData.basic)} sticky={false} />,
|
||||
);
|
||||
|
||||
const firstDataRow = screen.getAllByRole('rowgroup')[1];
|
||||
@@ -289,10 +286,10 @@ describe('plugin-chart-table', () => {
|
||||
|
||||
it('render advanced data', () => {
|
||||
render(
|
||||
<ThemeProvider theme={supersetTheme}>
|
||||
<>
|
||||
<TableChart {...transformProps(testData.advanced)} sticky={false} />
|
||||
,
|
||||
</ThemeProvider>,
|
||||
</>,
|
||||
);
|
||||
const secondColumnHeader = screen.getByText('Sum of Num');
|
||||
expect(secondColumnHeader).toBeInTheDocument();
|
||||
@@ -413,9 +410,7 @@ describe('plugin-chart-table', () => {
|
||||
|
||||
it('render empty data', () => {
|
||||
render(
|
||||
<ThemeProvider theme={supersetTheme}>
|
||||
<TableChart {...transformProps(testData.empty)} sticky={false} />,
|
||||
</ThemeProvider>,
|
||||
<TableChart {...transformProps(testData.empty)} sticky={false} />,
|
||||
);
|
||||
expect(screen.getByText('No records found')).toBeInTheDocument();
|
||||
});
|
||||
@@ -491,14 +486,10 @@ describe('plugin-chart-table', () => {
|
||||
);
|
||||
expect(getComputedStyle(screen.getByText('N/A')).background).toBe('');
|
||||
});
|
||||
it('should display originalLabel in grouped headers', () => {
|
||||
it('should display original label in grouped headers', () => {
|
||||
const props = transformProps(testData.comparison);
|
||||
|
||||
render(
|
||||
<ThemeProvider theme={supersetTheme}>
|
||||
<TableChart {...props} sticky={false} />
|
||||
</ThemeProvider>,
|
||||
);
|
||||
render(<TableChart {...props} sticky={false} />);
|
||||
const groupHeaders = screen.getAllByRole('columnheader');
|
||||
expect(groupHeaders.length).toBeGreaterThan(0);
|
||||
const hasMetricHeaders = groupHeaders.some(
|
||||
|
||||
Reference in New Issue
Block a user