diff --git a/CommonUI/src/Tests/Button.test.tsx b/CommonUI/src/Tests/Button.test.tsx
index 84669b1fbb..3a902163bc 100644
--- a/CommonUI/src/Tests/Button.test.tsx
+++ b/CommonUI/src/Tests/Button.test.tsx
@@ -1,35 +1,35 @@
import React from 'react';
-import { create } from 'react-test-renderer';
+import { render, screen, fireEvent } from '@testing-library/react';
+import '@testing-library/jest-dom/extend-expect';
import Button from '../Components/Button/Button';
-describe('Button', () => {
- const button = create();
+describe('Button test', () => {
+ const handleClick: undefined | (() => void) = jest.fn();
+ render(
+
+ );
+ const title: HTMLElement = screen.getByText('sample title');
+ const testId: HTMLElement = screen.getByTestId('test-id');
- test('should match snapshot', () => {
- expect(button.toJSON()).toMatchInlineSnapshot(`
-
- `);
+ test('it should render correctly with a test id', () => {
+ expect(testId).toBeInTheDocument;
+ });
+
+ test('it should have a title', () => {
+ expect(title).toBeInTheDocument;
+ });
+
+ test('it should have disabled attribute', () => {
+ expect(testId).toHaveAttribute('disabled');
+ });
+
+ test('it should handle onClick event', () => {
+ fireEvent.click(testId);
+ expect(handleClick).toBeCalled;
});
});