cello 0.0.27 → 0.0.28
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 +4 -4
- data/lib/cello/pageobjects/html_elements/element_helper.rb +2 -2
- data/lib/cello/version.rb +1 -1
- data/spec/checkbox_spec.rb +4 -4
- data/spec/element_spec.rb +10 -7
- data/spec/mock/page.rb +9 -9
- data/spec/select_spec.rb +2 -2
- data/spec/textarea_spec.rb +9 -9
- data/spec/textfield_spec.rb +9 -9
- 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: f4b466a8e3616557521af4f2033e2f87584f4adf
|
4
|
+
data.tar.gz: 17c49fc9ed0855534141df76a364f0fd8bc45602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf7ef1bb555a5b06b5ebe24951776c43d57b4c6c3e55bb971e4edb0b1ea20339e3f429027f36379cb28ed2cb3226e59c3af6536f30c58a604306b955593d9454
|
7
|
+
data.tar.gz: 8a7133c2bbb3c76ee284f80dda481bdc64558f5586d2c7a5b8cd2a2a74dc1d138c481b70381e67516ee550b369caa795abc53ee76753831f2dc0f7dd9de0221e
|
@@ -60,7 +60,7 @@ module Cello
|
|
60
60
|
|
61
61
|
define_method "#{name}_wait_exists_for" do |timeout|
|
62
62
|
t = 0
|
63
|
-
while send(name).exists? || t < timeout do
|
63
|
+
while !send(name).exists? || t < timeout do
|
64
64
|
sleep 1
|
65
65
|
t += 1
|
66
66
|
end
|
@@ -70,7 +70,7 @@ module Cello
|
|
70
70
|
|
71
71
|
define_method "#{name}_wait_visible_for" do |timeout|
|
72
72
|
t = 0
|
73
|
-
while send(name).visible? || t < timeout do
|
73
|
+
while !send(name).visible? || t < timeout do
|
74
74
|
sleep 1
|
75
75
|
t += 1
|
76
76
|
end
|
data/lib/cello/version.rb
CHANGED
data/spec/checkbox_spec.rb
CHANGED
@@ -7,16 +7,16 @@ describe Cello::PageObjects::CheckboxHelper do
|
|
7
7
|
@page = Mock::Site::MockPage.new "foo"
|
8
8
|
end
|
9
9
|
it "Verify if is checked method exists" do
|
10
|
-
(@page.methods.map.include? :
|
10
|
+
(@page.methods.map.include? :test_checkbox_is_checked?).should be true
|
11
11
|
end
|
12
12
|
it "Verify if there it is unchecked" do
|
13
|
-
(@page.methods.map.include? :
|
13
|
+
(@page.methods.map.include? :test_checkbox_is_unchecked?).should be true
|
14
14
|
end
|
15
15
|
it "Check a Checkbox" do
|
16
|
-
(@page.methods.map.include? :
|
16
|
+
(@page.methods.map.include? :test_checkbox_check).should be true
|
17
17
|
end
|
18
18
|
it "Clear a Checkbox" do
|
19
|
-
(@page.methods.map.include? :
|
19
|
+
(@page.methods.map.include? :test_checkbox_uncheck).should be true
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
data/spec/element_spec.rb
CHANGED
@@ -6,26 +6,29 @@ describe "Class with element" do
|
|
6
6
|
before(:all) do
|
7
7
|
@page = Mock::Site::MockPage.new "foo"
|
8
8
|
end
|
9
|
+
it "Verify if the get native element exists" do
|
10
|
+
(@page.methods.map.include? :test_element).should be true
|
11
|
+
end
|
9
12
|
it "Verify if the element exists method exists" do
|
10
|
-
(@page.methods.map.include? :
|
13
|
+
(@page.methods.map.include? :test_element_is_real?).should be true
|
11
14
|
end
|
12
15
|
it "Click on the element method exists" do
|
13
|
-
(@page.methods.map.include? :
|
16
|
+
(@page.methods.map.include? :test_element_click).should be true
|
14
17
|
end
|
15
18
|
it "Verify if the element is visible method exists" do
|
16
|
-
(@page.methods.map.include? :
|
19
|
+
(@page.methods.map.include? :test_element_is_visible?).should be true
|
17
20
|
end
|
18
21
|
it "Verify if the element is enable methods exists" do
|
19
|
-
(@page.methods.map.include? :
|
22
|
+
(@page.methods.map.include? :test_element_is_enable?).should be true
|
20
23
|
end
|
21
24
|
it "Click with the right button on the element method exists" do
|
22
|
-
(@page.methods.map.include? :
|
25
|
+
(@page.methods.map.include? :test_element_right_click).should be true
|
23
26
|
end
|
24
27
|
it "Wait visible for on the element method exists" do
|
25
|
-
(@page.methods.map.include? :
|
28
|
+
(@page.methods.map.include? :test_element_wait_visible_for).should be true
|
26
29
|
end
|
27
30
|
it "Wait exists for on the element method exists" do
|
28
|
-
(@page.methods.map.include? :
|
31
|
+
(@page.methods.map.include? :test_element_wait_exists_for).should be true
|
29
32
|
end
|
30
33
|
end
|
31
34
|
end
|
data/spec/mock/page.rb
CHANGED
@@ -4,15 +4,15 @@ require File.dirname(__FILE__) + "/../spec_helper"
|
|
4
4
|
module Mock
|
5
5
|
module Site
|
6
6
|
class MockPage < Cello::PageObjects::Page
|
7
|
-
element :
|
8
|
-
element :
|
9
|
-
element :
|
10
|
-
element :
|
11
|
-
element :
|
12
|
-
element :
|
13
|
-
element :
|
14
|
-
element :
|
15
|
-
element :
|
7
|
+
element :test_element, :element, :id => 'elem1'
|
8
|
+
element :test_text_field, :text_field, :id => 'text1'
|
9
|
+
element :test_text_fieldname, :text_field, :name => 'text1'
|
10
|
+
element :test_text_fieldxpath, :text_field, :xpah, '//*[@id="text1"]'
|
11
|
+
element :test_checkbox, :checkbox, :id => 'check1'
|
12
|
+
element :test_textarea, :textarea, :id => 'area1'
|
13
|
+
element :test_radios, :radios, :name => 'items'
|
14
|
+
element :test_select, :select, :id => 'select1'
|
15
|
+
element :test_link, :link, :id => 'link1'
|
16
16
|
|
17
17
|
def get_url
|
18
18
|
'file://' + File.dirname(__FILE__) + '/../site/inputs.html'
|
data/spec/select_spec.rb
CHANGED
@@ -7,10 +7,10 @@ describe Cello::PageObjects::SelectHelper do
|
|
7
7
|
@page = Mock::Site::MockPage.new "foo"
|
8
8
|
end
|
9
9
|
it "Select an option method exists" do
|
10
|
-
(@page.methods.map.include? :
|
10
|
+
(@page.methods.map.include? :test_select_select).should be true
|
11
11
|
end
|
12
12
|
it "return the selected option method exists" do
|
13
|
-
(@page.methods.map.include? :
|
13
|
+
(@page.methods.map.include? :test_select_selected).should be true
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/spec/textarea_spec.rb
CHANGED
@@ -7,31 +7,31 @@ describe Cello::PageObjects::TextareaHelper do
|
|
7
7
|
@page = Mock::Site::MockPage.new "foo"
|
8
8
|
end
|
9
9
|
it "Veify if the textarea is enable method exists" do
|
10
|
-
(@page.methods.map.include? :
|
10
|
+
(@page.methods.map.include? :test_textarea_is_enable?).should be true
|
11
11
|
end
|
12
12
|
it "Clear the textarea method exists" do
|
13
|
-
(@page.methods.map.include? :
|
13
|
+
(@page.methods.map.include? :test_textarea_clear).should be true
|
14
14
|
end
|
15
15
|
it "Get the text from the textarea" do
|
16
|
-
(@page.methods.map.include? :
|
16
|
+
(@page.methods.map.include? :test_textarea_get_text).should be true
|
17
17
|
end
|
18
18
|
it "Fill the textarea with some specific text" do
|
19
|
-
(@page.methods.map.include? :
|
19
|
+
(@page.methods.map.include? :test_textarea_fill_with).should be true
|
20
20
|
end
|
21
21
|
it "Verify if the textarea does not contain some text" do
|
22
|
-
(@page.methods.map.include? :
|
22
|
+
(@page.methods.map.include? :test_textarea_dont_contain).should be true
|
23
23
|
end
|
24
24
|
it "Verify if the textarea contains some text" do
|
25
|
-
(@page.methods.map.include? :
|
25
|
+
(@page.methods.map.include? :test_textarea_contains).should be true
|
26
26
|
end
|
27
27
|
it "Verify if the containt of the textarea is exacly some text" do
|
28
|
-
(@page.methods.map.include? :
|
28
|
+
(@page.methods.map.include? :test_textarea_text_is).should be true
|
29
29
|
end
|
30
30
|
it "Verify if the textarea is empty" do
|
31
|
-
(@page.methods.map.include? :
|
31
|
+
(@page.methods.map.include? :test_textarea_is_empty?).should be true
|
32
32
|
end
|
33
33
|
it "Get the size of the containt of the textarea" do
|
34
|
-
(@page.methods.map.include? :
|
34
|
+
(@page.methods.map.include? :test_textarea_text_size).should be true
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/spec/textfield_spec.rb
CHANGED
@@ -7,31 +7,31 @@ describe Cello::PageObjects::TextfieldHelper do
|
|
7
7
|
@page = Mock::Site::MockPage.new "foo"
|
8
8
|
end
|
9
9
|
it "Veify if the textfield is enabled" do
|
10
|
-
(@page.methods.map.include? :
|
10
|
+
(@page.methods.map.include? :test_text_field_is_enable?).should be true
|
11
11
|
end
|
12
12
|
it "Clear the textfield" do
|
13
|
-
(@page.methods.map.include? :
|
13
|
+
(@page.methods.map.include? :test_text_field_clear).should be true
|
14
14
|
end
|
15
15
|
it "Get the text from the textfield" do
|
16
|
-
(@page.methods.map.include? :
|
16
|
+
(@page.methods.map.include? :test_text_field_get_text).should be true
|
17
17
|
end
|
18
18
|
it "Fill the textfield with some specific text" do
|
19
|
-
(@page.methods.map.include? :
|
19
|
+
(@page.methods.map.include? :test_text_field_fill_with).should be true
|
20
20
|
end
|
21
21
|
it "Verify if the textfield does not contain some text" do
|
22
|
-
(@page.methods.map.include? :
|
22
|
+
(@page.methods.map.include? :test_text_field_dont_contain).should be true
|
23
23
|
end
|
24
24
|
it "Verify if the textfield contains some text" do
|
25
|
-
(@page.methods.map.include? :
|
25
|
+
(@page.methods.map.include? :test_text_field_contains).should be true
|
26
26
|
end
|
27
27
|
it "Verify if the containt of the textfield is exacly some text" do
|
28
|
-
(@page.methods.map.include? :
|
28
|
+
(@page.methods.map.include? :test_text_field_text_is).should be true
|
29
29
|
end
|
30
30
|
it "Verify if the textfield is empty" do
|
31
|
-
(@page.methods.map.include? :
|
31
|
+
(@page.methods.map.include? :test_text_field_is_empty?).should be true
|
32
32
|
end
|
33
33
|
it "Get the size of the containt of the textfield" do
|
34
|
-
(@page.methods.map.include? :
|
34
|
+
(@page.methods.map.include? :test_text_field_text_size).should be true
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|