Skip to content

Commit b997763

Browse files
Abbondanzometa-codesync[bot]
authored andcommitted
Add TextInput placeholder screenshot coverage
Summary: Add RNTester screenshot coverage for single-line and multiline `TextInput` placeholders on Android and iOS. The test verifies that a long single-line placeholder is ellipsized while a multiline placeholder wraps. Changelog: [Internal] Differential Revision: D115731487
1 parent c2813be commit b997763

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

‎packages/rn-tester/js/examples/TextInput/TextInputSharedExamples.js‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,31 @@ module.exports = [
12001200
);
12011201
},
12021202
},
1203+
{
1204+
title: 'Placeholder ellipsizing',
1205+
name: 'placeholderEllipsizing',
1206+
render: function (): React.Node {
1207+
const placeholder =
1208+
'This placeholder is too long to fit on a single line';
1209+
1210+
return (
1211+
<View>
1212+
<ExampleTextInput
1213+
multiline={false}
1214+
placeholder={placeholder}
1215+
style={{height: 40, width: 200}}
1216+
testID="textinput-placeholder-singleline"
1217+
/>
1218+
<ExampleTextInput
1219+
multiline={true}
1220+
placeholder={placeholder}
1221+
style={{height: 60, width: 200}}
1222+
testID="textinput-placeholder-multiline"
1223+
/>
1224+
</View>
1225+
);
1226+
},
1227+
},
12031228
{
12041229
title: 'Clipping',
12051230
name: 'clipping',

0 commit comments

Comments
 (0)