cello 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75be8b6ec1bd766a60cde884e30bad66fa448ddd
4
- data.tar.gz: 81ee6fa326fe7a30aa8f6131d39a9c422ef538ba
3
+ metadata.gz: 676a3fcb8a1bed3f282644c007df577c753bd2cd
4
+ data.tar.gz: 93b88e2edab30254e113a320dc3be02eeeaea1e1
5
5
  SHA512:
6
- metadata.gz: 14ef9627ade0b1dd73e158ff7af4841cf376e970eec3cc02f4405b6a39a135910dc78519f87992322f3e8864760fd076d6fff83c3ec230dc46d5481b055756bd
7
- data.tar.gz: a2cb87a7f8f8db0b8cb33492b1352ddec73110869bc9b01d7c4920093c9d1a8c361c48e447fd3597e94c79d95cbb7444a01c76da99b8b816c681dd56100a60e1
6
+ metadata.gz: abbb790e28d66501e4bffdca62bff76925d981157f1616b5e97d75ffb0758caf70dd85488a74c8b13010d729c6f7341f8ea232800b5c75cc9c0e584bf9d90e02
7
+ data.tar.gz: ef89c1a650273a2c30f50ea18b0fa51cfcb207342d83224e1a31518fa2b7bb43986d303a2f01ba649cb745ab12ce5bf2f742fcba9f43560eb48ee22a5f8c3691
@@ -58,6 +58,26 @@ module Cello
58
58
  #}
59
59
  end
60
60
 
61
+ define_method "#{name}_wait_exists_for" do |timeout|
62
+ t = 0
63
+ while send(name).exists? || t < timeout do
64
+ sleep 1
65
+ t += 1
66
+ end
67
+ true if t < timeout
68
+ false if t >= timeout
69
+ end
70
+
71
+ define_method "#{name}_wait_visible_for" do |timeout|
72
+ t = 0
73
+ while send(name).visible? || t < timeout do
74
+ sleep 1
75
+ t += 1
76
+ end
77
+ true if t < timeout
78
+ false if t >= timeout
79
+ end
80
+
61
81
  method_name = "define_extras_for_#{type}"
62
82
  send(method_name, name) if respond_to? method_name
63
83
  end
data/lib/cello/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cello
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  end
data/spec/element_spec.rb CHANGED
@@ -21,6 +21,12 @@ describe "Class with element" do
21
21
  it "Click with the right button on the element method exists" do
22
22
  (@page.methods.map.include? :element_right_click).should be true
23
23
  end
24
+ it "Wait visible for on the element method exists" do
25
+ (@page.methods.map.include? :element_wait_visible_for).should be true
26
+ end
27
+ it "Wait exists for on the element method exists" do
28
+ (@page.methods.map.include? :element_wait_exists_for).should be true
29
+ end
24
30
  end
25
31
  end
26
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro