[Improvement] Progress: pivot shouldn't cross border (#1135)

This commit is contained in:
neverland
2018-05-22 20:13:19 +08:00
committed by GitHub
parent 88b142a048
commit 7f10d99d3d
5 changed files with 69 additions and 12 deletions

View File

@@ -0,0 +1,16 @@
import Progress from '../';
import { mount } from '@vue/test-utils';
test('calc width', () => {
const wrapper = mount(Progress, {
propsData: {
showPivot: false,
percentage: 100
}
});
expect(wrapper.html()).toMatchSnapshot();
wrapper.vm.showPivot = true;
wrapper.vm.pivotText = 'test';
expect(wrapper.html()).toMatchSnapshot();
});