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:
Yongjie Zhao
2021-07-20 10:59:59 +01:00
committed by GitHub
parent 9ff2531cd0
commit 3b7441663c
2 changed files with 65 additions and 13 deletions

View File

@@ -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');