Repository navigation
都営プレフィックスを東京都交通局に変更してnameShortと整合性を取る - #5821
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughTOEI の会社名接頭辞マッピングを Changes
🎯 3 (Moderate) | ⏱️ ~20 minutesPoem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/utils/resolveThemeForLine.test.ts (1)
80-84: TOEIテストケースが実データ形を再現できていません。Line 83 は
nameShort='東京都交通局'固定のため、nameShort='都営'の実データ形での回帰を拾えません。nameShort: '都営'(必要ならnameFull: '東京都交通局'も)を含むケースを追加してください。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/resolveThemeForLine.test.ts` around lines 80 - 84, The TOEI unit test for resolveThemeForLine uses makeCompany with nameShort='東京都交通局' which doesn't match real data; update or add the test case that builds the Line with makeCompany including nameShort: '都営' (and optionally nameFull: '東京都交通局') so resolveThemeForLine is exercised with the actual data shape; modify the existing test invocation that calls makeLine({ id: 99301, company: makeCompany('東京都交通局') }) to use makeCompany({ nameShort: '都営', nameFull: '東京都交通局' }) or add a new it(...) case asserting the same expected result.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/utils/resolveThemeForLine.ts`:
- Line 20: resolveThemeForLine.ts のテーマ判定で '東京都交通局'
だけをキーにしているため、line.company?.nameShort が '都営' のデータ(例: line id 99301)が一致せず TOEI
判定が漏れています。APP_THEME.TOEI のエントリ(現在の '東京都交通局')に '都営' を併記するか、または
resolveThemeForLine の判定ロジック(関数名や該当ループ)で line.company?.nameFull や
line.company?.name も検査対象に追加して、nameShort が '都営' のケースも TOEI と判定されるようにしてください。
---
Nitpick comments:
In `@src/utils/resolveThemeForLine.test.ts`:
- Around line 80-84: The TOEI unit test for resolveThemeForLine uses makeCompany
with nameShort='東京都交通局' which doesn't match real data; update or add the test
case that builds the Line with makeCompany including nameShort: '都営' (and
optionally nameFull: '東京都交通局') so resolveThemeForLine is exercised with the
actual data shape; modify the existing test invocation that calls makeLine({ id:
99301, company: makeCompany('東京都交通局') }) to use makeCompany({ nameShort: '都営',
nameFull: '東京都交通局' }) or add a new it(...) case asserting the same expected
result.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0e23e104-1715-4808-a48e-186030c61812
📒 Files selected for processing (2)
src/utils/resolveThemeForLine.test.tssrc/utils/resolveThemeForLine.ts
Summary by CodeRabbit
リリースノート
バグ修正
テスト