From 7f92351e18479498e3b96dd337351de0a28d2e51 Mon Sep 17 00:00:00 2001 From: Alexander Melo Date: Tue, 10 Dec 2024 14:43:39 -0500 Subject: [PATCH] fix(coachmark): moved nested test out --- .../src/components/Coachmark/Coachmark.test.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/ibm-products/src/components/Coachmark/Coachmark.test.js b/packages/ibm-products/src/components/Coachmark/Coachmark.test.js index e956dca4ee..57fe87bd23 100644 --- a/packages/ibm-products/src/components/Coachmark/Coachmark.test.js +++ b/packages/ibm-products/src/components/Coachmark/Coachmark.test.js @@ -75,6 +75,14 @@ describe(componentName, () => { expect(screen.getByTestId(dataTestId)).toHaveClass(blockClass); }); + it('Check coachmark can be open by default', () => { + renderCoachmark({ + 'data-testid': dataTestId, + isOpenByDefault: true, + }); + expect(isCoachmarkVisible()).toBeTruthy(); + }); + it('has no accessibility violations', async () => { const { container } = renderCoachmark(); await expect(container).toBeAccessible(componentName); @@ -315,12 +323,5 @@ describe(componentName, () => { it('tests clamp helper function', () => { expect(clamp(100, 50, 20)).toBe(50); expect(clamp(40, 10, 50)).toBe(40); - it('Check coachmark can be open by default', () => { - renderCoachmark({ - 'data-testid': dataTestId, - isOpenByDefault: true, - }); - expect(isCoachmarkVisible()).toBeTruthy(); - }); }); });