eyes_selenium 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/.gitignore +17 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +13 -0
  5. data/README.md +82 -0
  6. data/Rakefile +1 -0
  7. data/eyes_selenium.gemspec +30 -0
  8. data/lib/eyes_selenium.rb +42 -0
  9. data/lib/eyes_selenium/capybara.rb +21 -0
  10. data/lib/eyes_selenium/eyes/agent_connecter.rb +39 -0
  11. data/lib/eyes_selenium/eyes/batch_info.rb +14 -0
  12. data/lib/eyes_selenium/eyes/dimension.rb +15 -0
  13. data/lib/eyes_selenium/eyes/driver.rb +146 -0
  14. data/lib/eyes_selenium/eyes/element.rb +78 -0
  15. data/lib/eyes_selenium/eyes/environment.rb +14 -0
  16. data/lib/eyes_selenium/eyes/eyes.rb +182 -0
  17. data/lib/eyes_selenium/eyes/eyes_keyboard.rb +25 -0
  18. data/lib/eyes_selenium/eyes/eyes_mouse.rb +60 -0
  19. data/lib/eyes_selenium/eyes/failure_reports.rb +4 -0
  20. data/lib/eyes_selenium/eyes/match_level.rb +7 -0
  21. data/lib/eyes_selenium/eyes/match_window_data.rb +18 -0
  22. data/lib/eyes_selenium/eyes/match_window_task.rb +71 -0
  23. data/lib/eyes_selenium/eyes/mouse_trigger.rb +19 -0
  24. data/lib/eyes_selenium/eyes/region.rb +22 -0
  25. data/lib/eyes_selenium/eyes/screenshot_taker.rb +18 -0
  26. data/lib/eyes_selenium/eyes/session.rb +14 -0
  27. data/lib/eyes_selenium/eyes/start_info.rb +34 -0
  28. data/lib/eyes_selenium/eyes/target_app.rb +17 -0
  29. data/lib/eyes_selenium/eyes/test_results.rb +21 -0
  30. data/lib/eyes_selenium/eyes/text_trigger.rb +15 -0
  31. data/lib/eyes_selenium/eyes/viewport_size.rb +104 -0
  32. data/lib/eyes_selenium/eyes_logger.rb +18 -0
  33. data/lib/eyes_selenium/utils.rb +5 -0
  34. data/lib/eyes_selenium/utils/image_delta_compressor.rb +147 -0
  35. data/lib/eyes_selenium/version.rb +3 -0
  36. data/spec/capybara_spec.rb +34 -0
  37. data/spec/driver_spec.rb +10 -0
  38. data/spec/eyes_spec.rb +157 -0
  39. data/spec/spec_helper.rb +29 -0
  40. data/spec/test_app.rb +11 -0
  41. data/test_script.rb +21 -0
  42. metadata +226 -0
