• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IQSS / dataverse-frontend / 5600878756

19 Jul 2023 02:57PM UTC coverage: 98.527% (+0.04%) from 98.49%
5600878756

push

github

MellyGray
feat(FilesTableSearch): add to searchText to criteria

267 of 277 branches covered (96.39%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 1 file covered. (100.0%)

870 of 877 relevant lines covered (99.2%)

290.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/sections/dataset/metadata-block-info/MetadataBlockProvider.tsx
1
import { PropsWithChildren, useEffect, useState } from 'react'
2
import { MetadataBlockInfoContext } from './MetadataBlockInfoContext'
3
import { MetadataBlockInfo } from '../../../metadata-block-info/domain/models/MetadataBlockInfo'
4
import { MetadataBlockInfoRepository } from '../../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
5
import { getMetadataBlockInfoByName } from '../../../metadata-block-info/domain/useCases/getMetadataBlockInfoByName'
6
import { MetadataBlockName } from '../../../dataset/domain/models/Dataset'
7

8
export function MetadataBlockInfoProvider({
10✔
9
  children,
10
  repository
11
}: PropsWithChildren<{ repository: MetadataBlockInfoRepository }>) {
26✔
12
  const [metadataBlockName, setMetadataBlockName] = useState<string>(MetadataBlockName.CITATION)
26✔
13
  const [metadataBlockInfo, setMetadataBlockInfo] = useState<MetadataBlockInfo>()
26✔
14

15
  useEffect(() => {
26✔
16
    getMetadataBlockInfoByName(repository, metadataBlockName)
12✔
17
      .then((metadataBlockInfo) => {
18
        setMetadataBlockInfo(metadataBlockInfo)
12✔
19
      })
20
      .catch((error) => console.error('There was an error getting the metadata block info', error))
×
21
  }, [repository, metadataBlockName])
22

23
  return (
26✔
24
    <MetadataBlockInfoContext.Provider value={{ metadataBlockInfo, setMetadataBlockName }}>
25
      {children}
26
    </MetadataBlockInfoContext.Provider>
27
  )
28
}
10✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc