cello 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cello/pageobjects/html_elements/element_helper.rb +20 -0
- data/lib/cello/version.rb +1 -1
- data/spec/element_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 676a3fcb8a1bed3f282644c007df577c753bd2cd
|
4
|
+
data.tar.gz: 93b88e2edab30254e113a320dc3be02eeeaea1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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
|
|