diff --git a/src/image-preview/test/__snapshots__/index.spec.ts.snap b/src/image-preview/test/__snapshots__/index.spec.ts.snap index 071c28cb6..e5eb9fc83 100644 --- a/src/image-preview/test/__snapshots__/index.spec.ts.snap +++ b/src/image-preview/test/__snapshots__/index.spec.ts.snap @@ -76,113 +76,83 @@ exports[`should swipe to currect index after calling the swipeTo method 1`] = ` `; exports[`zoom in and drag image to move 1`] = ` -DOMWrapper { - "element":
+ - -
- -
- - - - - - - - - - - - - - - - - -
- +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
- -
, - "style": CSSStyleDeclaration { - "0": "transition-duration", - "_importants": Object { - "transition-duration": undefined, - }, - "_length": 1, - "_onChange": [Function], - "_values": Object { - "transition-duration": ".3s", - }, - }, -} +
+
`; exports[`zoom in and drag image to move 2`] = ` -DOMWrapper { - "element":
+ - -
- -
- - - - - - - - - - - - - - - - - -
- +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
- -
, - "style": CSSStyleDeclaration { - "0": "transition-duration", - "_importants": Object { - "transition-duration": undefined, - }, - "_length": 1, - "_onChange": [Function], - "_values": Object { - "transition-duration": ".3s", - }, - }, -} +
+
`; diff --git a/src/image-preview/test/index.spec.ts b/src/image-preview/test/index.spec.ts index 561fad635..fdf2b6a8e 100644 --- a/src/image-preview/test/index.spec.ts +++ b/src/image-preview/test/index.spec.ts @@ -328,12 +328,12 @@ test('zoom in and drag image to move', async () => { // drag image before load triggerDrag(image, 300, 300); - expect(wrapper.find('.van-image')).toMatchSnapshot(); + expect(wrapper.find('.van-image').html()).toMatchSnapshot(); // drag image after load image.trigger('load'); triggerDrag(image, 300, 300); - expect(wrapper.find('.van-image')).toMatchSnapshot(); + expect(wrapper.find('.van-image').html()).toMatchSnapshot(); restore(); });