Dataset Page: Hide deaccession button if dataset is deaccessioned or draft#668
Dataset Page: Hide deaccession button if dataset is deaccessioned or draft#668ChengShi-1 wants to merge 3 commits intodevelopfrom
Conversation
ekraffmiller
left a comment
There was a problem hiding this comment.
Looks good! I just have a suggestion for simplifying the logic
src/sections/dataset/dataset-action-buttons/edit-dataset-menu/DeaccessionDatasetButton.tsx
Outdated
Show resolved
Hide resolved
…DeaccessionDatasetButton.tsx Co-authored-by: Ellen Kraffmiller <ekraffmiller@hmdc.harvard.edu>
|
Hi @ChengShi-1 , I'm sorry, I was testing this against JSF and I realized this issue doesn't describe the logic correctly! But this logic needs to updated with the Deaccession Reason PR is merged (#664), because the deaccession info will be an object. So maybe it's best to keep this waiting until that PR is merged. Sorry for the confusion on this! Let me know if you have questions |
Hi Ellen, Thanks for review! Could you please check #669 ? It solved this issue here I think. I didn't notice this before, it was my bad. |
Ok, great! I will review that, and then we can probably close this. Thanks :) |
|
This issue was resolved in #669 |
What this PR does / why we need it:
Which issue(s) this PR closes:
Special notes for your reviewer:
cy.wrap(repository.deaccession).should('be.calledTwice')tocy.wrap(repository.deaccession).should('have.been.called')because the original test is flaky in git environment. with the error messageTimed out retrying after 4000ms: expected deaccession to have been called exactly twice, but it was called onceversion.length == 0, since the logic seems duplicated withisSomeVersionReleaseSuggestions on how to test this:
if the dataset version is draft or is deaccessioned, should not show Deaccession Dataset Bbutton


Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: