From e299940cadd5428eeb9776308d42d0a12534066b Mon Sep 17 00:00:00 2001 From: Andrey Eremchenko Date: Thu, 26 Aug 2021 23:04:01 +0700 Subject: [PATCH] Unit test for `DateRange` fixed. Snapshots updated. --- .../dateRange/__snapshots__/dateRange.test.tsx.snap | 6 +----- .../src/components/properties/dateRange/dateRange.test.tsx | 6 ++++-- .../properties/link/__snapshots__/link.test.tsx.snap | 1 - 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/webapp/src/components/properties/dateRange/__snapshots__/dateRange.test.tsx.snap b/webapp/src/components/properties/dateRange/__snapshots__/dateRange.test.tsx.snap index 2a92f7502..ad99753d8 100644 --- a/webapp/src/components/properties/dateRange/__snapshots__/dateRange.test.tsx.snap +++ b/webapp/src/components/properties/dateRange/__snapshots__/dateRange.test.tsx.snap @@ -43,11 +43,7 @@ exports[`components/properties/dateRange returns default correctly 1`] = ` class="Button " type="button" > - - - + diff --git a/webapp/src/components/properties/dateRange/dateRange.test.tsx b/webapp/src/components/properties/dateRange/dateRange.test.tsx index 0e14fb845..b511a06cf 100644 --- a/webapp/src/components/properties/dateRange/dateRange.test.tsx +++ b/webapp/src/components/properties/dateRange/dateRange.test.tsx @@ -60,6 +60,7 @@ describe('components/properties/dateRange', () => { , ) @@ -68,7 +69,7 @@ describe('components/properties/dateRange', () => { const fifteenth = Date.UTC(date.getFullYear(), date.getMonth(), 15, 12) const {getByText, getByTitle} = render(component) - const dayDisplay = getByTitle('Empty') + const dayDisplay = getByText('Empty') userEvent.click(dayDisplay) const day = getByText('15') @@ -86,13 +87,14 @@ describe('components/properties/dateRange', () => { , ) // open modal const {getByText, getByTitle} = render(component) - const dayDisplay = getByTitle('Empty') + const dayDisplay = getByText('Empty') userEvent.click(dayDisplay) // select start date diff --git a/webapp/src/components/properties/link/__snapshots__/link.test.tsx.snap b/webapp/src/components/properties/link/__snapshots__/link.test.tsx.snap index 00dddfb53..cdc7abf9d 100644 --- a/webapp/src/components/properties/link/__snapshots__/link.test.tsx.snap +++ b/webapp/src/components/properties/link/__snapshots__/link.test.tsx.snap @@ -7,7 +7,6 @@ exports[`components/properties/link returns link properties correctly 1`] = ` >