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

IQSS / dataverse-frontend / 6162162718

12 Sep 2023 04:16PM UTC coverage: 98.443% (-0.09%) from 98.531%
6162162718

Pull #156

github

MellyGray
fix(FilesTableRowSelection): global checkbox should select the current page only
Pull Request #156: 149 - Configure manual pagination in the Files Table UI

270 of 280 branches covered (0.0%)

Branch coverage included in aggregate %.

98 of 98 new or added lines in 10 files covered. (100.0%)

931 of 940 relevant lines covered (99.04%)

872.49 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 }>) {
16✔
12
  const [metadataBlockName, setMetadataBlockName] = useState<string>(MetadataBlockName.CITATION)
16✔
13
  const [metadataBlockInfo, setMetadataBlockInfo] = useState<MetadataBlockInfo>()
16✔
14

15
  useEffect(() => {
16✔
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 (
16✔
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