diff --git a/packages/card/test/__snapshots__/index.spec.js.snap b/packages/card/test/__snapshots__/index.spec.js.snap index 9a15c3e0a..091a7af08 100644 --- a/packages/card/test/__snapshots__/index.spec.js.snap +++ b/packages/card/test/__snapshots__/index.spec.js.snap @@ -23,3 +23,32 @@ exports[`render origin-price slot 1`] = ` `; + +exports[`render price & num slot 1`] = ` +
+
+
+
+
Custom Price
+
Custom Num
+
+
+
+
+`; + +exports[`render thumb & tag slot 1`] = ` +
+
Custom Thumb
Custom Tag
+
+
+
+`; + +exports[`render title & desc slot 1`] = ` +
+
+
Custom TitleCustom desc
+
+
+`; diff --git a/packages/card/test/index.spec.js b/packages/card/test/index.spec.js index b29fc8ddb..85a93fad8 100644 --- a/packages/card/test/index.spec.js +++ b/packages/card/test/index.spec.js @@ -1,16 +1,29 @@ +import Vue from 'vue'; import Card from '..'; import { mount } from '../../../test/utils'; +Vue.use(Card); + test('render origin-price slot', () => { const wrapper = mount({ template: ` - + - - `, - components: { - Card - } + + ` + }); + + expect(wrapper).toMatchSnapshot(); +}); + +test('render price & num slot', () => { + const wrapper = mount({ + template: ` + + + + + ` }); expect(wrapper).toMatchSnapshot(); @@ -19,13 +32,36 @@ test('render origin-price slot', () => { test('render bottom slot', () => { const wrapper = mount({ template: ` - + - - `, - components: { - Card - } + + ` + }); + + expect(wrapper).toMatchSnapshot(); +}); + +test('render thumb & tag slot', () => { + const wrapper = mount({ + template: ` + + + + + ` + }); + + expect(wrapper).toMatchSnapshot(); +}); + +test('render title & desc slot', () => { + const wrapper = mount({ + template: ` + + + + + ` }); expect(wrapper).toMatchSnapshot(); diff --git a/packages/cell/test/__snapshots__/index.spec.js.snap b/packages/cell/test/__snapshots__/index.spec.js.snap index 2fd2e625a..b3889144a 100644 --- a/packages/cell/test/__snapshots__/index.spec.js.snap +++ b/packages/cell/test/__snapshots__/index.spec.js.snap @@ -6,10 +6,8 @@ exports[`arrow direction 1`] = ` `; exports[`render slot 1`] = ` -
-
Custom Title
Custom Label
-
Custom Extra -
+
Custom Icon
Custom Title
Custom Label
+
Custom Extra
`; exports[`title-style prop 1`] = ` diff --git a/packages/cell/test/index.spec.js b/packages/cell/test/index.spec.js index 33908c26a..21e44c60a 100644 --- a/packages/cell/test/index.spec.js +++ b/packages/cell/test/index.spec.js @@ -30,6 +30,7 @@ test('render slot', () => { const wrapper = mount({ template: ` +