import React from 'react'; import { cleanup } from '@testing-library/react'; import { render } from '../../utils/theme-render-wrapper'; import { Tenant } from './tenant'; afterEach(cleanup); describe('', () => { it(`Should render Tenant with basic props`, () => { const content = 'Active'; const subtitle = 'Details'; const { getByTestId } = render( ); const subtitleEl = getByTestId('subtitle'); expect(subtitleEl?.textContent).toBe(subtitle); const companyStatusEl = getByTestId('coloredTextWithBG'); expect(companyStatusEl?.textContent).toBe(content); }); it(`Should render Tenant with all props`, () => { const { getByTestId } = render( ) } }} companyStatusProps={{ content: 'Active', colorObj: { backgroundColor: '#FFFFFF', color: '#FFFFFF' } }} subTexts={['One', 'Two', 'Three']} /> ); const companyStatusEl = getByTestId('coloredTextWithBG'); expect(companyStatusEl?.textContent).toBe('Active'); const subTextsEl = getByTestId('subTexts'); expect(subTextsEl?.textContent).toBe('OneTwoThree'); }); });