Skip to content

test(mobile): wire testID selectors for Detox E2E specs#3480

Merged
Skords-01 merged 9 commits into
mainfrom
claude/mobile-detox-testid-wiring
Jun 9, 2026
Merged

test(mobile): wire testID selectors for Detox E2E specs#3480
Skords-01 merged 9 commits into
mainfrom
claude/mobile-detox-testid-wiring

Conversation

@Skords-01

@Skords-01 Skords-01 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire the one missing Detox testID settings-group-system in HubSettingsPage.tsx by renaming the first settings-group entry id from "general""system" (3 occurrences: SETTING_GROUPS, useState default, and handleScroll fallback).
  • All other testIDs required by the 13 authored E2E spec files (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.
  • Update P1-4 in docs/90-work/audits/2026-05-13-testing-devx-roast.md from ⏳ PARTIAL → ✅ Closed.

Governing Skill

sergeant-mobile (apps/mobile surface — 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, including HubSettingsPage.test.tsx
  • No Detox spec files modified (constraint honoured)
  • No speculative testIDs added (only what specs reference)

Docs 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:

  1. The testID prop generated on the tab-chip Pressable (used by Detox; no production UX change).
  2. The initial active tab state (useState("system")). The "Загальні" group is still the first and default-selected tab; its title and sections are 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 testID on the mobile settings page by renaming the first group id from general to system so specs can select settings-group-system. Also fixed a timezone-related flake in @sergeant/shared date tests; no UI change.

  • Bug Fixes

    • HubSettingsPage.tsx: renamed first group id to system; updated useState default 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

    • Closed P1-4 in the Testing & DevX audit with testID wiring details.
    • Updated C3 workspace diagram metadata (last validated/next review).

Written for commit b2e8f0a. Summary will update on new commits.

Review in cubic

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
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sergeant Ready Ready Preview, Comment Jun 9, 2026 4:07pm

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Skords-01, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 73449976-9240-42cf-a734-e1f9b88f1aa9

📥 Commits

Reviewing files that changed from the base of the PR and between 6e79498 and b2e8f0a.

📒 Files selected for processing (4)
  • apps/mobile/src/core/settings/HubSettingsPage.tsx
  • docs/02-engineering/architecture/diagrams/c3-workspaces.md
  • docs/90-work/audits/2026-05-13-testing-devx-roast.md
  • packages/shared/src/utils/date.property.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/mobile-detox-testid-wiring

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/S label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

⏱️ CI Pipeline Duration Report

Based on the last 50 successful runs on the default branch.

Overall Pipeline

Metric Value
p50 6m 26s
p95 7m 55s
p99 9m 3s
Current run 41m 27s
vs p95 +423.6%

Trend (last 20 runs): ▃▃▁▂▃▃▃▂▃▃▂▂▄▃▃▆▅▄█▆

Per-Job Breakdown

Job p50 p95 p99 Current vs p95
Accessibility (axe-core) 2m 5s 2m 21s 2m 23s 0s -100.0%
Commit messages (commitlint) 0s 0s 0s 31s N/A
Critical-flow E2E (Playwright) 1m 36s 1m 44s 1m 44s 2m 29s +43.3%
Migration lint (AGENTS rule 0s 0s 0s 11s N/A
Pipeline duration (p95 trend) 26s 27s 27s
Secret scan (gitleaks) 8s 11s 11s 9s -18.2%
Smoke E2E (Playwright) 1m 26s 1m 40s 1m 40s
Test coverage (vitest) 2m 4s 2m 33s 2m 33s 11m 52s +365.4%
Workflow lint (actionlint) 7s 7s 7s 8s +14.3%
check 4m 12s 4m 54s 5m 6s 45s -84.7%
tsconfig strict guard (PR-1.A) 5s 14s 14s 6s -57.1%

⚠️ Warning: Current run (41m 27s) exceeds p95 + 20% threshold (9m 30s). Consider reviewing slow jobs.

claude added 3 commits June 9, 2026 01:52
…-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
@Skords-01 Skords-01 disabled auto-merge June 9, 2026 16:09
@Skords-01 Skords-01 merged commit d0c1f53 into main Jun 9, 2026
40 of 59 checks passed
@Skords-01 Skords-01 deleted the claude/mobile-detox-testid-wiring branch June 9, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants