RED-9608 - Comments not removed after uploading multiple files via ZIP-Archive with "Overwrite and start over" selected
- solve sonar issues
This commit is contained in:
parent
27ac2ddcb8
commit
d1ad080e27
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user