refactoring
This commit is contained in:
parent
b3b4fcc933
commit
7cd099c3e4
2 changed files with 5 additions and 5 deletions
|
@ -195,7 +195,7 @@ const Messages: React.FC<Props> = ({
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isFetched) {
|
if (!isFetched) {
|
||||||
return <PageLoader isFullHeight={false} />;
|
return <PageLoader />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -8,17 +8,17 @@ describe('MetricsWrapper', () => {
|
||||||
const component = shallow(
|
const component = shallow(
|
||||||
<MetricsWrapper wrapperClassName={className} multiline />
|
<MetricsWrapper wrapperClassName={className} multiline />
|
||||||
);
|
);
|
||||||
expect(component.find(`.${className}`).exists()).toBeTruthy();
|
expect(component.exists(`.${className}`)).toBeTruthy();
|
||||||
expect(component.find('.level-multiline').exists()).toBeTruthy();
|
expect(component.exists('.level-multiline')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('correctly renders children', () => {
|
it('correctly renders children', () => {
|
||||||
let component = shallow(<MetricsWrapper />);
|
let component = shallow(<MetricsWrapper />);
|
||||||
expect(component.find('.subtitle').exists()).toBeFalsy();
|
expect(component.exists('.subtitle')).toBeFalsy();
|
||||||
|
|
||||||
const title = 'title';
|
const title = 'title';
|
||||||
component = shallow(<MetricsWrapper title={title} />);
|
component = shallow(<MetricsWrapper title={title} />);
|
||||||
expect(component.find('.subtitle').exists()).toBeTruthy();
|
expect(component.exists('.subtitle')).toBeTruthy();
|
||||||
expect(component.text()).toEqual(title);
|
expect(component.text()).toEqual(title);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue