diff --git a/packages/actionsheet/test/__snapshots__/demo.spec.js.snap b/packages/actionsheet/test/__snapshots__/demo.spec.js.snap new file mode 100644 index 000000000..43ceb00c5 --- /dev/null +++ b/packages/actionsheet/test/__snapshots__/demo.spec.js.snap @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders demo correctly 1`] = ` +
+
+ + +
+
+ + +
+
+ + +
+
+`; diff --git a/packages/actionsheet/test/__snapshots__/index.spec.js.snap b/packages/actionsheet/test/__snapshots__/index.spec.js.snap index a300537d2..cf80ae45d 100644 --- a/packages/actionsheet/test/__snapshots__/index.spec.js.snap +++ b/packages/actionsheet/test/__snapshots__/index.spec.js.snap @@ -13,55 +13,3 @@ exports[`callback events 1`] = `
Cancel
`; - -exports[`renders actionsheet correctly 1`] = ` -
-
- - -
-
- - -
-
- - -
-
-`; diff --git a/packages/area/test/index.spec.js b/packages/actionsheet/test/demo.spec.js similarity index 52% rename from packages/area/test/index.spec.js rename to packages/actionsheet/test/demo.spec.js index b2a1e9abc..d647cfabc 100644 --- a/packages/area/test/index.spec.js +++ b/packages/actionsheet/test/demo.spec.js @@ -1,4 +1,4 @@ -import Area from '../'; +import Demo from '../demo'; import demoTest from '../../../test/demo-test'; -demoTest(Area); +demoTest(Demo); diff --git a/packages/actionsheet/test/index.spec.js b/packages/actionsheet/test/index.spec.js index 3d645703f..01ff7afd4 100644 --- a/packages/actionsheet/test/index.spec.js +++ b/packages/actionsheet/test/index.spec.js @@ -1,8 +1,5 @@ import { shallow } from '@vue/test-utils'; import Actionsheet from '../'; -import demoTest from '../../../test/demo-test'; - -demoTest(Actionsheet); test('callback events', () => { const callback = jest.fn(); diff --git a/packages/address-edit/test/__snapshots__/index.spec.js.snap b/packages/address-edit/test/__snapshots__/demo.spec.js.snap similarity index 99% rename from packages/address-edit/test/__snapshots__/index.spec.js.snap rename to packages/address-edit/test/__snapshots__/demo.spec.js.snap index d6e6d21f5..239359074 100644 --- a/packages/address-edit/test/__snapshots__/index.spec.js.snap +++ b/packages/address-edit/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders address-edit correctly 1`] = ` +exports[`renders demo correctly 1`] = `
diff --git a/packages/card/test/index.spec.js b/packages/address-edit/test/demo.spec.js similarity index 52% rename from packages/card/test/index.spec.js rename to packages/address-edit/test/demo.spec.js index 54674043f..d647cfabc 100644 --- a/packages/card/test/index.spec.js +++ b/packages/address-edit/test/demo.spec.js @@ -1,4 +1,4 @@ -import Card from '../'; +import Demo from '../demo'; import demoTest from '../../../test/demo-test'; -demoTest(Card); +demoTest(Demo); diff --git a/packages/address-edit/test/index.spec.js b/packages/address-edit/test/index.spec.js deleted file mode 100644 index 86fe2e5d5..000000000 --- a/packages/address-edit/test/index.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -import AddressEdit from '../'; -import demoTest from '../../../test/demo-test'; - -demoTest(AddressEdit); diff --git a/packages/address-list/test/__snapshots__/index.spec.js.snap b/packages/address-list/test/__snapshots__/demo.spec.js.snap similarity index 98% rename from packages/address-list/test/__snapshots__/index.spec.js.snap rename to packages/address-list/test/__snapshots__/demo.spec.js.snap index e5ff3b5ec..4fdb1cd3a 100644 --- a/packages/address-list/test/__snapshots__/index.spec.js.snap +++ b/packages/address-list/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders address-list correctly 1`] = ` +exports[`renders demo correctly 1`] = `
diff --git a/packages/button/test/index.spec.js b/packages/address-list/test/demo.spec.js similarity index 52% rename from packages/button/test/index.spec.js rename to packages/address-list/test/demo.spec.js index 2c360ff6e..d647cfabc 100644 --- a/packages/button/test/index.spec.js +++ b/packages/address-list/test/demo.spec.js @@ -1,4 +1,4 @@ -import Button from '../'; +import Demo from '../demo'; import demoTest from '../../../test/demo-test'; -demoTest(Button); +demoTest(Demo); diff --git a/packages/address-list/test/index.spec.js b/packages/address-list/test/index.spec.js deleted file mode 100644 index 7ad905cdb..000000000 --- a/packages/address-list/test/index.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -import AddressList from '../'; -import demoTest from '../../../test/demo-test'; - -demoTest(AddressList); diff --git a/packages/area/test/__snapshots__/index.spec.js.snap b/packages/area/test/__snapshots__/demo.spec.js.snap similarity index 99% rename from packages/area/test/__snapshots__/index.spec.js.snap rename to packages/area/test/__snapshots__/demo.spec.js.snap index d9dd3e09d..c79d2a297 100644 --- a/packages/area/test/__snapshots__/index.spec.js.snap +++ b/packages/area/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders area correctly 1`] = ` +exports[`renders demo correctly 1`] = `
diff --git a/packages/cell/test/index.spec.js b/packages/area/test/demo.spec.js similarity index 52% rename from packages/cell/test/index.spec.js rename to packages/area/test/demo.spec.js index 0a9003d0e..d647cfabc 100644 --- a/packages/cell/test/index.spec.js +++ b/packages/area/test/demo.spec.js @@ -1,4 +1,4 @@ -import Cell from '../'; +import Demo from '../demo'; import demoTest from '../../../test/demo-test'; -demoTest(Cell); +demoTest(Demo); diff --git a/packages/badge/test/__snapshots__/index.spec.js.snap b/packages/badge/test/__snapshots__/demo.spec.js.snap similarity index 93% rename from packages/badge/test/__snapshots__/index.spec.js.snap rename to packages/badge/test/__snapshots__/demo.spec.js.snap index fb843b21b..061ad756e 100644 --- a/packages/badge/test/__snapshots__/index.spec.js.snap +++ b/packages/badge/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders badge correctly 1`] = ` +exports[`renders demo correctly 1`] = `
diff --git a/packages/badge/test/demo.spec.js b/packages/badge/test/demo.spec.js new file mode 100644 index 000000000..d647cfabc --- /dev/null +++ b/packages/badge/test/demo.spec.js @@ -0,0 +1,4 @@ +import Demo from '../demo'; +import demoTest from '../../../test/demo-test'; + +demoTest(Demo); diff --git a/packages/badge/test/index.spec.js b/packages/badge/test/index.spec.js index de93a1a94..9b3afe957 100644 --- a/packages/badge/test/index.spec.js +++ b/packages/badge/test/index.spec.js @@ -1,9 +1,6 @@ import { mount } from '@vue/test-utils'; import Badge from '../'; import BadgeGroup from '../../badge-group'; -import demoTest from '../../../test/demo-test'; - -demoTest(Badge); test('click', () => { const onClick = jest.fn(); diff --git a/packages/button/test/__snapshots__/index.spec.js.snap b/packages/button/test/__snapshots__/demo.spec.js.snap similarity index 98% rename from packages/button/test/__snapshots__/index.spec.js.snap rename to packages/button/test/__snapshots__/demo.spec.js.snap index 850f0f1bf..7cf19b217 100644 --- a/packages/button/test/__snapshots__/index.spec.js.snap +++ b/packages/button/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders button correctly 1`] = ` +exports[`renders demo correctly 1`] = `
+
+
+
+
+
+
+

