mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-29 13:46:18 +01:00
feat: add plugin search functionality (#1007)
* feat: add plugin search functionality * Delete env/conda-meta/history File deleted * UI fix and 3 new translations * fix(PluginStoreDialog) can't select pages * fix(PluginStoreDialog) select pages fixed. Layout fixed * update test * fix(PluginStoreDialog) Fixed count pages --------- Co-authored-by: Marco Beretta <81851188+Berry-13@users.noreply.github.com>
This commit is contained in:
parent
bc7a079208
commit
4ac0c04e83
14 changed files with 122 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { render } from 'test/layout-test-utils';
|
||||
import { render, screen, fireEvent } from 'test/layout-test-utils';
|
||||
import PluginStoreDialog from '../PluginStoreDialog';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import * as mockDataProvider from 'librechat-data-provider';
|
||||
|
|
@ -202,3 +202,20 @@ test('allows the user to navigate between pages', async () => {
|
|||
expect(getByText('Wolfram')).toBeInTheDocument();
|
||||
expect(getByText('Plugin 1')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('allows the user to search for plugins', async () => {
|
||||
setup();
|
||||
|
||||
const searchInput = screen.getByPlaceholderText('Search plugins');
|
||||
fireEvent.change(searchInput, { target: { value: 'Google' } });
|
||||
|
||||
expect(screen.getByText('Google')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Wolfram')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('Plugin 1')).not.toBeInTheDocument();
|
||||
|
||||
fireEvent.change(searchInput, { target: { value: 'Plugin 1' } });
|
||||
|
||||
expect(screen.getByText('Plugin 1')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Google')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('Wolfram')).not.toBeInTheDocument();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue