mirror of
https://github.com/apache/superset.git
synced 2026-04-11 20:37:16 +00:00
chore: Add tags to the new viz gallery (#15734)
* chore: add tags to gallery * fix UT * fix lint * redesign tags filter * chore: change to Highly-used and fix some css * fix UT Co-authored-by: stephenLYZ <750188453@qq.com>
This commit is contained in:
@@ -50,6 +50,7 @@ describe('VizTypeControl', () => {
|
||||
new ChartMetadata({
|
||||
name: 'vis1',
|
||||
thumbnail: '',
|
||||
tags: ['Highly-used'],
|
||||
}),
|
||||
)
|
||||
.registerValue(
|
||||
@@ -57,6 +58,7 @@ describe('VizTypeControl', () => {
|
||||
new ChartMetadata({
|
||||
name: 'vis2',
|
||||
thumbnail: '',
|
||||
tags: ['foobar'],
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -79,11 +81,11 @@ describe('VizTypeControl', () => {
|
||||
});
|
||||
|
||||
it('filters images based on text input', async () => {
|
||||
const thumbnails = screen.getAllByTestId('viztype-selector-container');
|
||||
expect(thumbnails).toHaveLength(2);
|
||||
const thumbnails = screen.getByTestId('viztype-selector-container');
|
||||
expect(thumbnails).toBeInTheDocument();
|
||||
|
||||
const searchInput = screen.getByPlaceholderText('Search');
|
||||
userEvent.type(searchInput, '2');
|
||||
userEvent.type(searchInput, 'foo');
|
||||
await waitForEffects();
|
||||
|
||||
const thumbnail = screen.getByTestId('viztype-selector-container');
|
||||
|
||||
Reference in New Issue
Block a user