diff --git a/packages/amis/__tests__/renderers/Image.test.tsx b/packages/amis/__tests__/renderers/Image.test.tsx index 8fe8757eecd9..402f398e562b 100644 --- a/packages/amis/__tests__/renderers/Image.test.tsx +++ b/packages/amis/__tests__/renderers/Image.test.tsx @@ -215,18 +215,7 @@ describe('Renderer:image', () => { '.cxd-ImageGallery-toolbar .cxd-ImageGallery-toolbar-action' ); - expect(actions!.length).toBe(5); - - const imgIns = baseElement.querySelector('.cxd-ImageGallery-main img')!; - - expect(imgIns).toHaveStyle({ - transform: 'translate(0px, 0px) scale(1) rotate(0deg)' - }); - - fireEvent.click(actions[1].firstElementChild!); - expect(imgIns).toHaveStyle({ - transform: 'translate(0px, 0px) scale(1) rotate(90deg)' - }); + expect(actions!.length).toBe(4); }); test('image:width & height', async () => { @@ -653,7 +642,7 @@ describe('Renderer:images', () => { expect( baseElement.querySelectorAll( - '.cxd-ImageGallery-footer .cxd-ImageGallery-itemsWrap .cxd-ImageGallery-item' + '.cxd-Sliding-content-lists .cxd-Sliding-content-lists-item' )!.length ).toBe(3); }); diff --git a/packages/amis/__tests__/renderers/__snapshots__/Image.test.tsx.snap b/packages/amis/__tests__/renderers/__snapshots__/Image.test.tsx.snap index db441d13cd27..67929dbfedde 100644 --- a/packages/amis/__tests__/renderers/__snapshots__/Image.test.tsx.snap +++ b/packages/amis/__tests__/renderers/__snapshots__/Image.test.tsx.snap @@ -704,15 +704,27 @@ exports[`Renderer:images images:enlargeAble & originalSrc & source & title & des >
- 图片1 + + + 图片1 + +
- 图片1的描述 + + + 图片1的描述 + +
@@ -751,15 +763,27 @@ exports[`Renderer:images images:enlargeAble & originalSrc & source & title & des >
- 图片2 + + + 图片2 + +
- 图片2的描述 + + + 图片2的描述 + +
@@ -798,15 +822,27 @@ exports[`Renderer:images images:enlargeAble & originalSrc & source & title & des >
- 图片3 + + + 图片3 + +
- 图片3的描述 + + + 图片3的描述 + +