¥ 1.5

+

无使用门槛

+
+
+
+

优惠券名称

2017.03.10-2017.12.30 + + +
+
+
+
+
+
+

8.8折

+

满0.50元可用

+
+
+
+

优惠券名称

2017.03.10-2017.12.30 + + +
+
+

不可用优惠

+
+
+
+
+

¥ 1.5

+

无使用门槛

+
+
+
+

优惠券名称

2017.03.10-2017.12.30 +

优惠券不可用原因

+ +
+
+
+
+
+
+

1折

+

满0.50元可用

+
+
+
+

优惠券名称

2017.03.10-2017.12.30 +

优惠券不可用原因

+ +
+
+ +
+
不使用优惠
+
+
+
+
+`; diff --git a/packages/coupon-list/test/__snapshots__/index.spec.js.snap b/packages/coupon-list/test/__snapshots__/index.spec.js.snap index 449c5c8ba..3666c1b15 100644 --- a/packages/coupon-list/test/__snapshots__/index.spec.js.snap +++ b/packages/coupon-list/test/__snapshots__/index.spec.js.snap @@ -29,102 +29,3 @@ exports[`coupon cell 2`] = `
`; - -exports[`renders coupon-list correctly 1`] = ` -
-
-
-
- -
优惠券码 - -
-
您有 2 个可用优惠
- - - -
-
- -
-
-`; diff --git a/packages/coupon-list/test/demo.spec.js b/packages/coupon-list/test/demo.spec.js new file mode 100644 index 000000000..d647cfabc --- /dev/null +++ b/packages/coupon-list/test/demo.spec.js @@ -0,0 +1,4 @@ +import Demo from '../demo'; +import demoTest from '../../../test/demo-test'; + +demoTest(Demo); diff --git a/packages/coupon-list/test/index.spec.js b/packages/coupon-list/test/index.spec.js index 6d4073c82..f2d0ad9e9 100644 --- a/packages/coupon-list/test/index.spec.js +++ b/packages/coupon-list/test/index.spec.js @@ -1,10 +1,7 @@ -import demoTest from '../../../test/demo-test'; import CouponList from '../../coupon-list'; import CouponCell from '../../coupon-cell'; import { mount } from '@vue/test-utils'; -demoTest(CouponList); - test('exchange coupon', () => { const wrapper = mount(CouponList); const exchange = wrapper.find('.van-coupon-list__exchange'); diff --git a/packages/datetime-picker/test/__snapshots__/index.spec.js.snap b/packages/datetime-picker/test/__snapshots__/demo.spec.js.snap similarity index 99% rename from packages/datetime-picker/test/__snapshots__/index.spec.js.snap rename to packages/datetime-picker/test/__snapshots__/demo.spec.js.snap index 7f4179848..9ace71158 100644 --- a/packages/datetime-picker/test/__snapshots__/index.spec.js.snap +++ b/packages/datetime-picker/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders datetime-picker correctly 1`] = ` +exports[`renders demo correctly 1`] = `
diff --git a/packages/datetime-picker/test/demo.spec.js b/packages/datetime-picker/test/demo.spec.js new file mode 100644 index 000000000..d647cfabc --- /dev/null +++ b/packages/datetime-picker/test/demo.spec.js @@ -0,0 +1,4 @@ +import Demo from '../demo'; +import demoTest from '../../../test/demo-test'; + +demoTest(Demo); diff --git a/packages/datetime-picker/test/index.spec.js b/packages/datetime-picker/test/index.spec.js deleted file mode 100644 index 9f2da99b1..000000000 --- a/packages/datetime-picker/test/index.spec.js +++ /dev/null @@ -1,4 +0,0 @@ -import DatetimePicker from '../'; -import demoTest from '../../../test/demo-test'; - -demoTest(DatetimePicker); diff --git a/packages/dialog/test/__snapshots__/index.spec.js.snap b/packages/dialog/test/__snapshots__/demo.spec.js.snap similarity index 98% rename from packages/dialog/test/__snapshots__/index.spec.js.snap rename to packages/dialog/test/__snapshots__/demo.spec.js.snap index 231a690b8..2105b9c08 100644 --- a/packages/dialog/test/__snapshots__/index.spec.js.snap +++ b/packages/dialog/test/__snapshots__/demo.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders dialog correctly 1`] = ` +exports[`renders demo correctly 1`] = `
+
+
+
+
+
+
+ 您的收货地址不支持同城送, 我们已为您推荐快递
+
+
合计: ¥30. 50
+ +
+
+
+
+
+ +
+
合计: ¥30. 50
+ +
+
+
+
+
+
+ + 您的收货地址不支持同城送, 修改地址 +
+
+
+ + + 全选
+
合计: ¥30. 50
+ +
+
+
+
+`; diff --git a/packages/submit-bar/test/__snapshots__/index.spec.js.snap b/packages/submit-bar/test/__snapshots__/index.spec.js.snap index 01c4e4e8d..a495dfe26 100644 --- a/packages/submit-bar/test/__snapshots__/index.spec.js.snap +++ b/packages/submit-bar/test/__snapshots__/index.spec.js.snap @@ -1,68 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders submit-bar correctly 1`] = ` -
-
-
- -
-
合计: ¥30. 50
- -
-
-
-
-
-
- 您的收货地址不支持同城送, 我们已为您推荐快递
-
-
合计: ¥30. 50
- -
-
-
-
-
- -
-
合计: ¥30. 50
- -
-
-
-
-
-
- - 您的收货地址不支持同城送, 修改地址 -
-
-
- - - 全选
-
合计: ¥30. 50
- -
-
-
-
-`; - exports[`submit 1`] = `