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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 676a3fcb8a1bed3f282644c007df577c753bd2cd
4
- data.tar.gz: 93b88e2edab30254e113a320dc3be02eeeaea1e1
3
+ metadata.gz: f4b466a8e3616557521af4f2033e2f87584f4adf
4
+ data.tar.gz: 17c49fc9ed0855534141df76a364f0fd8bc45602
5
5
  SHA512:
6
- metadata.gz: abbb790e28d66501e4bffdca62bff76925d981157f1616b5e97d75ffb0758caf70dd85488a74c8b13010d729c6f7341f8ea232800b5c75cc9c0e584bf9d90e02
7
- data.tar.gz: ef89c1a650273a2c30f50ea18b0fa51cfcb207342d83224e1a31518fa2b7bb43986d303a2f01ba649cb745ab12ce5bf2f742fcba9f43560eb48ee22a5f8c3691
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
@@ -1,3 +1,3 @@
1
1
  module Cello
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.28"
3
3
  end
@@ -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? :checkbox_is_checked?).should be true
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? :checkbox_is_unchecked?).should be true
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? :checkbox_check).should be true
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? :checkbox_uncheck).should be true
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? :element_is_real?).should be true
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? :element_click).should be true
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? :element_is_visible?).should be true
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? :element_is_enable?).should be true
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? :element_right_click).should be true
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? :element_wait_visible_for).should be true
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? :element_wait_exists_for).should be true
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 :element, :element, :id => 'elem1'
8
- element :text_field, :text_field, :id => 'text1'
9
- element :text_fieldname, :text_field, :name => 'text1'
10
- element :text_fieldxpath, :text_field, :xpah, '//*[@id="text1"]'
11
- element :checkbox, :checkbox, :id => 'check1'
12
- element :textarea, :textarea, :id => 'area1'
13
- element :radios, :radios, :name => 'items'
14
- element :select, :select, :id => 'select1'
15
- element :link, :link, :id => 'link1'
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? :select_select).should be true
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? :select_selected).should be true
13
+ (@page.methods.map.include? :test_select_selected).should be true
14
14
  end
15
15
  end
16
16
  end
@@ -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? :textarea_is_enable?).should be true
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? :textarea_clear).should be true
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? :textarea_get_text).should be true
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? :textarea_fill_with).should be true
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? :textarea_dont_contain).should be true
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? :textarea_contains).should be true
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? :textarea_text_is).should be true
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? :textarea_is_empty?).should be true
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? :textarea_text_size).should be true
34
+ (@page.methods.map.include? :test_textarea_text_size).should be true
35
35
  end
36
36
  end
37
37
  end
@@ -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? :text_field_is_enable?).should be true
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? :text_field_clear).should be true
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? :text_field_get_text).should be true
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? :text_field_fill_with).should be true
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? :text_field_dont_contain).should be true
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? :text_field_contains).should be true
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? :text_field_text_is).should be true
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? :text_field_is_empty?).should be true
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? :text_field_text_size).should be true
34
+ (@page.methods.map.include? :test_text_field_text_size).should be true
35
35
  end
36
36
  end
37
37
  end
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.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro