使用葫芦进行表单验证

时间:2013-10-25 14:26:12

标签: cucumber calabash

我正在尝试使用以下代码验证表单:

然后我应该看到以下字段:|新客户||名称||年龄||地址||电子邮件|

我累了:

Then /^I should see the following activities:$/ do |fields|
    @data = query("TextView","text")
    expected_activities.diff! @data
end 

Then /^I should see the following activities:$/ do |expected|
    @data = query("TextView","text")
    for i in 0..expected.count-1
      if (expected[i] != @data[i])
        assert false
      end
    end
  end 

感谢。

0 个答案:

没有答案