[new feature] SubmitBar: add decimal-length prop (#3151)
This commit is contained in:
@@ -6,7 +6,7 @@ test('submit', () => {
|
||||
const wrapper = mount(SubmitBar, {
|
||||
context: {
|
||||
props: {
|
||||
price: 0.01
|
||||
price: 1
|
||||
},
|
||||
on: { submit }
|
||||
}
|
||||
@@ -22,7 +22,7 @@ test('disable submit', () => {
|
||||
const wrapper = mount(SubmitBar, {
|
||||
context: {
|
||||
props: {
|
||||
price: 0.01,
|
||||
price: 1,
|
||||
disabled: true
|
||||
},
|
||||
on: { submit }
|
||||
@@ -36,3 +36,16 @@ test('disable submit', () => {
|
||||
button.trigger('click');
|
||||
expect(submit).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
test('decimal length', () => {
|
||||
const wrapper = mount(SubmitBar, {
|
||||
context: {
|
||||
props: {
|
||||
price: 111,
|
||||
decimalLength: 1
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user