Commit 943af77
test: use fontStyles from common.ts in BridgeStepDescription test (MetaMask#23659)
## **Description**
This PR fixes a test that would fail after the expo-font changes in
MetaMask#23517. The `BridgeStepDescription.test.tsx` file 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 `fontStyles` definitions from `app/styles/common.ts`, making
the test more maintainable and ensuring a single source of truth for
font families.
**Changes:**
- Import `fontStyles` from `app/styles/common.ts`
- Replace `'Geist Medium'` assertions with
`fontStyles.medium.fontFamily`
- Replace `'Geist Regular'` assertions with
`fontStyles.normal.fontFamily`
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Related to MetaMask#23517 (main expo-font PR)
Related to MetaMask#23650 (brand font fixes PR)
## **Manual testing steps**
```gherkin
Feature: BridgeStepDescription test suite
Scenario: developer runs test suite
Given the font family definitions have been updated to use hyphens
When developer runs yarn jest BridgeStepDescription.test.tsx
Then all 22 tests should pass successfully
```
## **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 `fontStyles` from `common.ts` and pass with
new font names.
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Update BridgeStepDescription tests to reference centralized fontStyles
instead of hardcoded font family strings.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4b8f8d2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent faca809 commit 943af77
1 file changed
Lines changed: 9 additions & 8 deletions
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | | - | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | | - | |
| 289 | + | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
| |||
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
302 | | - | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| |||
0 commit comments