Skip to content

Badge - add BadgeDriver and scope inner testIDs#3993

Open
MIchaelZablianov wants to merge 2 commits intomasterfrom
feat/badge-driver-and-scoped-testIDs
Open

Badge - add BadgeDriver and scope inner testIDs#3993
MIchaelZablianov wants to merge 2 commits intomasterfrom
feat/badge-driver-and-scoped-testIDs

Conversation

@MIchaelZablianov
Copy link
Copy Markdown
Collaborator

@MIchaelZablianov MIchaelZablianov commented May 3, 2026

Description

Badge - add BadgeDriver and scope inner testIDs (${testID}.label, ${testID}.icon)

This PR:

  • Adds BadgeDriver next to the component (badge/badge.driver.ts), composing useComponentDriver, usePressableDriver, TextDriver, and ImageDriver. Exposes getLabel, getIcon, getStyle, getSize.
  • Scopes Badge's inner testIDs:
    • Label: ${testID}.label (falls back to the legacy "badge" when no testID is provided, to preserve backward compatibility for any existing tests).
    • Icon: ${testID}.icon (only when testID is provided).
  • Re-exports BadgeDriver from src/testkit/index.ts.
  • Adds badge.driver.spec.tsx covering label text, icon presence, and size.

This unblocks PR https://github.com/wix-private/wix-react-native-ui-lib/pull/6104 which needs to compose BadgeDriver from the public testkit.

Changelog

Badge - add BadgeDriver and scope inner testIDs (${testID}.label, ${testID}.icon)

Additional info

https://wix.atlassian.net/browse/MADS-4754

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

✅ PR Description Validation Passed

All required sections are properly filled out:

  • Description
  • Changelog
  • Additional info

Your PR is good for review! 🚀


This validation ensures all sections from the PR template are properly filled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants