mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 18:20:20 -06:00
102e0a9839
- Remove the SCSS dependency completely and use MUI for theming. - Update - date-fns, @date-io, notistack. Remove - popper.js, sass-loader. - Cleanup webpack config. - Port PSQL tool to use MUI themes instead of SCSS theme. - Theme change will reflect realtime without refreshing pgAdmin.
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
//////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
//
|
|
// Copyright (C) 2013 - 2024, The pgAdmin Development Team
|
|
// This software is released under the PostgreSQL Licence
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
import React from 'react';
|
|
import QuickSearch from '../../../pgadmin/static/js/QuickSearch';
|
|
import { render } from '@testing-library/react';
|
|
import Theme from '../../../pgadmin/static/js/Theme';
|
|
|
|
let ctrl;
|
|
|
|
describe('quick search test cases', function () {
|
|
beforeEach(() => {
|
|
ctrl = render(
|
|
<Theme>
|
|
<QuickSearch />
|
|
</Theme>
|
|
);
|
|
});
|
|
|
|
it('should have rendered quick-search-container', () => {
|
|
expect(ctrl.container.firstChild.id).toEqual('quick-search-container');
|
|
});
|
|
|
|
it('should have 2 childs in quick-search-container', () => {
|
|
expect(ctrl.container.firstChild.childNodes.length).toEqual(2);
|
|
});
|
|
|
|
it('element should be html element', () => {
|
|
expect(ctrl.container.querySelector('#live-search-field')).not.toBeNull();
|
|
});
|
|
|
|
});
|