mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add TextInput placeholder screenshot coverage (#57925)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/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
This commit is contained in:
1 parent
8a7dfce604
commit
579aedcbd5
1 file changed
+25
@@ -1200,6 +1200,31 @@ module.exports = [
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Placeholder ellipsizing',
|
||||
name: 'placeholderEllipsizing',
|
||||
render: function (): React.Node {
|
||||
const placeholder =
|
||||
'This placeholder is too long to fit on a single line';
|
||||
|
||||
return (
|
||||
<View>
|
||||
<ExampleTextInput
|
||||
multiline={false}
|
||||
placeholder={placeholder}
|
||||
style={{height: 40, width: 200}}
|
||||
testID="textinput-placeholder-singleline"
|
||||
/>
|
||||
<ExampleTextInput
|
||||
multiline={true}
|
||||
placeholder={placeholder}
|
||||
style={{height: 60, width: 200}}
|
||||
testID="textinput-placeholder-multiline"
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Clipping',
|
||||
name: 'clipping',
|
||||
|
||||
Reference in new issue
Block a user