diff --git a/frontend/src/component/common/StrategyItemContainer/StrategyItemContainer.test.tsx b/frontend/src/component/common/StrategyItemContainer/StrategyItemContainer.test.tsx index 9ec65ea4be..902dc10af6 100644 --- a/frontend/src/component/common/StrategyItemContainer/StrategyItemContainer.test.tsx +++ b/frontend/src/component/common/StrategyItemContainer/StrategyItemContainer.test.tsx @@ -1,7 +1,30 @@ import { screen } from '@testing-library/react'; import { render } from 'utils/testRenderer'; -import { StrategyItemContainer } from './LegacyStrategyItemContainer'; +import { StrategyItemContainer as LegacyStrategyItemContainer } from './LegacyStrategyItemContainer'; import type { IFeatureStrategy } from 'interfaces/strategy'; +import { StrategyItemContainer } from './StrategyItemContainer'; + +// todo: remove this test along with the flag flagOverviewRedesign +test('(deprecated) should render strategy name, custom title and description', async () => { + const strategy: IFeatureStrategy = { + id: 'irrelevant', + name: 'strategy name', + title: 'custom title', + constraints: [], + parameters: {}, + }; + + render( + , + ); + + expect(screen.getByText('strategy name')).toBeInTheDocument(); + expect(screen.getByText('description')).toBeInTheDocument(); + await screen.findByText('custom title'); // behind async flag +}); test('should render strategy name, custom title and description', async () => { const strategy: IFeatureStrategy = {