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
@@ -19,7 +19,7 @@ exports[`should change icon class prefix when using icon-prefix prop 1`] = `
</div>
`;
exports[`should render default slot and match snapshot 1`] = `
exports[`should render default slot correctly 1`] = `
<div class="van-cell">
<!---->
<!---->
@@ -29,7 +29,7 @@ exports[`should render default slot and match snapshot 1`] = `
</div>
`;
exports[`should render extra slot and match snapshot 1`] = `
exports[`should render extra slot correctly 1`] = `
<div class="van-cell">
<!---->
<!---->
@@ -37,7 +37,7 @@ exports[`should render extra slot and match snapshot 1`] = `
<!---->Custom Extra</div>
`;
exports[`should render icon slot and match snapshot 1`] = `
exports[`should render icon slot correctly 1`] = `
<div class="van-cell">Custom Icon
<!---->
<!---->
@@ -46,7 +46,7 @@ exports[`should render icon slot and match snapshot 1`] = `
</div>
`;
exports[`should render label slot and match snapshot 1`] = `
exports[`should render label slot correctly 1`] = `
<div class="van-cell">
<!---->
<div class="van-cell__title"><span>Title</span>
@@ -58,7 +58,7 @@ exports[`should render label slot and match snapshot 1`] = `
</div>
`;
exports[`should render title slot and match snapshot 1`] = `
exports[`should render title slot correctly 1`] = `
<div class="van-cell">
<!---->
<div class="van-cell__title">Custom Title
+5 -5
View File
@@ -1,7 +1,7 @@
import Cell from '..';
import { mount } from '@vue/test-utils';
test('should render default slot and match snapshot', () => {
test('should render default slot correctly', () => {
const wrapper = mount(Cell, {
slots: {
default: () => 'Custom Default',
@@ -10,7 +10,7 @@ test('should render default slot and match snapshot', () => {
expect(wrapper.html()).toMatchSnapshot();
});
test('should render title slot and match snapshot', () => {
test('should render title slot correctly', () => {
const wrapper = mount(Cell, {
slots: {
title: () => 'Custom Title',
@@ -19,7 +19,7 @@ test('should render title slot and match snapshot', () => {
expect(wrapper.html()).toMatchSnapshot();
});
test('should render label slot and match snapshot', () => {
test('should render label slot correctly', () => {
const wrapper = mount(Cell, {
props: {
title: 'Title',
@@ -31,7 +31,7 @@ test('should render label slot and match snapshot', () => {
expect(wrapper.html()).toMatchSnapshot();
});
test('should render icon slot and match snapshot', () => {
test('should render icon slot correctly', () => {
const wrapper = mount(Cell, {
slots: {
icon: () => 'Custom Icon',
@@ -40,7 +40,7 @@ test('should render icon slot and match snapshot', () => {
expect(wrapper.html()).toMatchSnapshot();
});
test('should render extra slot and match snapshot', () => {
test('should render extra slot correctly', () => {
const wrapper = mount(Cell, {
slots: {
extra: () => 'Custom Extra',