cityofaustin / atd-moped

A comprehensive mobility project tracking platform for Austin, Texas.
https://mobility.austin.gov/moped/
4 stars 3 forks source link

Handle cancelling out of cell edits in funding table (for Patch v2.15.1) #1378

Closed mddilley closed 3 months ago

mddilley commented 3 months ago

Associated issues

n/a

When double-clicking a cell in the funding table and then clicking away to cancel without actually making a value change, the update mutation is still called and ends up creating an activity log entry with the same before and after values. This adds a check for updated form data before calling the mutation. I missed this during review and QA testing so thanks for reviewing!

I added a steps to the QA spreadsheet to edit this way and also review the activity log after all the testing.

Testing

URL to test:

https://deploy-preview-1378--atd-moped-main.netlify.app/moped/

Steps to test:

  1. Go to a project funding sources table with a funding row or create a row if there isn't one
  2. Open your dev tools to watch for network requests then double-click a cell to edit. Without making a change, click outside the table to cancel. You should not see a network request happen.
  3. Now, do the same but make an update. You should see a network request for the mutation.
  4. Check the activity log and you should see one entry for what happened in step 3.

Ship list