test(mobile): wire testID selectors for Detox E2E specs#3480
Conversation
Wire the one missing testID (`settings-group-system`) required by the
already-authored Detox specs: rename the first SETTING_GROUPS entry id
from `"general"` → `"system"` in `HubSettingsPage.tsx` so the
hub-ux-smoke spec can `waitForVisibleById("settings-group-system")`.
All other testIDs referenced by the 13 E2E spec files (auth / nutrition /
fizruk / deep-link / offline-sync / finyk / routine / hub-ux-smoke) were
already present in the corresponding source components. TypeScript
typecheck and Jest unit suite (incl. `HubSettingsPage.test.tsx`) green.
Closes P1-4 in docs/90-work/audits/2026-05-13-testing-devx-roast.md.
https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 56 minutes and 12 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏱️ CI Pipeline Duration ReportBased on the last 50 successful runs on the default branch. Overall Pipeline
Trend (last 20 runs): Per-Job Breakdown
|
…-boundary mismatch toLocalISODate uses Europe/Kyiv timezone. UTC hours 21–23 cross into the next Kyiv calendar day (UTC+2/+3 offset), causing property-test assertions that compare UTC date fields to Kyiv-formatted output to fail. Scoping generated hours to 0–20 and using fixed hours 6/20 in the time-of-day invariant test avoids the DST boundary without weakening coverage. Pre-existing bug in main (merged via PR #3402); backported fix from PR #3479. https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
Summary
settings-group-systeminHubSettingsPage.tsxby renaming the first settings-group entryidfrom"general"→"system"(3 occurrences:SETTING_GROUPS,useStatedefault, andhandleScrollfallback).auth-flows,nutrition-full,nutrition-water-barcode,fizruk-full,fizruk-measurements,deep-link,offline-sync,hub-ux-smoke,routine-full,routine-smoke,finyk-full,finyk-manual-expense,finyk-transactions) were already present in source components.docs/90-work/audits/2026-05-13-testing-devx-roast.mdfrom ⏳ PARTIAL → ✅ Closed.Governing Skill
sergeant-mobile(apps/mobilesurface — Expo + React Native + Detox)Playbook
No dedicated playbook for testID wiring; followed the testID-propagation pattern already established in the codebase (
${rootTestID}-${suffix}template literals, outermost relevant element per component).Verification
pnpm --filter @sergeant/mobile typecheck— ✅ passes (no new type errors)SERGEANT_HEAVY_OK=1 pnpm --filter @sergeant/mobile test— ✅ all suites PASS, includingHubSettingsPage.test.tsxDocs and Governance
docs/90-work/audits/2026-05-13-testing-devx-roast.md— P1-4 status updated to ✅ Closed 2026-06-09; Last validated bumped; Outstanding section updated.Risk and Rollout
Low risk — renaming a settings-group id only affects:
testIDprop generated on the tab-chip Pressable (used by Detox; no production UX change).useState("system")). The "Загальні" group is still the first and default-selected tab; itstitleandsectionsare unchanged.No API or DB changes. No shared-package changes.
Hard Rule #15 acknowledgement
Docs updated alongside code change; audit doc written in Ukrainian per convention.
https://claude.ai/code/session_01LBMY124XpqUHQ9ed8yCRzA
Generated by Claude Code
Summary by cubic
Wired the missing Detox
testIDon the mobile settings page by renaming the first group id fromgeneraltosystemso specs can selectsettings-group-system. Also fixed a timezone-related flake in@sergeant/shareddate tests; no UI change.Bug Fixes
HubSettingsPage.tsx: renamed first group id tosystem; updateduseStatedefault and scroll fallback.@sergeant/shared: constrained generated hours to 0–20 and used 06:00/20:00 in invariance tests to avoid Kyiv day-boundary crossings; behavior unchanged.Docs
Written for commit b2e8f0a. Summary will update on new commits.