githubbob42 / mingle2github2

0 stars 1 forks source link

TECH DEBT: Re-Add the logic for deleting files from filestore once attachment sent #5858

Closed githubbob42 closed 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 6224 Steps to Reproduce

| | |
|-|-|
|**Version #**| |
|**Hardware**| |
|**OS**| |
|**Browser**| |
|**Username**| |
|**Password**|Use LastPass|
|ORG ID| |
|User ID| |
|RayGun Error ID| |
  1. Whoops… re-adding logic that was removed during #5838

Expected Result

What should happen?

Actual Result

What actually happens?

Analysis

Related Cards

Impact Analysis

Developers: Fill in this area during code review.

Test Plan

Ensure when we do an incremental sync – that any sent files are removed from IndexedDB File Store

  1. Login to mobile
  2. Open dev tools
  3. Navigate to job or ticket
  4. Go to attachments
  5. Add an attachment
  6. Navigate to application → indexedDB → FileStore → files in dev tools
  7. navigate through the records until you see your attachment (it usually is the last one)
  8. go back to mobile and go to the sync screen
  9. perform a sync 
  10. Ensure the data is in back-office and removed from the FileStore
  11. navigate back to the same ticket or job →
  12. Ensure that the attachment still shows in attachments – (just greyed out)

QA Test Analysis

| | |
|-|-|

### **Result: PASS**

   |

Version tested: 4.0.1.pr3095

   |

### **Login:**

   |

Username: godswillfield@test8.com

   |

Password: Lastpass

   |

URL: https://dev.fieldfx.com/dashboard/sync?reload=true

   |

### Browser/Devices

   |

Mac/Chrome

iPad( IOS 12,11.4,10)

Samsung(Android 7.0)

   |

### Test Case

   |

Updated: Testing attachments when a NEW job/ticket created in Mobile https://lfw.testrail.io/index.php?/cases/view/4828  

   |

Test Note: Following the steps above while on beta, I was able to reproduce the current file attachment logic in DB whereby the files are being deleted from the ‘Filestore’ after a sync. as shown below:

!clip-4c48-53c3.png!{height: 459px; width: 1000px;}

After applying the PR, I was able to verify that after an incremental sync, any sent files are removed from IndexedDB File Store as show below:

Before Incremental Sync:
!clip-239c-d317.png!{height: 501px; width: 1000px;}

After Incremental Sync:
!clip-9660-acf7.png!{height: 498px; width: 1000px;}

Additional Note:

I created files while on Beta > Upversioned to the PR by doing an incremental sync > Navigated to application → indexedDB → FileStore 
The files were not cleared.

As per developer, this scenario would require a Migration code.

githubbob42 commented 5 years ago

Pull Request #3095