RED-9608 - Comments not removed after uploading multiple files via ZIP-Archive... #597

Merged
corina.olariu.ext1 merged 2 commits from RED-9608-bp into release/2.465.x 2024-07-16 09:53:59 +02:00
Showing only changes of commit d1ad080e27 - Show all commits

View File

@ -461,9 +461,9 @@ public class FileTest extends AbstractPersistenceServerServiceTest {
//check comments are restored
AnnotationComments annotationComments = manualRedactionClient.getComments(dossierId, fileId, commentId);
assertThat(annotationComments.getComments().size()).isEqualTo(1);
assertThat(annotationComments.getComments()).hasSize(1);
AnnotationComments annotationCommentsForManualRedactions = manualRedactionClient.getComments(dossierId, fileId, annotationId);
assertThat(annotationCommentsForManualRedactions.getComments().size()).isEqualTo(2);
assertThat(annotationCommentsForManualRedactions.getComments()).hasSize(2);
fileManagementClient.deleteFile(dossier.getId(), file.getId());
var softDeletedFiles = fileClient.getSoftDeletedDossierStatus(dossier.getId());
@ -485,9 +485,9 @@ public class FileTest extends AbstractPersistenceServerServiceTest {
assertThat(activeFiles).hasSize(1);
//check comments are restored
annotationComments = manualRedactionClient.getComments(dossierId, fileId, commentId);
assertThat(annotationComments.getComments().size()).isEqualTo(1);
assertThat(annotationComments.getComments()).hasSize(1);
annotationCommentsForManualRedactions = manualRedactionClient.getComments(dossierId, fileId, annotationId);
assertThat(annotationCommentsForManualRedactions.getComments().size()).isEqualTo(2);
assertThat(annotationCommentsForManualRedactions.getComments()).hasSize(2);
fileManagementClient.hardDeleteFiles(dossier.getId(), List.of(file.getId()));
softDeletedFiles = fileClient.getSoftDeletedDossierStatus(dossier.getId());
@ -730,7 +730,7 @@ public class FileTest extends AbstractPersistenceServerServiceTest {
@Test
public void testFileWithCommentsAtReupload() {
void testFileWithCommentsAtReupload() {
var dossierTemplate = dossierTemplateTesterAndProvider.provideTestTemplate();
@ -789,9 +789,9 @@ public class FileTest extends AbstractPersistenceServerServiceTest {
//check comments are restored
AnnotationComments annotationComments = manualRedactionClient.getComments(dossierId, fileId, annotationId);
assertThat(annotationComments.getComments().size()).isEqualTo(1);
assertThat(annotationComments.getComments()).hasSize(1);
AnnotationComments annotationCommentsForManualRedactions = manualRedactionClient.getComments(dossierId, fileId, annotation2Id);
assertThat(annotationCommentsForManualRedactions.getComments().size()).isEqualTo(1);
assertThat(annotationCommentsForManualRedactions.getComments()).hasSize(1);
//overwrite the file
var fileUpload = new MockMultipartFile(file.getFilename(), file.getFilename(), "application/pdf", "content".getBytes());
@ -803,9 +803,9 @@ public class FileTest extends AbstractPersistenceServerServiceTest {
//check comments are soft deleted
annotationComments = manualRedactionClient.getComments(dossierId, loadedFile.getId(), annotation2Id);
assertThat(annotationComments.getComments().size()).isEqualTo(0);
assertThat(annotationComments.getComments()).hasSize(0);
annotationCommentsForManualRedactions = manualRedactionClient.getComments(dossierId, fileId, annotation2Id);
assertThat(annotationCommentsForManualRedactions.getComments().size()).isEqualTo(0);
assertThat(annotationCommentsForManualRedactions.getComments()).hasSize(0);
}