test: use fontStyles from common.ts in BridgeStepDescription test#23659
Conversation
Replace hardcoded font family assertions with references to centralized fontStyles definitions. This prevents test failures when font file names change (e.g., from 'Geist Medium' to 'Geist-Medium'). Changes: - Import fontStyles from app/styles/common.ts - Replace 'Geist Medium' assertions with fontStyles.medium.fontFamily - Replace 'Geist Regular' assertions with fontStyles.normal.fontFamily This ensures a single source of truth for font families and makes the test more maintainable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe change is limited to a unit test file (BridgeStepDescription.test.tsx) in the Bridge component. The modification is purely a refactoring of test assertions - replacing hardcoded font family strings ('Geist Medium', 'Geist Regular') with references to the fontStyles object from the common styles module. This makes the tests more maintainable by using the same source of truth as the production code. Key observations:
Since this is only a unit test refactoring with no impact on production code or E2E testing infrastructure, no E2E tests need to be run. |
|



Description
This PR fixes a test that would fail after the expo-font changes in #23517. The
BridgeStepDescription.test.tsxfile had hardcoded font family assertions (e.g.,'Geist Medium','Geist Regular') that will break when font file names change to hyphenated format (e.g.,'Geist-Medium','Geist-Regular').Instead of updating to new hardcoded values, this PR references the centralized
fontStylesdefinitions fromapp/styles/common.ts, making the test more maintainable and ensuring a single source of truth for font families.Changes:
fontStylesfromapp/styles/common.ts'Geist Medium'assertions withfontStyles.medium.fontFamily'Geist Regular'assertions withfontStyles.normal.fontFamilyChangelog
CHANGELOG entry: null
Related issues
Related to #23517 (main expo-font PR)
Related to #23650 (brand font fixes PR)
Manual testing steps
Screenshots/Recordings
N/A - Test-only change
Before
Test assertions used hardcoded font family strings that would fail after font renaming.
After
Test assertions reference
fontStylesfromcommon.tsand pass with new font names.Pre-merge author checklist
Pre-merge reviewer checklist
🤖 Generated with Claude Code
Note
Update BridgeStepDescription tests to reference centralized fontStyles instead of hardcoded font family strings.
Written by Cursor Bugbot for commit 4b8f8d2. This will update automatically on new commits. Configure here.