Conversation
| await assetEditRepo.replaceAll(asset.id, [ | ||
| { | ||
| action: AssetEditAction.Crop, | ||
| parameters: { x: 50, y: 60, width: 150, height: 250 }, | ||
| }, | ||
| ]); |
There was a problem hiding this comment.
This isn't actually an update. I think you should do a db.update(...) type query that updates the existing record and verify that the update comes across. What you are doing here is technically a delete & re-create, which will make a new record with a new uuid. It's fine for the service to always do a replace, but we should test and verify that updating a record will still be detected and synced.
| { | ||
| ack: expect.any(String), | ||
| data: { | ||
| assetId: asset.id, |
There was a problem hiding this comment.
Looks like you haven't updated this to include editId yet
| await ctx.assertSyncIsComplete(auth, [SyncRequestType.AssetEditsV1]); | ||
| }); | ||
|
|
||
| it('should detect and sync deleted asset edits', async () => { |
There was a problem hiding this comment.
Related to this, can you add at least one test in test/.../audit.database.spec.ts that verifies that when an asset is deleted (which should cascade delete the asset edits) that no audit records are created?
60b39f5 to
7fc55f9
Compare
7fc55f9 to
68ca7cd
Compare
Description
Adds edit sync entity to server