- Remove 'Save filter' button from FileListFilter component
- Implement automatic saving when filters are selected/deselected
- Add setMarkedFilter() call in watchers for auto-save behavior
- Simplify filter logic by removing manual save action
- Clean up debug console.log statements
- Update SCSS styling to use nested syntax for reset button
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests now only check for exception type, not message, for DocMDP-related logic.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Test allowsAdditionalSignatures() with various DocMDP permission levels
- Verify unsigned PDFs allow additional signatures
- Test DocMDP level 0 (not certified) allows signatures
- Test DocMDP level 1 (no changes) blocks additional signatures
- Test DocMDP levels 2 and 3 allow signatures with form filling/annotations
- Validate DocMDP detection with real-world ICP-Brasil certificate example
- Test complete certificate chain validation (LYSEON TECH 4-level chain)
- Use PdfFixtureTrait for generating test PDFs with various DocMDP configurations
- Ensure proper resource handling and edge case coverage
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Implement DocMdpHandler to validate PDF Document Modification Detection and Prevention (DocMDP)
- Add allowsAdditionalSignatures() method to check if PDF permits additional signatures
- Support detection of DocMDP level 1 (no changes allowed) certification
- Parse PDF signature dictionaries and transformation parameters
- Prevent signatures on DocMDP level 1 certified documents per PDF specification
- Enable compliance with PDF document certification and signature workflows
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Remove unused $scenarioName parameter from test method and data provider
- Use expectNotToPerformAssertions() for scenarios that shouldn't throw exceptions
- Consolidate exception expectations into if-else block for better readability
- Simplify data provider by removing redundant scenario name keys
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Replace all inline PDF generation with PdfFixtureTrait methods.
Achieves 100% fixture consolidation across 39 tests.
Benefits:
- Zero code duplication
- Consistent PDF structures
- Easier maintenance
- Better test clarity
All tests passing.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Fix test setup and assertion patterns:
- Add missing appConfig mock initialization
- Inject DocMdpHandler from server container
- Use expectNotToPerformAssertions() for validation tests
- Place expectations at method start (PHPUnit best practice)
Validation tests assert 'no exception thrown' behavior:
- testValidateFileContentAllowsDocMdpLevel2/3
- testValidateFileContentAllowsUnsignedPdf
- testValidateFileContentSkipsNonPdfFiles
- testValidateFileContentRejectsDocMdpLevel1
Uses PdfFixtureTrait for all PDF generation.
All 98 tests passing (154 assertions).
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add DocMdpHandler dependency to FileService constructor to enable
DocMDP validation in TFile trait.
Assigns to TFile::docMdpHandler property for validateDocMdpAllowsSignatures().
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add public method to check if DocMDP level allows additional signatures.
Returns false only for CERTIFIED_NO_CHANGES_ALLOWED (level 1).
Required for FileService to validate signature requests against DocMDP policy.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Consolidate PDF generation logic into a reusable trait to:
- Eliminate code duplication across test files
- Provide single source of truth for PDF fixtures
- Support both minimal (DocMdpHandler) and FPDI-valid (FileService) PDFs
- Cover all DocMDP levels and ISO 32000-1 validation scenarios
Includes 25 fixture methods covering:
- DocMDP levels 0-3
- Form field/annotation/structural modifications
- ISO signature validation edge cases
- ICP-Brasil compliance testing
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Remove duplicate getLabel() and getDescription() methods from DocMdpConfigService
- Use enum methods directly by passing IL10N instance
- Improve descriptions to differentiate between approval and certifying signatures
- Align descriptions with ISO 32000 DocMDP specification terminology
The new descriptions clearly distinguish:
- Approval signature (NOT_CERTIFIED): allows all modifications
- Certifying signature (levels 1-3): restricts modifications based on level
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- AdminTest: Add DocMdpConfigService mock parameter to Admin constructor
- FileServiceTest: Remove DocMDP fields (docmdp, modifications, modification_validation) from test comparisons
These tests were failing because:
1. Admin class now requires DocMdpConfigService as 9th constructor parameter
2. FileService.getFileData() now includes DocMDP-related fields in signers array
Both fixes ensure tests properly handle the new DocMDP feature additions.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>