From b14cbe28d3093deba54cf8178687c0eafae55331 Mon Sep 17 00:00:00 2001 From: Tim Hansen Date: Fri, 4 Dec 2020 09:27:32 -0700 Subject: [PATCH] Fix tests --- .../ProductEntityDialog.test.tsx | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityDialog.test.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityDialog.test.tsx index 076edf60a3..99b6c8ae26 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityDialog.test.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductEntityDialog.test.tsx @@ -77,27 +77,23 @@ describe('', () => { open entity={atomicEntity} onClose={jest.fn()} - selectedLabel={null} - setSelectedLabel={jest.fn()} />, ), ), ).toThrow(); }); - it('Should not show tabs for a single sub-entity type', () => { - const { queryByText } = render( + it('Should show a tab for a single sub-entity type', () => { + const { getByText } = render( wrapInTestApp( , ), ); - expect(queryByText('Breakdown by SKU')).not.toBeInTheDocument(); + expect(getByText('Breakdown by SKU')).toBeInTheDocument(); }); it('Should show tabs when multiple sub-entity types exist', () => { @@ -107,8 +103,6 @@ describe('', () => { open entity={multiBreakdownEntity} onClose={jest.fn()} - selectedLabel={null} - setSelectedLabel={jest.fn()} />, ), ); @@ -116,19 +110,4 @@ describe('', () => { expect(getByText('Breakdown by deployment')).toBeInTheDocument(); expect(getByText('sku-1')).toBeInTheDocument(); }); - - it('Shows the pre-selected tab, if provided', () => { - const { getByText } = render( - wrapInTestApp( - , - ), - ); - expect(getByText('d-1')).toBeInTheDocument(); - }); });