如何解决无法在复合模态组件中选择选项
askAboutNotifications = async (forceModal: ?boolean = false) => {
const wasAsked = await Storage.getAskedAboutNotificationsString()
if (wasAsked !== 'asked' || forceModal) {
this.props.openModal({
title: 'Turn on order reminders',description:
'Never miss a thing,actions: [
{
label: 'Yes,please',callback: (): Promise<void> =>
this._handleConfigNotifications(true),},{
label: 'No,later maybe',callback: (): Promise<void> =>
this._handleConfigNotifications(false),],})
}
}
Detox 能够查看 Modal 并且通过了。
await waitFor(element(by.label('Turn on order reminders'))).toBeVisible().withTimeout(5000)
但这会因超时而失败
await waitFor(element(by.label('Yes,please'))).toBeVisible().withTimeout(5000)
有没有办法在不修改或对原始组件进行一些修改的情况下进行交互。已被此问题完全阻止。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。