From b684d1fa15846686222e52c1f5b0050b3273883b Mon Sep 17 00:00:00 2001 From: zengyue Date: Fri, 27 Oct 2023 10:46:42 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20treemap=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E6=B2=A1=E6=9C=89=E9=94=80=E6=AF=81=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E5=AE=9E=E4=BE=8B=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=20ci=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../f2/test/components/treemap/index.test.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/f2/test/components/treemap/index.test.tsx b/packages/f2/test/components/treemap/index.test.tsx index 23cca53eb..5123634f3 100644 --- a/packages/f2/test/components/treemap/index.test.tsx +++ b/packages/f2/test/components/treemap/index.test.tsx @@ -82,6 +82,9 @@ describe('Treemap', () => { await delay(100); expect(onClick.mock.calls.length).toBe(1); expect(onClick.mock.calls[0][0].origin).toEqual({ name: '中国平安', value: 0.06, rate: 0.1 }); + + await delay(100); + canvas.destroy(); }); it('space ', async () => { const onClick = jest.fn(); @@ -105,6 +108,8 @@ describe('Treemap', () => { await delay(1000); expect(context).toMatchImageSnapshot(); + await delay(100); + canvas.destroy(); }); it('select ', async () => { const { props } = ( @@ -176,6 +181,8 @@ describe('Treemap', () => { canvas.update(nextProps); await delay(1000); expect(context).toMatchImageSnapshot(); + await delay(100); + canvas.destroy(); }); it('select triggerOn', async () => { const { props } = ( @@ -213,6 +220,8 @@ describe('Treemap', () => { gestureSimulator(context.canvas, 'click', { x: 250, y: 170 }); await delay(800); expect(context).toMatchImageSnapshot(); + await delay(100); + canvas.destroy(); }); it('反选', async () => { const { props } = ( @@ -250,6 +259,8 @@ describe('Treemap', () => { gestureSimulator(context.canvas, 'click', { x: 260, y: 170 }); await delay(800); expect(context).toMatchImageSnapshot(); + await delay(100); + canvas.destroy(); }); it('取消反选', async () => { const { props } = ( @@ -288,6 +299,8 @@ describe('Treemap', () => { gestureSimulator(context.canvas, 'click', { x: 260, y: 170 }); await delay(800); expect(context).toMatchImageSnapshot(); + await delay(100); + canvas.destroy(); }); it('多选', async () => { const { props } = ( @@ -327,5 +340,7 @@ describe('Treemap', () => { gestureSimulator(context.canvas, 'click', { x: 230, y: 170 }); await delay(800); expect(context).toMatchImageSnapshot(); + await delay(100); + canvas.destroy(); }); });