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

IQSS / dataverse-frontend / 11673750839

04 Nov 2024 10:24PM UTC coverage: 97.572% (+0.2%) from 97.388%
11673750839

Pull #543

github

ChengShi-1
fix: remove a todo which was  wrongly copied and pasted
Pull Request #543: Remove the skip from e2e test for getByPersistentId, so the test case could be included

1507 of 1570 branches covered (95.99%)

Branch coverage included in aggregate %.

3797 of 3866 relevant lines covered (98.22%)

8824.9 hits per line

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

92.86
/src/sections/dataset/dataset-action-buttons/link-dataset-button/LinkDatasetButton.tsx
1
import { Button, ButtonGroup } from '@iqss/dataverse-design-system'
2
import { Dataset, DatasetPublishingStatus } from '../../../../dataset/domain/models/Dataset'
3
import { useTranslation } from 'react-i18next'
4
import { useSession } from '../../../session/SessionContext'
5
import { useNotImplementedModal } from '../../../not-implemented/NotImplementedModalContext'
6

7
interface LinkDatasetButtonProps {
8
  dataset: Dataset
9
}
10

11
export function LinkDatasetButton({ dataset }: LinkDatasetButtonProps) {
232✔
12
  const { t } = useTranslation('dataset')
232✔
13
  const { user } = useSession()
227✔
14
  const handleClick = () => {
227✔
15
    showModal()
×
16
  }
17
  const { showModal } = useNotImplementedModal()
227✔
18

19
  if (
227✔
20
    !user ||
255✔
21
    !dataset.version.someDatasetVersionHasBeenReleased ||
22
    dataset.version.publishingStatus === DatasetPublishingStatus.DEACCESSIONED
23
  ) {
24
    return <></>
217✔
25
  }
26

27
  return (
10✔
28
    <ButtonGroup>
29
      <Button onClick={handleClick} variant="secondary">
30
        {t('datasetActionButtons.linkDataset.title')}
31
      </Button>
32
    </ButtonGroup>
33
  )
34
}
21✔
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