【发布时间】:2019-10-24 08:49:02
【问题描述】:
我正在对一个 React Native ios 应用程序进行排毒测试。用户需要确认他们的密码才能启用提交按钮。有什么方法可以让 Detox 对禁用的按钮状态进行测试?我在 Detox 匹配器页面上没有看到任何似乎支持此功能的匹配器,该功能在 JSX 语句中被编码为“禁用”属性。
<Button
small
title=' Save '
buttonStyle={[globalStyle.buttons.buttonPrimary, globalStyle.buttons.smallButton]}
disabled={Object.values(this.state.inCircleObj).length === 0 || this.props.circlePropLoading}
containerViewStyle={{ marginRight: 20 }}
onPress={() => { firebase.analytics().logEvent(`${this.constructor.name}_${SAVE_EDIT_CIRCLE}`); this.updateCircle() }}
fontSize={14} />
【问题讨论】: