marmelab / ng-admin

Add an AngularJS admin GUI to any RESTful API
http://ng-admin-book.marmelab.com/
MIT License
3.95k stars 725 forks source link

Fix error messages on failed deletes, updates #1280

Closed jpetitcolas closed 7 years ago

jpetitcolas commented 7 years ago

This is a fix for items 1 & 2 described at https://github.com/marmelab/ng-admin/issues/1129#issuecomment-226500647

It does not fix item 3.

New test results:

Given an entity where the REST backend will return 400 "cannot delete due to xyz" for a "DELETE" request
When I view the "edit" page for that entity
And I click the "delete" button
And I click "Yes" to "are you sure?"
Then I should see an error banner including "cannot delete due to xyz"
 # this passes now (and fails before these changes)

Given an entity where the REST backend will return 400 "cannot delete due to xyz" for a "DELETE" request
When I view the "list" page for that entity tytpe
And I select that entity
And I click the "delete" button
And I click "Yes" to "are you sure?"
Then I should see an error banner including "cannot delete due to xyz"
 # this still fails due to item #3
 # I see a success banner
jpetitcolas commented 7 years ago

Seems to be already on master once rebased. Closing.