我们使用Calabash进行功能测试以及截取我们的本机应用程序的截图,但我们遇到了截屏问题。
当一个组件有边框时,屏幕截图会搞砸:
例如,使用index.ios.js
,例如:
import React from 'react';
import { AppRegistry, View } from 'react-native';
AppRegistry.registerComponent('App', () => () => (
<View style={{flex: 1, backgroundColor: 'blue', justifyContent: 'center', alignItems: 'center'}}>
<View style={{height: 100, width: 200, backgroundColor: 'red', borderColor: 'green', borderWidth: 10}}>
</View>
</View>
));
这是模拟器上的显示:
这是截图(例如在screenshot
之后运行calabash-ios console
):
没有borderWidth
,它就可以了!
我们在RN 0.26.2,使用葫芦黄瓜0.19.2。
任何帮助都将非常感激! 谢谢!
答案 0 :(得分:0)
通过使用calabash-server
更新calabash-ios download
来解决问题:)