mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
[fix] Image tests
This commit is contained in:
@@ -20,7 +20,7 @@ const styles = StyleSheet.create({
|
|||||||
backgroundColor: 'lightgray',
|
backgroundColor: 'lightgray',
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
backgroundRepeat: 'no-repeat',
|
backgroundRepeat: 'no-repeat',
|
||||||
backgroundSize: '100% 100%'
|
backgroundSize: 'cover'
|
||||||
},
|
},
|
||||||
img: {
|
img: {
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
|
|||||||
@@ -88,17 +88,18 @@ suite('components/TextInput', () => {
|
|||||||
|
|
||||||
test('prop "maxNumberOfLines"', () => {
|
test('prop "maxNumberOfLines"', () => {
|
||||||
const style = { borderWidth: 0, fontSize: 20, lineHeight: 1 }
|
const style = { borderWidth: 0, fontSize: 20, lineHeight: 1 }
|
||||||
const value = (() => {
|
const generateValue = () => {
|
||||||
let str = ''
|
let str = ''
|
||||||
while (str.length < 100) str += 'x'
|
while (str.length < 100) str += 'x'
|
||||||
return str
|
return str
|
||||||
}())
|
}
|
||||||
|
|
||||||
let dom = utils.renderAndInject(
|
let dom = utils.renderAndInject(
|
||||||
<TextInput
|
<TextInput
|
||||||
maxNumberOfLines={3}
|
maxNumberOfLines={3}
|
||||||
multiline
|
multiline
|
||||||
style={style}
|
style={style}
|
||||||
value={value}
|
value={generateValue()}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
const height = dom.getBoundingClientRect().height
|
const height = dom.getBoundingClientRect().height
|
||||||
|
|||||||
Reference in New Issue
Block a user