feat: policy signature flow#7518
Draft
vitormattos wants to merge 1561 commits into
Draft
Conversation
955dec8 to
2b5c509
Compare
e0949a0 to
e843d15
Compare
a34a632 to
6aa5f3b
Compare
vitormattos
added a commit
that referenced
this pull request
Apr 28, 2026
FIXES: - Register all 6 signature_text individual policy keys in SignatureTextPolicy - Each key now has proper normalizers and defaults matching backend - Fix mock object type errors by converting willReturnMap to willReturnCallback - Mock callbacks now always return string (never null) to match type hints - Update mock expectations from once()/exactly(2) to atLeastOnce() for deleteKey() - Align test expectations with actual migration call counts DETAILS: * SignatureTextPolicy: Now exposes 6 individual keys via keys() and get() * Each key (template, template_font_size, signature_width, etc.) has proper specs * Render mode key includes allowed values: 'default', 'graphic', 'text' * Migration tests: Fixed mock return types to prevent TypeError * All getValueString() calls now guaranteed to return string via callback * Adjusted deleteKey() and setValueString() expectations to handle migration flow Test Results Expected: - 0 Unknown policy key errors (all 6 now registered) - 0 Mock type errors (callbacks always return string) - 0 Mock expectation violations (atLeastOnce accounts for cleanup calls)
vitormattos
added a commit
that referenced
this pull request
Apr 28, 2026
…olicy - Fix useSignatureTextPolicy.ts accessing .effectiveValue instead of non-existent .value - Simplify useSignatureTextPolicy return type annotation using ComputedRef - Fix model.ts serializeSignatureTextPolicyConfig to return JSON string - Fix model.ts normalizeSignatureTextPolicyConfig to handle JSON string inputs - Fix SignatureTextRuleEditor.vue Emits type to use EffectivePolicyValue - Remove trailing newline from SignatureTextPolicy.php Fixes: TypeScript type checking and PHP-CS formatting failures in PR #7518 Tests: npm run ts:check passes, php-cs formatting validated
vitormattos
added a commit
that referenced
this pull request
Apr 28, 2026
FIXES: - Register all 6 signature_text individual policy keys in SignatureTextPolicy - Each key now has proper normalizers and defaults matching backend - Fix mock object type errors by converting willReturnMap to willReturnCallback - Mock callbacks now always return string (never null) to match type hints - Update mock expectations from once()/exactly(2) to atLeastOnce() for deleteKey() - Align test expectations with actual migration call counts DETAILS: * SignatureTextPolicy: Now exposes 6 individual keys via keys() and get() * Each key (template, template_font_size, signature_width, etc.) has proper specs * Render mode key includes allowed values: 'default', 'graphic', 'text' * Migration tests: Fixed mock return types to prevent TypeError * All getValueString() calls now guaranteed to return string via callback * Adjusted deleteKey() and setValueString() expectations to handle migration flow Test Results Expected: - 0 Unknown policy key errors (all 6 now registered) - 0 Mock type errors (callbacks always return string) - 0 Mock expectation violations (atLeastOnce accounts for cleanup calls) Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
added a commit
that referenced
this pull request
Apr 28, 2026
…olicy - Fix useSignatureTextPolicy.ts accessing .effectiveValue instead of non-existent .value - Simplify useSignatureTextPolicy return type annotation using ComputedRef - Fix model.ts serializeSignatureTextPolicyConfig to return JSON string - Fix model.ts normalizeSignatureTextPolicyConfig to handle JSON string inputs - Fix SignatureTextRuleEditor.vue Emits type to use EffectivePolicyValue - Remove trailing newline from SignatureTextPolicy.php Fixes: TypeScript type checking and PHP-CS formatting failures in PR #7518 Tests: npm run ts:check passes, php-cs formatting validated Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1c39cdb to
892fbd0
Compare
c6cc732 to
0e665a6
Compare
…PolicyWorkbench.spec.ts Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
….spec.ts Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…s/PolicyRuleEditorPanel.vue Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…anel.vue Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…on-rules/MaximumValidityRuleEditor.vue Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…sign-groups/RequestSignGroupsRuleEditor.vue Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…sign-groups/realDefinition.ts Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…e-text/SignatureTextRuleEditor.vue Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…bench.ts Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…lerTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…HandlerTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…st.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…cyTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…nServiceTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…roups/ApprovalGroupsPolicyValueTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ethods/IdentifyMethodsPolicyValueTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…gnGroups/RequestSignGroupsPolicyGuardTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…icyResolverTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…extFactoryTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ceTest.php Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.