kendo-page-object-widgets 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 720d68e19fcae0c6ef3ef04767dbdf99bc743c6b
4
+ data.tar.gz: 87d775b248deeaef06c423d8105f315b7e1e43f4
5
+ SHA512:
6
+ metadata.gz: 8e34dd738584db4c45ac4de1acf081fd1dcb3e94e7fa4d4f72322e1acba08d2e600d1363e8cfa9d31787f8330f73c095865076fad2c429bddd3decddf0a7c877
7
+ data.tar.gz: d67ba86adbc79af197f8745666d5339ea2238d2d6b19dee93c66e1b1fb4538bd48114907f3eebb69195ce848a84fa9751f88a0793cd3645e5357aec3af70105a
data/.gitignore CHANGED
@@ -1,10 +1,10 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .idea/
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .idea/
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --format documentation
2
- --color
1
+ --format documentation
2
+ --color
@@ -1,3 +1,3 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in kendo-page-object-widgets.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in kendo-page-object-widgets.gemspec
4
+ gemspec
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Kyle McKee
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Kyle McKee
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,39 +1,39 @@
1
- # Kendo::Page::Object::Widgets
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/kendo/page/object/widgets`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'kendo-page-object-widgets'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install kendo-page-object-widgets
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- 1. Fork it ( https://github.com/[my-github-username]/kendo-page-object-widgets/fork )
36
- 2. Create your feature branch (`git checkout -b my-new-feature`)
37
- 3. Commit your changes (`git commit -am 'Add some feature'`)
38
- 4. Push to the branch (`git push origin my-new-feature`)
39
- 5. Create a new Pull Request
1
+ # Kendo::Page::Object::Widgets
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/kendo/page/object/widgets`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'kendo-page-object-widgets'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install kendo-page-object-widgets
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it ( https://github.com/[my-github-username]/kendo-page-object-widgets/fork )
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create a new Pull Request
data/Rakefile CHANGED
@@ -1,2 +1,7 @@
1
- require "bundler/gem_tasks"
2
-
1
+ require "bundler/gem_tasks"
2
+ require 'cucumber'
3
+ require 'cucumber/rake/task'
4
+
5
+ Cucumber::Rake::Task.new(:features) do |t|
6
+ t.cucumber_opts = "features --format pretty"
7
+ end
@@ -1,29 +1,32 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "kendo-page-object-widgets"
8
- spec.version = KendoPageObjectWidgets::VERSION
9
- spec.authors = ["Kyle McKee"]
10
- spec.email = ["mckee.kyle@gmail.com"]
11
-
12
- if spec.respond_to?(:metadata)
13
- spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
14
- end
15
-
16
- spec.summary = %q{Kendo Widgets}
17
- spec.description = %q{This gem adds kendo widgets to your page-objects}
18
- spec.homepage = "http://github.sherwin.com/kxm827/kendo-page-object-widgets"
19
- spec.license = "MIT"
20
-
21
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
- spec.bindir = "exe"
23
- #spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
- spec.require_paths = ["lib"]
25
-
26
- spec.add_development_dependency "bundler", "~> 1.8"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_dependency "page-object"
29
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "kendo-page-object-widgets"
8
+ spec.version = KendoPageObjectWidgets::VERSION
9
+ spec.authors = ["Mosaic Team"]
10
+ spec.email = ["mosaic.development@sherwin.com"]
11
+
12
+ if spec.respond_to?(:metadata)
13
+ spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
14
+ end
15
+
16
+ spec.summary = %q{Kendo Widgets}
17
+ spec.description = %q{This gem adds kendo widgets to your page-objects}
18
+ spec.homepage = "http://github.sherwin.com/kxm827/kendo-page-object-widgets"
19
+ spec.license = "MIT"
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = "exe"
23
+ #spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.8"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "cucumber", "=1.3"
29
+ spec.add_development_dependency "rspec"
30
+ spec.add_dependency "page-object"
31
+ spec.add_dependency "require_all"
32
+ end
@@ -1,14 +1,13 @@
1
- require 'version'
2
- require 'page-object'
3
- require_relative 'widgets/kendo_auto_complete_input'
4
- require_relative 'widgets/kendo_auto_complete_select_list'
5
- require_relative 'widgets/kendo_cascading_select_list'
6
- require_relative 'widgets/kendo_select_list'
7
-
8
- module KendoPageObjectWidgets
9
- PageObject.register_widget(:auto_complete_input, Widgets::KendoAutoCompleteInput, 'text_field')
10
- PageObject.register_widget(:auto_complete_select_list, Widgets::KendoAutoCompleteSelectList, 'text_field')
11
- PageObject.register_widget(:cascading_drop_down, Widgets::KendoCascadingSelectList, 'text_field')
12
- PageObject.register_widget(:kendo_select_list, Widgets::KendoSelectList, 'text_field')
13
- end
14
-
1
+ require 'version'
2
+ require 'page-object'
3
+ require_relative 'widgets/kendo_auto_complete_input'
4
+ require_relative 'widgets/kendo_combobox_auto_complete'
5
+ require_relative 'widgets/kendo_cascading_select_list'
6
+ require_relative 'widgets/kendo_select_list'
7
+
8
+ module KendoPageObjectWidgets
9
+ PageObject.register_widget(:auto_complete_input, Widgets::KendoAutoCompleteInput, 'text_field')
10
+ PageObject.register_widget(:combobox_auto_complete, Widgets::KendoComboboxAutoComplete, 'text_field')
11
+ PageObject.register_widget(:cascading_drop_down, Widgets::KendoCascadingSelectList, 'text_field')
12
+ PageObject.register_widget(:kendo_select_list, Widgets::KendoSelectList, 'text_field')
13
+ end
@@ -1,3 +1,3 @@
1
- module KendoPageObjectWidgets
2
- VERSION = "0.1.0"
3
- end
1
+ module KendoPageObjectWidgets
2
+ VERSION = "0.2.0"
3
+ end
@@ -4,6 +4,10 @@ module KendoPageObjectWidgets
4
4
 
5
5
  def self.accessor_methods(accessor, name)
6
6
 
7
+ accessor.send :define_method, "#{name}" do
8
+ self.send("#{name}_element").value
9
+ end
10
+
7
11
  accessor.send :define_method, "#{name}=" do |value|
8
12
  self.send("#{name}_element").value= value
9
13
  self.send("#{name}_options_container").when_visible
@@ -12,14 +16,34 @@ module KendoPageObjectWidgets
12
16
 
13
17
  accessor.send :define_method, "#{name}_text=" do |value|
14
18
  self.send("#{name}_element").append(value)
19
+ sleep 0.1
15
20
  end
16
21
 
17
22
  accessor.send :define_method, "#{name}_valid?" do
18
23
  !self.send("#{name}_element").attribute('class').include? 'input-validation-error'
19
24
  end
20
25
 
26
+ accessor.send :define_method, "#{name}_suggestions" do
27
+ options = self.send("#{name}_options_list")
28
+ options.map { |li| li.text }
29
+ end
30
+
31
+ accessor.send :define_method, "#{name}_select=" do |value|
32
+ container = self.send("#{name}_options_container")
33
+ if container.visible?
34
+ options = self.send("#{name}_options_list")
35
+ list_item = options.list_item_element(:text => value.strip)
36
+ list_item.click
37
+ end
38
+ end
39
+
40
+
21
41
  #private
22
42
 
43
+ accessor.send :define_method, "#{name}_options_list" do
44
+ self.platform.unordered_list_for(:id => "#{self.send("#{name}_id")}_listbox")
45
+ end
46
+
23
47
  accessor.send :define_method, "#{name}_options_container" do
24
48
  self.platform.div_for(:id => "#{self.send("#{name}_id")}-list")
25
49
  end
@@ -16,6 +16,7 @@ module KendoPageObjectWidgets
16
16
  list_item = options.list_item_element(:text => value.strip)
17
17
  list_item.click
18
18
  end
19
+ sleep(0.3) # closing animation
19
20
  end
20
21
 
21
22
  accessor.send :define_method, "#{name}_options" do
@@ -38,7 +39,7 @@ module KendoPageObjectWidgets
38
39
  end
39
40
 
40
41
  accessor.send :define_method, "click_opener_for_#{name}" do
41
- self.send("#{name}_element").parent.span_element.span_element.click
42
+ self.send("#{name}_element").parent.span_element(:class => 'k-select').click
42
43
  end
43
44
 
44
45
  accessor.send :define_method, "#{name}_options_list" do
@@ -1,6 +1,6 @@
1
1
  module KendoPageObjectWidgets
2
2
  module Widgets
3
- class KendoAutoCompleteSelectList < PageObject::Elements::TextField
3
+ class KendoComboboxAutoComplete < PageObject::Elements::TextField
4
4
 
5
5
  def self.accessor_methods(accessor, name)
6
6
 
@@ -37,14 +37,14 @@ module KendoPageObjectWidgets
37
37
  end
38
38
 
39
39
  accessor.send :define_method, "#{name}_text" do
40
- self.send("#{name}_text_field").text
40
+ self.send("#{name}_text_field").value
41
41
  end
42
42
 
43
43
  #private
44
44
 
45
45
  accessor.send :define_method, "#{name}_opener" do
46
46
  container = self.send("#{name}_options_container")
47
- self.send("#{name}_select_list_opener").click unless container.visible?
47
+ self.send("#{name}_select_list_opener") unless container.visible?
48
48
  container.when_visible
49
49
  end
50
50
 
@@ -61,7 +61,7 @@ module KendoPageObjectWidgets
61
61
  end
62
62
 
63
63
  accessor.send :define_method, "#{name}_select_list_opener" do
64
- self.send("#{name}_element").parent.span_element.span_element
64
+ self.send("#{name}_element").parent.span_element(:class => 'k-select').click
65
65
  end
66
66
 
67
67
  accessor.send :define_method, "#{name}_id" do
@@ -24,7 +24,6 @@ module KendoPageObjectWidgets
24
24
 
25
25
  accessor.send :define_method, "#{name}" do
26
26
  selected_option = self.send("#{name}_selected")
27
- puts selected_option.text
28
27
  selected_option.text
29
28
  end
30
29
 
@@ -51,7 +50,7 @@ module KendoPageObjectWidgets
51
50
  end
52
51
 
53
52
  accessor.send :define_method, "click_opener_for_#{name}" do
54
- self.send("#{name}_element").parent.span_element.span_element.click
53
+ self.send("#{name}_element").parent.span_element(:class => 'k-select').click
55
54
  end
56
55
 
57
56
  accessor.send :define_method, "#{name}_id" do
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kendo-page-object-widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
- - Kyle McKee
7
+ - Mosaic Team
9
8
  autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,30 +34,69 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: cucumber
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
46
69
  - !ruby/object:Gem::Dependency
47
70
  name: page-object
48
71
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
72
  requirements:
51
- - - ! '>='
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: require_all
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
52
88
  - !ruby/object:Gem::Version
53
89
  version: '0'
54
90
  type: :runtime
55
91
  prerelease: false
56
92
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
93
  requirements:
59
- - - ! '>='
94
+ - - '>='
60
95
  - !ruby/object:Gem::Version
61
96
  version: '0'
62
97
  description: This gem adds kendo widgets to your page-objects
63
98
  email:
64
- - mckee.kyle@gmail.com
99
+ - mosaic.development@sherwin.com
65
100
  executables: []
66
101
  extensions: []
67
102
  extra_rdoc_files: []
@@ -78,32 +113,33 @@ files:
78
113
  - lib/kendo-page-object-widgets.rb
79
114
  - lib/version.rb
80
115
  - lib/widgets/kendo_auto_complete_input.rb
81
- - lib/widgets/kendo_auto_complete_select_list.rb
82
116
  - lib/widgets/kendo_cascading_select_list.rb
117
+ - lib/widgets/kendo_combobox_auto_complete.rb
83
118
  - lib/widgets/kendo_select_list.rb
84
119
  homepage: http://github.sherwin.com/kxm827/kendo-page-object-widgets
85
120
  licenses:
86
121
  - MIT
122
+ metadata:
123
+ allowed_push_host: 'TODO: Set to ''http://mygemserver.com'' to prevent pushes to
124
+ rubygems.org, or delete to allow pushes to any server.'
87
125
  post_install_message:
88
126
  rdoc_options: []
89
127
  require_paths:
90
128
  - lib
91
129
  required_ruby_version: !ruby/object:Gem::Requirement
92
- none: false
93
130
  requirements:
94
- - - ! '>='
131
+ - - '>='
95
132
  - !ruby/object:Gem::Version
96
133
  version: '0'
97
134
  required_rubygems_version: !ruby/object:Gem::Requirement
98
- none: false
99
135
  requirements:
100
- - - ! '>='
136
+ - - '>='
101
137
  - !ruby/object:Gem::Version
102
138
  version: '0'
103
139
  requirements: []
104
140
  rubyforge_project:
105
- rubygems_version: 1.8.29
141
+ rubygems_version: 2.0.14
106
142
  signing_key:
107
- specification_version: 3
143
+ specification_version: 4
108
144
  summary: Kendo Widgets
109
145
  test_files: []