如何在 Cucumber 中测试对话框?
我在 Rails 中使用 jquery UI 对话框。
如何使用 Cucumber 来测试打开对话框?我有一个注册对话框,然后是另一个确认对话框。后者在成功注册后出现。
但是我注意到,当黄瓜按下注册按钮提交时,它从未真正测试其他弹出对话框。如果我禁用第二个对话框的打开,黄瓜仍然可以通过。看起来模态是不可见的,但黄瓜可以看到。有人遇到过这种情况吗?
提前致谢!
I am using jquery UI dialogs in Rails.
How do you use cucumber to test for opening dialogs? I have a registration dialog and after that another confirmation dialog. The latter appearing after successful signup.
However I noticed that when cucumber presses sign up button to submit, it never really tests for the other pop up dialog. And if I disabled the opening of the 2nd dialog, cucumber still passes. It seems the modal is invisible but it can be seen by cucumber. Has anyone encountered this?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
引入包装器步骤 - 它将基本上评估步骤并将其范围限定为对话框容器。
之后,您将能够添加类似
P.S: 不要忘记将正确的类放入步骤中的步骤,我忘记了 jQuery UI 中使用的是哪一个,但我相信它应该类似于“.dialog”
Introduce wrapper step - it will basically evaluate step with scoping it to dialog container.
After that you'll be able to add steps like
P.S: Don't forget to put correct class into the step, I forget which one is used in jQuery UI but I believe that it should be something like ".dialog"