@@ -0,0 +1,29 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ require 'eyes_selenium'
8
+ RSpec.configure do |config|
9
+ config.treat_symbols_as_metadata_keys_with_true_values = true
10
+ config.run_all_when_everything_filtered = true
11
+ config.filter_run :focus
12
+
13
+ # Run specs in random order to surface order dependencies. If you find an
14
+ # order dependency and want to debug it, you can fix the order by providing
15
+ # the seed, which is printed after each run.
16
+ # --seed 1234
17
+ config.order = 'random'
18
+ end
19
+
20
+
21
+ def init_eyes
22
+ before(:all) do
23
+ Applitools::Eyes.config[:apikey] = 'YOUR_API_KEY'
24
+ Applitools::Eyes.config[:server_url] = 'http://eyesbeta.cloudapp.net:8080'
25
+ end
26
+ let!(:eyes) do
27
+ Applitools::Eyes.new
28
+ end
29
+ end
@@ -0,0 +1,11 @@
1
+ require 'sinatra/base'
2
+ require 'rack'
3
+
4
+ class TestApp < Sinatra::Base
5
+ set :root, File.dirname(__FILE__)
6
+ set :static, true
7
+
8
+ get '/' do
9
+ 'Hello world!'
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ ## Before running this, please install ruby(installtion changes depending on machine)
2
+ ## Then install rake via `gem install rake` (all ruby developers use this gem)
3
+ ## run `./rake install` in applitools root directory (here), this should install the gem (after we release the gem, users will run `gem install eyes` instead
4
+
5
+ require 'eyes_selenium'
6
+
7
+ Applitools::Eyes.config[:apikey] = 'YOUR_API_KEY'
8
+
9
+ eyes = Applitools::Eyes.new
10
+ eyes.test(app_name: 'Ruby SDK', test_name: 'Applitools website test') do |eyes, driver|
11
+ driver.get "http://www.applitools.com"
12
+ eyes.check_window("initial")
13
+ driver.find_element(:css, "li.pricing a").click
14
+ eyes.check_window("pricing page")
15
+ el = driver.find_elements(:css, ".footer-row a").first
16
+ driver.action.double_click(el).perform
17
+ eyes.check_window("in forms")
18
+ other_el = driver.find_elements(:css, ".s2member-pro-paypal-registration-email").first
19
+ driver.action.move_to(other_el).click(other_el).send_keys("applitools").perform
20
+ eyes.check_window("end")
21
+ end
metadata ADDED
@@ -0,0 +1,226 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eyes_selenium
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.6.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Applitools team
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-11-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: selenium-webdriver
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '2.37'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '2.37'
30
+ - !ruby/object:Gem::Dependency
31
+ name: httparty
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: oily_png
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 1.1.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: bundler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '1.3'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '1.3'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rake
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rspec
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: 2.2.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 2.2.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: capybara
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 2.1.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 2.1.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: sinatra
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ description: Applitools Ruby SDK
143
+ email:
144
+ - team@applitools.com
145
+ executables: []
146
+ extensions: []
147
+ extra_rdoc_files: []
148
+ files:
149
+ - .gitignore
150
+ - .rspec
151
+ - Gemfile
152
+ - LICENSE.txt
153
+ - README.md
154
+ - Rakefile
155
+ - eyes_selenium.gemspec
156
+ - lib/eyes_selenium.rb
157
+ - lib/eyes_selenium/capybara.rb
158
+ - lib/eyes_selenium/eyes/agent_connecter.rb
159
+ - lib/eyes_selenium/eyes/batch_info.rb
160
+ - lib/eyes_selenium/eyes/dimension.rb
161
+ - lib/eyes_selenium/eyes/driver.rb
162
+ - lib/eyes_selenium/eyes/element.rb
163
+ - lib/eyes_selenium/eyes/environment.rb
164
+ - lib/eyes_selenium/eyes/eyes.rb
165
+ - lib/eyes_selenium/eyes/eyes_keyboard.rb
166
+ - lib/eyes_selenium/eyes/eyes_mouse.rb
167
+ - lib/eyes_selenium/eyes/failure_reports.rb
168
+ - lib/eyes_selenium/eyes/match_level.rb
169
+ - lib/eyes_selenium/eyes/match_window_data.rb
170
+ - lib/eyes_selenium/eyes/match_window_task.rb
171
+ - lib/eyes_selenium/eyes/mouse_trigger.rb
172
+ - lib/eyes_selenium/eyes/region.rb
173
+ - lib/eyes_selenium/eyes/screenshot_taker.rb
174
+ - lib/eyes_selenium/eyes/session.rb
175
+ - lib/eyes_selenium/eyes/start_info.rb
176
+ - lib/eyes_selenium/eyes/target_app.rb
177
+ - lib/eyes_selenium/eyes/test_results.rb
178
+ - lib/eyes_selenium/eyes/text_trigger.rb
179
+ - lib/eyes_selenium/eyes/viewport_size.rb
180
+ - lib/eyes_selenium/eyes_logger.rb
181
+ - lib/eyes_selenium/utils.rb
182
+ - lib/eyes_selenium/utils/image_delta_compressor.rb
183
+ - lib/eyes_selenium/version.rb
184
+ - spec/capybara_spec.rb
185
+ - spec/driver_spec.rb
186
+ - spec/eyes_spec.rb
187
+ - spec/spec_helper.rb
188
+ - spec/test_app.rb
189
+ - test_script.rb
190
+ homepage: http://www.applitools.com
191
+ licenses:
192
+ - Apache License, Version 2.0
193
+ post_install_message:
194
+ rdoc_options: []
195
+ require_paths:
196
+ - lib
197
+ required_ruby_version: !ruby/object:Gem::Requirement
198
+ none: false
199
+ requirements:
200
+ - - ! '>='
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ segments:
204
+ - 0
205
+ hash: 2417852359237807309
206
+ required_rubygems_version: !ruby/object:Gem::Requirement
207
+ none: false
208
+ requirements:
209
+ - - ! '>='
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ segments:
213
+ - 0
214
+ hash: 2417852359237807309
215
+ requirements: []
216
+ rubyforge_project:
217
+ rubygems_version: 1.8.25
218
+ signing_key:
219
+ specification_version: 3
220
+ summary: Applitools Ruby SDK
221
+ test_files:
222
+ - spec/capybara_spec.rb
223
+ - spec/driver_spec.rb
224
+ - spec/eyes_spec.rb
225
+ - spec/spec_helper.rb
226
+ - spec/test_app.rb