mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-26 08:16:44 -06:00
24 lines
671 B
JavaScript
24 lines
671 B
JavaScript
import jasmineEnzyme from 'jasmine-enzyme';
|
|
import React from 'react';
|
|
import {shallow} from 'enzyme';
|
|
import '../../helper/enzyme.helper';
|
|
|
|
import Loader from 'pgadmin.tools.erd/erd_tool/ui_components/Loader';
|
|
|
|
describe('ERD Loader', ()=>{
|
|
beforeEach(()=>{
|
|
jasmineEnzyme();
|
|
});
|
|
|
|
it('<Loader /> comp', ()=>{
|
|
let loaderComp = shallow(<Loader />);
|
|
expect(loaderComp.isEmptyRender()).toBeTruthy();
|
|
|
|
loaderComp.setProps({message: 'test message'});
|
|
expect(loaderComp.find('.pg-sp-text').text()).toBe('test message');
|
|
|
|
loaderComp.setProps({autoEllipsis: true});
|
|
expect(loaderComp.find('.pg-sp-text').text()).toBe('test message...');
|
|
});
|
|
});
|