mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
feat: add warning metadata to tables and metrics (#13606)
This commit is contained in:
@@ -72,6 +72,7 @@ describe('datasourcepanel', () => {
|
||||
expect(screen.getByText('birth_names')).toBeTruthy();
|
||||
expect(screen.getByText('Columns')).toBeTruthy();
|
||||
expect(screen.getByText('Metrics')).toBeTruthy();
|
||||
expect(screen.queryByTestId('warning')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should render search results', () => {
|
||||
@@ -103,4 +104,24 @@ describe('datasourcepanel', () => {
|
||||
expect(c[0].value).toBe('metric_end_certified');
|
||||
}, 201);
|
||||
});
|
||||
|
||||
it('should render a warning', () => {
|
||||
const deprecatedDatasource = {
|
||||
...datasource,
|
||||
extra: JSON.stringify({ warning_markdown: 'This is a warning.' }),
|
||||
};
|
||||
render(
|
||||
setup({
|
||||
...props,
|
||||
datasource: deprecatedDatasource,
|
||||
controls: {
|
||||
datasource: {
|
||||
...props.controls.datasource,
|
||||
datasource: deprecatedDatasource,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
expect(screen.getByTestId('alert-solid')).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user