From 7249784d1dc492b578b5f5ded0fbbf941b20f273 Mon Sep 17 00:00:00 2001 From: melloware Date: Wed, 2 Nov 2022 15:47:43 -0400 Subject: [PATCH] Fix #3557: Improve Button and Chip tests --- components/lib/button/Button.spec.js | 80 +++++++- components/lib/chip/Chip.spec.js | 22 ++- package-lock.json | 281 ++++++++++++++------------- package.json | 18 +- 4 files changed, 259 insertions(+), 142 deletions(-) diff --git a/components/lib/button/Button.spec.js b/components/lib/button/Button.spec.js index 5171344dba..fcf46d1e34 100644 --- a/components/lib/button/Button.spec.js +++ b/components/lib/button/Button.spec.js @@ -1,82 +1,158 @@ import '@testing-library/jest-dom'; -import { render } from '@testing-library/react'; +import { fireEvent, render, screen, waitFor } from '@testing-library/react'; import { Button } from './Button'; describe('Button', () => { test('when visible is false Button return null', () => { + // Arrange const { container } = render(