Skip to content

Commit 579aedc

Browse files
Abbondanzometa-codesync[bot]
authored andcommitted
Add TextInput placeholder screenshot coverage (#57925)
Summary: Pull Request resolved: #57925 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] Reviewed By: christophpurrer Differential Revision: D115731487 fbshipit-source-id: bf13562b181f9c104056638c7cfa1d57416a3364
1 parent 8a7dfce commit 579aedc

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)