Skip to content

test: use fontStyles from common.ts in BridgeStepDescription test#23659

Merged
georgewrmarshall merged 1 commit into
mainfrom
fix-bridge-test
Dec 4, 2025
Merged

test: use fontStyles from common.ts in BridgeStepDescription test#23659
georgewrmarshall merged 1 commit into
mainfrom
fix-bridge-test

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Description

This PR fixes a test that would fail after the expo-font changes in #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 #23517 (main expo-font PR)
Related to #23650 (brand font fixes PR)

Manual testing steps

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

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


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.

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>
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner December 4, 2025 08:01
@github-actions

github-actions Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-design-system All issues relating to design system in Mobile label Dec 4, 2025
@georgewrmarshall georgewrmarshall self-assigned this Dec 4, 2025
@georgewrmarshall georgewrmarshall added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Dec 4, 2025
@github-actions github-actions Bot added the size-S label Dec 4, 2025
@github-actions

github-actions Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

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

  1. No production code is modified
  2. No E2E test infrastructure is affected
  3. The test assertions remain functionally equivalent - the fontStyles values match the previously hardcoded strings
  4. This is a best practice improvement for test maintainability

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.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2025

Copy link
Copy Markdown

@georgewrmarshall georgewrmarshall added this pull request to the merge queue Dec 4, 2025
Merged via the queue into main with commit 943af77 Dec 4, 2025
174 of 176 checks passed
@georgewrmarshall georgewrmarshall deleted the fix-bridge-test branch December 4, 2025 17:42
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 4, 2025
@metamaskbot metamaskbot added the release-7.62.0 Issue or pull request that will be included in release 7.62.0 label Dec 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.62.0 Issue or pull request that will be included in release 7.62.0 size-S team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants