From c2ca0a9e8a58a3417a5d77ee920c5f915ca25dc4 Mon Sep 17 00:00:00 2001 From: Andrey Eremchenko Date: Sun, 12 Sep 2021 21:00:43 +0700 Subject: [PATCH] Fix unit tests. --- .../propertyValueElement.test.tsx.snap | 12 +++++------- .../properties/dateRange/dateRange.test.tsx | 3 ++- .../src/components/propertyValueElement.test.tsx | 14 +++++++------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/webapp/src/components/__snapshots__/propertyValueElement.test.tsx.snap b/webapp/src/components/__snapshots__/propertyValueElement.test.tsx.snap index 5861999df..a2cf8c25a 100644 --- a/webapp/src/components/__snapshots__/propertyValueElement.test.tsx.snap +++ b/webapp/src/components/__snapshots__/propertyValueElement.test.tsx.snap @@ -3,16 +3,14 @@ exports[`components/propertyValueElement should match snapshot, date, array value 1`] = `
@@ -44,7 +42,7 @@ exports[`components/propertyValueElement should match snapshot, person, array va
@@ -132,7 +130,7 @@ exports[`components/propertyValueElement should match snapshot, url, array value > diff --git a/webapp/src/components/properties/dateRange/dateRange.test.tsx b/webapp/src/components/properties/dateRange/dateRange.test.tsx index c9e1ec393..87986518b 100644 --- a/webapp/src/components/properties/dateRange/dateRange.test.tsx +++ b/webapp/src/components/properties/dateRange/dateRange.test.tsx @@ -251,6 +251,7 @@ describe('components/properties/dateRange', () => { , ) @@ -263,7 +264,7 @@ describe('components/properties/dateRange', () => { const today = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) const {getByText, getByTitle} = render(component) - const dayDisplay = getByTitle('Empty') + const dayDisplay = getByText('Empty') userEvent.click(dayDisplay) const day = getByText('Today') diff --git a/webapp/src/components/propertyValueElement.test.tsx b/webapp/src/components/propertyValueElement.test.tsx index 7ed877c2a..0e71e69e4 100644 --- a/webapp/src/components/propertyValueElement.test.tsx +++ b/webapp/src/components/propertyValueElement.test.tsx @@ -39,7 +39,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate || board.fields.cardProperties[0]} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) @@ -57,7 +57,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate || board.fields.cardProperties[0]} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) @@ -91,7 +91,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) @@ -116,7 +116,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) @@ -141,7 +141,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) @@ -166,7 +166,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) @@ -191,7 +191,7 @@ describe('components/propertyValueElement', () => { contents={[]} comments={[comments]} propertyTemplate={propertyTemplate} - emptyDisplayValue={'empty'} + showEmptyPlaceholder={true} />, ) const {container} = render(component)