Skip to content

Commit

Permalink
fix(coachmark): moved nested test out
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMelox committed Dec 10, 2024
1 parent 41d9a82 commit 7f92351
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/ibm-products/src/components/Coachmark/Coachmark.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
});
});
});

0 comments on commit 7f92351

Please sign in to comment.