File: Use Case File Has Been Deleted#302
Merged
ofahimIQSS merged 6 commits intodevelopfrom May 14, 2025
Merged
Conversation
g-saracca
reviewed
May 12, 2025
g-saracca
requested changes
May 12, 2025
Contributor
g-saracca
left a comment
There was a problem hiding this comment.
@ChengShi-1 just two minor comments, one above about a naming convention and could you please add also an integration test to check whether this use case / api endpoint returns true or false when a file has been replaced.
I believe it should return true also when a file has been replaced and we need that behaviour for the SPA.
| await expect(sut.fileHasBeenDeleted(nonExistentFiledId)).rejects.toThrow(expectedError) | ||
| }) | ||
|
|
||
| test('should return True when the dataset is published and the file has not been deleted', async () => { |
Contributor
There was a problem hiding this comment.
could we change the naming of this test, is a little bit confusing, you are testing both first that is not deleted and then that is indeed deleted.
g-saracca
approved these changes
May 14, 2025
Contributor
g-saracca
left a comment
There was a problem hiding this comment.
Looks great! thanks for applying the changes cheng 🙏🏼
Contributor
|
nothing suspicious going on here - things look to be passing. Merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Create a new use case based on this API endpoint to know if a particular file that existed in a previous version of the dataset no longer exists in the latest version.
This is needed for the SPA to know when to allow the File edition in both file page or file in a datset page.
Which issue(s) this PR closes:
Related Dataverse PRs:
Special notes for your reviewer:
Suggestions on how to test this:
Is there a release notes update needed for this change?:
Additional documentation: