code4romania / vic

Mozilla Public License 2.0
2 stars 1 forks source link

[NGO profile] NGO description reset doesn't work #242

Closed anastk-code4 closed 3 months ago

anastk-code4 commented 8 months ago

Description

As an AdminONG in the TEO web app, I edited the pre-filled (pulled from ONGHub) description to a personalised one and saved the changes. Then, I edited the description again - this time I deleted all text inputed and saved changes. I received a notification saying "Descrierea organizatiei a fost actualizata", but the changes were not made - the description is still the last one inputted, and not reseted to default.

Test environment

Web

Preconditions

Have AdminONG user. Have access to TEO.

Test Data

not neccessary

Steps of Reproduction

  1. Login as AdminONG in ONGHUB, access TEO web app.
  2. Go to NGO profile in TEO web app
  3. Click on 'Edit' button to edit the description
  4. See description field is pre-filled with NGO description from ONGHub (ONGHub > Organizatia mea > Date Generale > Descriere)
  5. Input any new text (make sure you save a personalised description and not the default one)
  6. Save changes, see changes were made
  7. Click again on 'Edit' button
  8. Remove all text from the field
  9. Save changes
  10. See notification "changes have been made", but the description text is the previous one inserted

Expected Result

NGO description is reset to its default value (the one prefilled from ONGHub)

Actual Result

NGO description is the last one successfully saved, before removing all text.

Notes (optional)

Screenshots (optional)

image
radulescuandrew commented 7 months ago

Additional validation was added to prevent erasing the text without error. As discussed w @overeha, if someone wants to reset, will just copy paste from ONGHub. The "reset" method can be easily implemented in the future as we already have it when creating the account.

Close for now.