-
[OPIK-3444] [BE] Modify auto-extracted attachments processing to avoid deleting of attachments extracted on SDK side (#4431)
发布于
2025-12-15 15:35:22 +00:00 - [OPIK-3444] [BE] Updated regex patterns with SDK support. Add and enhance unit tests for
AttachmentUtilsmethods.
- Updated regex patterns with SDK support and adjusted extraction logic accordingly to accommodate new formats.
- Added comprehensive unit tests for
extractAttachmentReferencesto validate extraction logic across diverse scenarios, including duplicates, JSON inputs, and complex patterns. - Introduced tests for
hasAttachmentReferencesto ensure accurate validation of attachment presence in various JSON structures.
-
[OPIK-3444] [BE] Fixed formatting and typos
-
[OPIK-3444] [BE] Simplify
AttachmentUtilsby removing unusedunwrapReferenceandVALIDATE_REFERENCE_PATTERN.
- Updated
FIND_REFERENCE_PATTERNlogic to improve attachment reference detection. - Adjusted
hasAttachmentReferencesimplementation to match partial patterns instead of whole strings. - Modified related unit tests to align with relaxed pattern validation requirements.
- [OPIK-3444] [BE] Consolidate
AttachmentUtilstest classes intoAttachmentsUtilsTest
- Merged test cases from
AttachmentUtilsExtractAttachmentReferencesTestandAttachmentUtilsHasAttachmentReferencesTestintoAttachmentsUtilsTestfor improved test organization. - Refactored nested test structures to enhance readability and maintainability.
- Preserved all existing scenarios while ensuring alignment with updated utility methods.
- [OPIK-3444] [BE] Update test cases to improve attachment handling logic.
- Enhanced attachment handling verification by adding coverage for attachments surrounded by text.
- Updated test validation to account for changes in attachment count and file type checks.
- [OPIK-3444] [BE] Change visibility of constants and patterns in
AttachmentUtilstoprivatefor improved encapsulation.
下载附件
- [OPIK-3444] [BE] Updated regex patterns with SDK support. Add and enhance unit tests for