2019-01-12 03:33:27 +00:00
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import { Col, Row } from '..';
|
2020-03-07 11:45:13 +00:00
|
|
|
import mountTest from '../../../tests/shared/mountTest';
|
2018-05-19 09:50:22 +00:00
|
|
|
|
|
|
|
describe('Grid', () => {
|
2020-03-07 11:45:13 +00:00
|
|
|
mountTest(Row);
|
|
|
|
mountTest(Col);
|
2018-05-19 09:50:22 +00:00
|
|
|
it('should render Col', () => {
|
|
|
|
const wrapper = mount(Col, {
|
|
|
|
propsData: {
|
|
|
|
span: 2,
|
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
});
|
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
|
|
});
|
2018-05-19 09:50:22 +00:00
|
|
|
it('should render Row', () => {
|
2019-01-12 03:33:27 +00:00
|
|
|
const wrapper = mount(Row);
|
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
|
|
});
|
2018-12-09 02:58:50 +00:00
|
|
|
|
|
|
|
it('renders wrapped Col correctly', () => {
|
|
|
|
const wrapper = mount({
|
2019-01-12 03:33:27 +00:00
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Row gutter={20}>
|
|
|
|
<div>
|
2019-09-10 13:54:22 +00:00
|
|
|
<Col span={12} />
|
2019-01-12 03:33:27 +00:00
|
|
|
</div>
|
2019-09-10 13:54:22 +00:00
|
|
|
<Col span={12} />
|
2019-01-12 03:33:27 +00:00
|
|
|
</Row>
|
|
|
|
);
|
2018-12-09 02:58:50 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
});
|
|
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|