Skip to content

Commit 77a45d1

Browse files
chore(component-scaffold): update scaffold checklist for Foo component to clarify recommendations on types and test IDs
1 parent 40c2887 commit 77a45d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

domains/ui/skills/component-scaffold/repos/metamask-mobile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ Re-exports point at the component's own `index.ts` (`./Foo`), not directly at th
378378
## 11. Scaffold checklist
379379

380380
- [ ] Directory with `PascalCase` name in the correct location (Section 1)
381-
- [ ] `Foo.types.ts` — `FooProps` interface with JSDoc per prop, optional `testID?: string`
382-
- [ ] `Foo.testIds.ts` — `FooSelectorsIDs as const`, `SCREAMING_SNAKE` keys, `dash-case` values prefixed with kebab component name
381+
- [ ] `Foo.types.ts` — recommended; `FooProps` interface with JSDoc per prop, optional `testID?: string`; inline interface acceptable only for trivial components with 1–2 props
382+
- [ ] `Foo.testIds.ts` — recommended; `FooSelectorsIDs as const`, `SCREAMING_SNAKE` keys, `dash-case` values prefixed with kebab component name; skip only when the component has no testable elements
383383
- [ ] `Foo.tsx` — primitives from `@metamask/design-system-react-native` (or `app/component-library` for MetaMask-specific components with no MMDS equivalent and no `@deprecated` annotation); no `View`, no `StyleSheet`; `strings()` for all user-visible copy; every asserted element has `testID` wired from the testIds constant
384384
- [ ] `index.ts` — exports `default`, `type FooProps`, and `FooSelectorsIDs`
385385
- [ ] `Foo.test.tsx` — colocated (not in `__tests__/`); testIds via constant (never raw strings); `toBeOnTheScreen()` for presence, `.toBeNull()` for absence; `beforeEach(jest.clearAllMocks)`

0 commit comments

Comments
 (0)