Repository navigation
test: align remote notification tests with background polling - #1213
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Web Locks mock behavior tests/Unit/RemoteNotifications.test.tsx |
The lock mock accepts callback and options-plus-callback forms, checks abort signals, and serializes callbacks by lock name. |
Polling and notification timing tests/Unit/RemoteNotifications.test.tsx |
Polling tests use 60-second intervals. They check the initial baseline timing and adjust visibility and release-condition setup. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related PRs
- dev-null-sh/dev-null.sh#1138: Adds the shared
remote-pushWeb Lock flow that the updated test mock models.
Suggested reviewers: ampagent
Merge Risk: 
Minimal · up to 2baab
-
The test updates accurately model the current remote-notification behavior and are ready to merge.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Summary
Production CI fails 10 remote notification tests after
80cca8f4added polling leadership and a 60-second hidden-tab interval. Update the test doubles and timing expectations to match that behavior while retaining notification, unread-state, and race-condition coverage.Changes
Only
tests/Unit/RemoteNotifications.test.tsxchanges. Application and workflow behavior remain unchanged.Validation
composer test:lint— passed; existing warnings are outside the changed file.composer test:type-coverage— passed, 100%.bun run test:types— passed.bun run test:unit— passed, 194 Node tests and 613 component tests across 47 files.bun run build— passed.XDEBUG_MODE=coverage php -d memory_limit=-1 vendor/bin/pest --parallel --ci --coverage --exactly=100.0 --passthru-php="'-d' 'memory_limit=-1'"— passed, 4,529 tests, 25,373 assertions, 100% coverage, against isolated local PostgreSQL with the search extensions.git diff --check— passed.The first PHP run lacked the fresh worktree's Vite manifest and failed page-rendering tests. Building assets and rerunning the complete command passed. Browser and device checks are inapplicable to this test-only change.
Independent review
Sol 6.1, high reasoning, fast service: PASS, no actionable findings, covering correctness, regressions, architecture, and meaningful tests.
e83d7c04d9e3bafd75a341d4c49ae9974bf057962baabac52238aa44b250e1438a5546a222055629The reviewer independently passed 80 tests across RemoteNotifications, RemotePreferences, and RemotePush, TypeScript checks, and the diff check. Broader validation logs were inspected rather than independently rerun. Visual and device review are inapplicable.
Limitations
Hosted CI for this PR has not yet completed. This repair updates stale tests and does not change runtime behavior.
Summary by CodeRabbit