当React Native应用程序

时间:2016-07-07 17:11:43

标签: react-native calabash calabash-ios

我们使用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>
));

这是模拟器上的显示:

On Simulator

这是截图(例如在screenshot之后运行calabash-ios console):

On screenshot

没有borderWidth,它就可以了!

我们在RN 0.26.2,使用葫芦黄瓜0.19.2。

任何帮助都将非常感激! 谢谢!

1 个答案:

答案 0 :(得分:0)

通过使用calabash-server更新calabash-ios download来解决问题:)