Skip to content

Commit 180663a

Browse files
DCAT-20: replace 'ongoing' with 'to Present' (#11)
1 parent 3a68abd commit 180663a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/ts/component/AppliedFilters/AppliedFilters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const temporalToTitle = (temporal: string[] | string) => {
4949
const [start, end] = temporal
5050
if (!start && !end) return null
5151
if (start === end) return start
52-
if (!end) return `${start} ongoing`
52+
if (!end) return `${start} to Present`
5353
if (!start) return `Up to ${end}`
5454

5555
return `${start} to ${end}`

src/ts/component/AppliedFilters/__tests__/AppliedFilters.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ describe('AppliedFilters', () => {
178178
}
179179
})
180180

181-
expect(screen.getByText('2020-01-01 ongoing')).toBeInTheDocument()
181+
expect(screen.getByText('2020-01-01 to Present')).toBeInTheDocument()
182182
})
183183
})
184184

src/ts/component/SearchResultItem/SearchResultItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function ummTemporalToHuman(umm: object): string | null {
101101

102102
if (!start && !end) return null
103103
if (start === end) return start
104-
if (!end) return `${start} ongoing`
104+
if (!end) return `${start} to Present`
105105

106106
return `${start} to ${end}`
107107
}

src/ts/component/SearchResultItem/__tests__/SearchResultItem.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ describe('DataCatalog SearchResultItem component', () => {
137137
expect(screen.getByText('2021-01-03')).toBeInTheDocument()
138138
})
139139

140-
test('renders forward-processing collection temporal as "ongoing"', () => {
140+
test('renders forward-processing collection temporal as "to Present"', () => {
141141
const metadata = mockUmm()
142142
delete metadata.umm.TemporalExtents[0].RangeDateTimes[0].EndingDateTime
143143
renderMetadata(metadata)
144144

145-
expect(screen.getByText('2021-01-01 ongoing')).toBeInTheDocument()
145+
expect(screen.getByText('2021-01-01 to Present')).toBeInTheDocument()
146146
})
147147

148148
test('renders temporal with start == end as a single date', () => {

0 commit comments

Comments
 (0)