@@ -214,6 +214,25 @@ public async Task CrdtEntryMissingTranslationId_FwTranslationRemoved_FullSync()
214214 updatedCrdtEntry ! . SingleExampleSentence ( ) . Translations . Should ( ) . BeEmpty ( ) ;
215215 }
216216
217+ [ Fact ]
218+ public async Task CrdtEntryMissingTranslationId_FwExampleSentenceRemoved_FullSync ( )
219+ {
220+ // arrange
221+ var ( fwEntry , crdtEntry , _) = await CreateSyncedEntryMissingTranslationId ( ) ;
222+ var entryId = fwEntry . Id ;
223+ var senseId = fwEntry . Senses . Single ( ) . Id ;
224+ var exampleSentenceId = fwEntry . SingleExampleSentence ( ) . Id ;
225+
226+ // act
227+ await FwDataApi . DeleteExampleSentence ( entryId , senseId , exampleSentenceId ) ;
228+ var result = await SyncService . Sync ( CrdtApi , FwDataApi ) ;
229+ result . CrdtChanges . Should ( ) . Be ( 1 , "the crdt example-sentence was removed" ) ;
230+
231+ // assert - the crdt translation was also removed
232+ var updatedCrdtEntry = await CrdtApi . GetEntry ( crdtEntry . Id ) ;
233+ updatedCrdtEntry ! . Senses . Single ( ) . ExampleSentences . Should ( ) . BeEmpty ( ) ;
234+ }
235+
217236 [ Fact ]
218237 public async Task CrdtEntryMissingTranslationId_CrdtTranslationRemoved_SyncMissingTranslationIds ( )
219238 {
@@ -255,6 +274,24 @@ public async Task CrdtEntryMissingTranslationId_CrdtTranslationRemoved_FullSync(
255274 updatedFwEntry ! . SingleExampleSentence ( ) . Translations . Should ( ) . BeEmpty ( ) ;
256275 }
257276
277+ [ Fact ]
278+ public async Task CrdtEntryMissingTranslationId_CrdtExampleSentenceRemoved_FullSync ( )
279+ {
280+ // arrange
281+ var ( fwEntry , crdtEntry , _) = await CreateSyncedEntryMissingTranslationId ( ) ;
282+ var entryId = fwEntry . Id ;
283+ var senseId = fwEntry . Senses . Single ( ) . Id ;
284+ var exampleSentenceId = fwEntry . SingleExampleSentence ( ) . Id ;
285+
286+ // act
287+ await CrdtApi . DeleteExampleSentence ( entryId , senseId , exampleSentenceId ) ;
288+ await SyncService . Sync ( CrdtApi , FwDataApi ) ;
289+
290+ // assert - the fw translation was also removed
291+ var updatedFwEntry = await FwDataApi . GetEntry ( crdtEntry . Id ) ;
292+ updatedFwEntry ! . Senses . Single ( ) . ExampleSentences . Should ( ) . BeEmpty ( ) ;
293+ }
294+
258295 [ Fact ]
259296 public async Task CrdtEntryMissingTranslationId_NewCrdtEntry_SyncMissingTranslationIds ( )
260297 {
0 commit comments