akvo / siwins

GNU Affero General Public License v3.0
0 stars 0 forks source link

Handle updated datapoint on Sync API #11

Closed wayangalihpratama closed 1 year ago

wayangalihpratama commented 1 year ago
joycarpediem commented 1 year ago

@ifirmawan , can you please look at this and if all good then merge and move to "Ready for testing "

ifirmawan commented 1 year ago

sure @joycarpediem , I'm working on it

joycarpediem commented 1 year ago

@navins94 , can you please test this

All actions happen in flow and the effect should be visible in siwins after the sync Test cases:

  1. add a new data point in flow .Registration Run Sync Expected : Only one data point is fetched and shown in the UI
    1. add a monitoring submission . Run sync Expected : Only the monitoring submission is fetched
  2. Add second monitoring submission (1) Expected : Only the second monitoring submission is fetched . The first monitoring submission is moved to history
  3. Update the response to a question in the registration submission Expected : Only the answer to that submission is fetched and updated
  4. Do test 4 for monitoring submission (1) that was added in test 2 Expected : The history data is updated
  5. Do test 5 but for monitoring submission (2) Expected : The "current" answer table is updated
  6. Update a question text in the registration form Expected : The question text is updated in the sync
  7. Delete monitoring submission (1) Expected : Submission is removed from the history table
  8. Do test 8 for the registration data Expected : The registration data point as well as monitoring submission (2) is removed
navins94 commented 1 year ago

Hi @joycarpediem what should be the new data point. Should we install app from Akvo flow or any other way

ifirmawan commented 1 year ago

run sync

docker-compose exec backend python -m seeder.data_sync
navins94 commented 1 year ago

@joycarpediem I tested above points. Except delete everything is working fine

CC: @wayangalihpratama

joycarpediem commented 1 year ago

@ifirmawan , please incorporate @navins94 's comments around delete functionality not working