【问题标题】:Checking for disabled button state with Detox使用 Detox 检查禁用按钮状态
【发布时间】: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} />

【问题讨论】:

    标签: reactjs detox


    【解决方案1】:

    您可以在 detox GitHub 上查看 that thread 关于此问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-28
      • 2021-01-28
      • 2016-10-20
      • 2014-09-04
      • 1970-01-01
      • 2017-03-08
      相关资源
      最近更新 更多