From 762b80c880d2260552703f10e6a508919a0c77fd Mon Sep 17 00:00:00 2001 From: Cheng Shi Date: Mon, 4 Nov 2024 16:38:29 -0500 Subject: [PATCH 1/3] fix: remove the skip so the test case could be included --- .../integration/datasets/DatasetJSDataverseRepository.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts b/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts index 247aa1fc3..84fe3c461 100644 --- a/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts +++ b/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts @@ -322,8 +322,7 @@ describe('Dataset JSDataverse Repository', () => { }) }) - it.skip('gets the dataset by persistentId when the dataset is deaccessioned', async () => { - // TODO - Implement once the getDatasetCitation includes deaccessioned datasets + it('gets the dataset by persistentId when the dataset is deaccessioned', async () => { const datasetResponse = await DatasetHelper.create(collectionId) await DatasetHelper.publish(datasetResponse.persistentId) @@ -339,6 +338,7 @@ describe('Dataset JSDataverse Repository', () => { expect(dataset.version.title).to.deep.equal(datasetExpected.title) }) }) + it('gets the dataset by persistentId when is locked', async () => { const datasetResponse = await DatasetHelper.create(collectionId) await DatasetHelper.lock(datasetResponse.id, DatasetLockReason.FINALIZE_PUBLICATION) From fc131a43fa1fdf81ad7eeba5478b1d24bd9e8985 Mon Sep 17 00:00:00 2001 From: Cheng Shi Date: Mon, 4 Nov 2024 17:24:54 -0500 Subject: [PATCH 2/3] fix: remove a todo which was wrongly copied and pasted --- .../link-dataset-button/LinkDatasetButton.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sections/dataset/dataset-action-buttons/link-dataset-button/LinkDatasetButton.tsx b/src/sections/dataset/dataset-action-buttons/link-dataset-button/LinkDatasetButton.tsx index 3d0ef983a..3c3ee4c03 100644 --- a/src/sections/dataset/dataset-action-buttons/link-dataset-button/LinkDatasetButton.tsx +++ b/src/sections/dataset/dataset-action-buttons/link-dataset-button/LinkDatasetButton.tsx @@ -12,7 +12,6 @@ export function LinkDatasetButton({ dataset }: LinkDatasetButtonProps) { const { t } = useTranslation('dataset') const { user } = useSession() const handleClick = () => { - // TODO - Implement upload files showModal() } const { showModal } = useNotImplementedModal() From 159058a685b0b37841fca95ae699ba7104c8c559 Mon Sep 17 00:00:00 2001 From: Cheng Shi Date: Thu, 7 Nov 2024 09:48:00 -0500 Subject: [PATCH 3/3] fix: add a criteria checking if it's deaccessioned --- .../integration/datasets/DatasetJSDataverseRepository.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts b/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts index 84fe3c461..bab6c46b0 100644 --- a/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts +++ b/tests/e2e-integration/integration/datasets/DatasetJSDataverseRepository.spec.ts @@ -336,6 +336,7 @@ describe('Dataset JSDataverse Repository', () => { const datasetExpected = datasetData(dataset.persistentId, dataset.version.id) expect(dataset.version.title).to.deep.equal(datasetExpected.title) + expect(dataset.version.publishingStatus).to.equal(DatasetPublishingStatus.DEACCESSIONED) }) })