Merge branch '2.x' into dev
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`button slot 1`] = `
|
||||
<div class="van-submit-bar">
|
||||
<div class="van-submit-bar__bar">Custom button</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`button-color prop 1`] = `
|
||||
<div class="van-submit-bar">
|
||||
<div class="van-submit-bar__bar"><button class="van-button van-button--danger van-button--normal van-button--round van-submit-bar__button van-submit-bar__button--danger" style="color: rgb(255, 255, 255); background: red; border-color: red;">
|
||||
@@ -57,7 +63,7 @@ exports[`text-align prop 1`] = `
|
||||
`;
|
||||
|
||||
exports[`top slot 1`] = `
|
||||
<div class="van-submit-bar">top<div class="van-submit-bar__bar"><button class="van-button van-button--danger van-button--normal van-button--round van-submit-bar__button van-submit-bar__button--danger">
|
||||
<div class="van-submit-bar">Custom Top<div class="van-submit-bar__bar"><button class="van-button van-button--danger van-button--normal van-button--round van-submit-bar__button van-submit-bar__button--danger">
|
||||
<div class="van-button__content"></div>
|
||||
</button></div>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ test('without price', () => {
|
||||
test('top slot', () => {
|
||||
const wrapper = mount(SubmitBar, {
|
||||
scopedSlots: {
|
||||
top: () => 'top',
|
||||
top: () => 'Custom Top',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -119,3 +119,14 @@ test('button-color prop', () => {
|
||||
});
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('button slot', () => {
|
||||
const wrapper = mount(SubmitBar, {
|
||||
buttonText: 'text',
|
||||
scopedSlots: {
|
||||
button: () => 'Custom button',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user