pgadmin4/web/regression/javascript/erd/ui_components/loader_spec.js
2021-01-18 17:14:19 +05:30

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...');
});
});