test(NavBar): update test cases

This commit is contained in:
chenjiahan
2020-11-14 07:06:21 +08:00
parent 2b34fac38d
commit 98c553de29
18 changed files with 82 additions and 73 deletions
@@ -7,7 +7,7 @@ exports[`should allow to custom close icon with closeIcon prop 1`] = `
<!----></i>
`;
exports[`should render default slot and match snapshot 1`] = `
exports[`should render default slot correctly 1`] = `
<transition-stub>
<div class="van-overlay">
<!---->
@@ -28,11 +28,11 @@ exports[`should render default slot and match snapshot 1`] = `
</transition-stub>
`;
exports[`should render description and match snapshot 1`] = `<div class="van-action-sheet__description">This is a description</div>`;
exports[`should render description correctly 1`] = `<div class="van-action-sheet__description">This is a description</div>`;
exports[`should render description slot when match snapshot 1`] = `<div class="van-action-sheet__description">Custom Description</div>`;
exports[`should render subname and match snapshot 1`] = `
exports[`should render subname correctly 1`] = `
<button type="button" class="van-action-sheet__item"><span class="van-action-sheet__name">Option</span>
<div class="van-action-sheet__subname">Subname</div></button>
`;
+3 -3
View File
@@ -64,7 +64,7 @@ test('should emit cancel event after clicking cancel button', () => {
expect(wrapper.emitted('cancel').length).toEqual(1);
});
test('should render subname and match snapshot', () => {
test('should render subname correctly', () => {
const wrapper = mount(ActionSheet, {
props: {
show: true,
@@ -84,7 +84,7 @@ test('should render content after disabling the lazy-render prop', async () => {
expect(wrapper.find('.van-action-sheet__content').exists()).toBeTruthy();
});
test('should render default slot and match snapshot', () => {
test('should render default slot correctly', () => {
const wrapper = mount(ActionSheet, {
props: {
show: true,
@@ -160,7 +160,7 @@ test('should allow to custom close icon with closeIcon prop', () => {
expect(wrapper.find('.van-action-sheet__close').html()).toMatchSnapshot();
});
test('should render description and match snapshot', () => {
test('should render description correctly', () => {
const wrapper = mount(ActionSheet, {
props: {
show: true,