From 31fd1bc4e278ba6e5ed922436d2bb903ebffb4b4 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 12 Mar 2024 11:12:06 +0100 Subject: [PATCH] chore: remove visual UI tests that are caught by snapshots Signed-off-by: blam --- .../src/components/Avatar/Avatar.test.tsx | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/packages/core-components/src/components/Avatar/Avatar.test.tsx b/packages/core-components/src/components/Avatar/Avatar.test.tsx index 4c726eb785..1c08d57679 100644 --- a/packages/core-components/src/components/Avatar/Avatar.test.tsx +++ b/packages/core-components/src/components/Avatar/Avatar.test.tsx @@ -17,7 +17,6 @@ import { render } from '@testing-library/react'; import React from 'react'; import { Avatar } from './Avatar'; -import { stringToColor } from './utils'; describe('', () => { it('renders without exploding', async () => { @@ -25,26 +24,4 @@ describe('', () => { expect(getByText('JD')).toBeInTheDocument(); }); - - it('generates a background color', async () => { - const bgcolor = stringToColor('John Doe'); - const { getByText } = render(); - expect(getByText('JD').parentElement).toHaveStyle( - `background-color: ${bgcolor}`, - ); - }); - - it('does not generate a background color when a picture is given', async () => { - const bgcolor = stringToColor('John Doe'); - const { getByAltText } = render( - , - ); - - expect(getByAltText('John Doe')).not.toHaveStyle( - `background-color: ${bgcolor}`, - ); - }); });