feat(annotations): resize and move annotations in document view #235

Merged
marcel merged 25 commits from feat/issue-233-annotation-resize-move into main 2026-04-14 14:55:28 +02:00
Showing only changes of commit 65d606d8bb - Show all commits

View File

@@ -246,6 +246,24 @@ class AnnotationControllerTest {
.andExpect(status().isBadRequest());
}
@Test
@WithMockUser(authorities = "WRITE_ALL")
void patchAnnotation_returns400_withHeightBelowMinimum() throws Exception {
mockMvc.perform(patch("/api/documents/" + UUID.randomUUID() + "/annotations/" + UUID.randomUUID())
.contentType(MediaType.APPLICATION_JSON)
.content("{\"height\":0.005}"))
.andExpect(status().isBadRequest());
}
@Test
@WithMockUser(authorities = "WRITE_ALL")
void patchAnnotation_returns400_withXAboveMaximum() throws Exception {
mockMvc.perform(patch("/api/documents/" + UUID.randomUUID() + "/annotations/" + UUID.randomUUID())
.contentType(MediaType.APPLICATION_JSON)
.content("{\"x\":1.1}"))
.andExpect(status().isBadRequest());
}
// ─── resolveUserId — unauthenticated / null user / exception branches ─────
@Test