Skip to content

Commit

Permalink
update ok button to 'update'
Browse files Browse the repository at this point in the history
  • Loading branch information
lincent committed Aug 23, 2024
1 parent c18fc88 commit fa42057
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions air-quality-ui/src/components/header/Toolbar.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('Toolbar component', () => {
DateTime.fromISO('2024-06-10T09:00:00', { zone: 'utc' }),
)
})
fireEvent.click(screen.getByText('Ok'))
fireEvent.click(screen.getByText('Update'))
await waitFor(() => {
expect(mockSetDetails).toHaveBeenCalledWith({
forecastBaseDate: DateTime.fromISO('2024-06-10T09:00:00', {
Expand All @@ -109,7 +109,7 @@ describe('Toolbar component', () => {
await waitFor(() => {
setIsInvalidDateTime(true)
})
fireEvent.click(screen.getByText('Ok'))
fireEvent.click(screen.getByText('Update'))
await waitFor(() => {
expect(mockSetDetails).not.toHaveBeenCalledWith(
DateTime.fromISO('2024-08-10T09:00:00', { zone: 'utc' }),
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('Toolbar component', () => {
await waitFor(() => {
setSelectedForecastWindow(testData)
})
fireEvent.click(screen.getByText('Ok'))
fireEvent.click(screen.getByText('Update'))
await waitFor(() => {
expect(beforeSetting).toStrictEqual({ value: 1, label: '1' })
})
Expand Down
2 changes: 1 addition & 1 deletion air-quality-ui/src/components/header/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const Toolbar = () => {
})
}
}}
text={'Ok'}
text={'Update'}
isButtonDisabled={isInvalidDateTime}
/>
</div>
Expand Down

0 comments on commit fa42057

Please sign in to comment.