mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
36 lines
1007 B
JavaScript
36 lines
1007 B
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';
|
|
|
|
let ctrl;
|
|
|
|
describe('quick search test cases', function () {
|
|
beforeEach(() => {
|
|
ctrl = render(
|
|
<QuickSearch />
|
|
);
|
|
});
|
|
|
|
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();
|
|
});
|
|
|
|
});
|