Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
khoidt committed Nov 15, 2024
1 parent ce3d481 commit 6df6bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/fragmentarium/ui/fragment/ArchaeologyEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class ArchaeologyEditor extends Component<Props, State> {
type="checkbox"
id={_.uniqueId('isRegularExcavation-')}
label="Regular Excavation"
aria-label="regular-excavation"
checked={this.state.isRegularExcavation}
onChange={this.updateIsRegularExcavation}
/>
Expand Down
8 changes: 4 additions & 4 deletions src/fragmentarium/ui/info/Details.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ describe('ExcavationDate', () => {
})
await renderDetails()

expect(screen.getByText('Regular Excavation')).toBeInTheDocument()
expect(screen.getByText('05/10/2024 – 10/10/2024')).toBeInTheDocument()
expect(screen.getByText(/Regular Excavation/)).toBeInTheDocument()
expect(screen.getByText(/05\/10\/2024 – 10\/10\/2024/)).toBeInTheDocument()
})

it('renders only start date when end date is missing', async () => {
Expand All @@ -210,8 +210,8 @@ describe('ExcavationDate', () => {
})
await renderDetails()

expect(screen.getByText('Regular Excavation')).toBeInTheDocument()
expect(screen.getByText('05/10/2024')).toBeInTheDocument()
expect(screen.getByText(/Regular Excavation/)).toBeInTheDocument()
expect(screen.getByText(/05\/10\/2024/)).toBeInTheDocument()
})

it('does not render excavation date when isRegularExcavation is false', async () => {
Expand Down

0 comments on commit 6df6bb1

Please sign in to comment.