[Test Improver] tests: add unit tests for useUserRetentionValidation composable - #18660
Draft
github-actions[bot] wants to merge 2 commits into
Draft
[Test Improver] tests: add unit tests for useUserRetentionValidation composable#18660github-actions[bot] wants to merge 2 commits into
github-actions[bot] wants to merge 2 commits into
Conversation
Cover validateUserRetentionCron, validateDisableInactiveUserAfterDuration, validateDeleteInactiveUserAfterDuration, validateDeleteInactiveUserAfter, and validateDurationAgainstAuthUserSession — including happy paths, error paths, boundary conditions (336h minimum), and null/empty edge cases. Coverage: 0% → 97.4% stmts, 89.5% branches, 100% fns Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
marcelofukumoto
force-pushed
the
test-assist/user-retention-validation-tests-ae9551acccec5d17
branch
from
August 6, 2026 07:26
bd8b7f8 to
1acc6b5
Compare
Contributor
Author
|
🔄 Auto-Retry Failed Run The Tests workflow failed for the commits below and has been automatically retried.
|
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.
🤖 This PR was created by Test Improver, an automated AI assistant focused on improving test coverage.
Goal and Rationale
Add unit tests for
shell/composables/useUserRetentionValidation.ts, a composable containing user retention validation logic with multiple branches and edge cases — previously at 0% coverage.This composable validates:
Approach
useI18nandvuexto isolate pure validation logicmakeComposable()helper to construct the composable with reactive refsit.eachtables into separate pass/fail blocks to comply withjest/no-conditional-expectESLint ruleparseDuration(alternation without full anchoring matches leading unit in multi-unit strings)Coverage Impact
Test Status
✅ 27 tests pass
✅ ESLint clean (
--max-warnings 0)Reproducing
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
download.cypress.ioSee Network Configuration for more information.