-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: show warning about dependencies removed on archive #5104
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -38,7 +38,10 @@ const setupArchiveValidation = (orphanParents: string[]) => { | |||
testServerRoute( | |||
server, | |||
'/api/admin/projects/projectId/archive/validate', | |||
orphanParents, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new structure returned from backend
@@ -144,6 +153,11 @@ test('Show error message when multiple parents of orphaned children are archived | |||
await screen.findByText( | |||
'have child features that depend on them and are not part of the archive operation. These parent features can not be archived:', | |||
); | |||
expect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not show the warning if there's already an error about orphaned children. Error and warning would confuse people
featureNames, | ||
); | ||
return { | ||
hasDeletedDependencies, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this to our archive validation. It now indicates if any dependencies will be removed
About the changes
Users should know that dependencies will be removed
The most important change is that our read model returns:
which covers our previous use case (parent that would orphan child features) and our new use case indicating if any dependencies will be deleted as part of the archive operation.
Important files
Discussion points