eyes_selenium 2.35.0 → 2.36.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/eyes_selenium.gemspec +3 -0
- data/lib/applitools/capybara/driver.rb +1 -1
- data/lib/applitools/sauce/driver.rb +6 -4
- data/lib/applitools/sauce.rb +1 -1
- data/lib/applitools/version.rb +1 -1
- data/lib/eyes_selenium.rb +6 -0
- data/test/capybara_example.rb +1 -11
- data/test/{sauce_capybara_check.rb → sauce_capybara_example.rb} +5 -7
- data/test/sauce_example.rb +34 -0
- metadata +20 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f4e4ca7394f754e7e574b6d9952f1f178ecbdff
|
4
|
+
data.tar.gz: 46f2b77080c230b3cc4cb64a4c27809b5e30019e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 775112ed77b0e26692b7285f2d71a60b58cb091173326a9b56d0e5d152dbf6b2c355f855b052258cd1f4577c15e6a99cec0ea3dbfc365ff4ec53800d60acb88a
|
7
|
+
data.tar.gz: 9f6282a9501a98751f219500ff1d3844a72792c2aeef81626c4f1ae108605fceb7efc4de1dc7989066ccb999ab7b3ff82e86a2f00c11c45e09b1308661d91807
|
data/eyes_selenium.gemspec
CHANGED
@@ -17,6 +17,8 @@ EYES_GEM_SPECS = {
|
|
17
17
|
spec.add_development_dependency 'rack', ['~> 1.6.0']
|
18
18
|
spec.add_development_dependency 'tomlrb', ['<= 1.2.2']
|
19
19
|
spec.add_development_dependency 'rubocop', ['~> 0.41.1']
|
20
|
+
spec.add_development_dependency 'cmdparse', ['= 2.0.2']
|
21
|
+
spec.add_development_dependency 'net-ssh', ['<= 3.0.0']
|
20
22
|
end,
|
21
23
|
RUBY_2_0_0 => proc do |spec|
|
22
24
|
spec.add_development_dependency 'rack', ['~> 1.6.0']
|
@@ -50,6 +52,7 @@ Gem::Specification.new do |spec|
|
|
50
52
|
spec.add_development_dependency 'bundler'
|
51
53
|
spec.add_development_dependency 'rake'
|
52
54
|
spec.add_development_dependency 'capybara'
|
55
|
+
spec.add_development_dependency 'sauce'
|
53
56
|
spec.add_development_dependency 'rspec', '>= 3'
|
54
57
|
spec.add_development_dependency 'watir-webdriver'
|
55
58
|
spec.add_development_dependency 'appium_lib'
|
@@ -8,7 +8,7 @@ if defined? Capybara::Selenium::Driver
|
|
8
8
|
def browser(options = {})
|
9
9
|
eyes = options.delete(:eyes)
|
10
10
|
super()
|
11
|
-
|
11
|
+
unless eyes.nil?
|
12
12
|
is_mobile_device = @browser.capabilities['platformName'] ? true : false
|
13
13
|
@browser = Applitools::Selenium::Driver.new eyes,
|
14
14
|
options.merge(driver: @browser, is_mobile_device: is_mobile_device)
|
@@ -1,7 +1,9 @@
|
|
1
1
|
if defined? Sauce::Selenium2
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
if defined? Capybara
|
3
|
+
Sauce::Capybara::Driver.class_eval do
|
4
|
+
def driver_for_eyes(eyes)
|
5
|
+
browser.raw_driver eyes: eyes
|
6
|
+
end
|
5
7
|
end
|
6
8
|
end
|
7
9
|
|
@@ -12,7 +14,7 @@ if defined? Sauce::Selenium2
|
|
12
14
|
|
13
15
|
def raw_driver(options = {})
|
14
16
|
eyes = options.delete(:eyes)
|
15
|
-
|
17
|
+
unless eyes.nil?
|
16
18
|
is_mobile_device = @raw_driver.capabilities['platformName'] ? true : false
|
17
19
|
@raw_driver = Applitools::Selenium::Driver.new eyes,
|
18
20
|
options.merge(driver: @raw_driver, is_mobile_device: is_mobile_device)
|
data/lib/applitools/sauce.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require_relative 'capybara'
|
1
|
+
require_relative 'capybara' if defined? Capybara
|
2
2
|
Applitools.require_dir 'sauce'
|
data/lib/applitools/version.rb
CHANGED
data/lib/eyes_selenium.rb
CHANGED
@@ -35,3 +35,9 @@ require_relative 'applitools/eyes'
|
|
35
35
|
require_relative 'applitools/selenium_webdriver'
|
36
36
|
require_relative 'applitools/appium_driver'
|
37
37
|
require_relative 'applitools/watir_browser'
|
38
|
+
|
39
|
+
if defined? Sauce
|
40
|
+
require 'applitools/sauce'
|
41
|
+
elsif defined? Capybara
|
42
|
+
require 'applitools/capybara'
|
43
|
+
end
|
data/test/capybara_example.rb
CHANGED
@@ -1,19 +1,9 @@
|
|
1
1
|
require 'rspec'
|
2
2
|
require 'capybara/rspec'
|
3
|
-
|
4
|
-
require 'openssl'
|
5
|
-
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
3
|
+
require 'eyes_selenium'
|
6
4
|
|
7
5
|
Applitools.register_capybara_driver :browser => :chrome
|
8
6
|
|
9
|
-
# require 'capybara/poltergeist'
|
10
|
-
#
|
11
|
-
# Capybara.register_driver :poltergeist_app do |app|
|
12
|
-
# Capybara::Poltergeist::Driver.new(app, :js_errors => false)
|
13
|
-
# end
|
14
|
-
#
|
15
|
-
# Capybara.javascript_driver = :poltergeist_app
|
16
|
-
|
17
7
|
describe 'Capybara Example', :type => :feature, :js => true do
|
18
8
|
let(:eyes) do
|
19
9
|
Applitools::Eyes.new.tap do |eyes|
|
@@ -1,10 +1,8 @@
|
|
1
|
-
require '
|
1
|
+
require 'rspec'
|
2
|
+
require 'capybara/rspec'
|
2
3
|
require 'sauce'
|
3
4
|
require 'sauce/capybara'
|
4
|
-
|
5
|
-
require 'applitools/sauce'
|
6
|
-
require 'openssl'
|
7
|
-
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
5
|
+
require 'eyes_selenium'
|
8
6
|
|
9
7
|
Sauce.config do |config|
|
10
8
|
config[:browsers] = [
|
@@ -19,7 +17,7 @@ Capybara.configure do |c|
|
|
19
17
|
c.default_driver = :sauce
|
20
18
|
end
|
21
19
|
|
22
|
-
describe 'A Saucy Example Group',
|
20
|
+
describe 'A Saucy Example Group', :type => :feature, :sauce => true do
|
23
21
|
let!(:eyes) do
|
24
22
|
Applitools::Eyes.new.tap do |eyes|
|
25
23
|
eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
@@ -38,6 +36,6 @@ describe 'A Saucy Example Group', sauce: true do
|
|
38
36
|
end
|
39
37
|
|
40
38
|
after :each do
|
41
|
-
|
39
|
+
eyes.abort_if_not_closed
|
42
40
|
end
|
43
41
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'sauce'
|
3
|
+
require 'eyes_selenium'
|
4
|
+
|
5
|
+
Sauce.config do |config|
|
6
|
+
config[:browsers] = [
|
7
|
+
['OS X 10.10', 'chrome', '39.0']
|
8
|
+
]
|
9
|
+
config[:start_tunnel] = false
|
10
|
+
# config[:sauce_connect_4_executable] = '/path/to/sauce-connect/bin/sc'
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'A Saucy Example Group', sauce: true do
|
14
|
+
let!(:eyes) do
|
15
|
+
Applitools::Eyes.new.tap do |eyes|
|
16
|
+
eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
17
|
+
eyes.log_handler = Logger.new(STDOUT)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'Simple test' do
|
22
|
+
eyes.test(app_name: 'Ruby SDK', test_name: 'Sauce plain test', driver: selenium,
|
23
|
+
viewport_size: { width: 800, height: 600 }) do |driver|
|
24
|
+
driver.get 'http://github.com'
|
25
|
+
eyes.check_window('homepage')
|
26
|
+
driver.find_element(:css, 'input[name="user[login]"]').send_keys 'user'
|
27
|
+
eyes.check_window('homepage with username')
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
after :each do
|
32
|
+
eyes.abort_if_not_closed
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_selenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.36.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sauce
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rspec
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -307,7 +321,8 @@ files:
|
|
307
321
|
- spec/spec_helper.rb
|
308
322
|
- test/appium_example_script.rb
|
309
323
|
- test/capybara_example.rb
|
310
|
-
- test/
|
324
|
+
- test/sauce_capybara_example.rb
|
325
|
+
- test/sauce_example.rb
|
311
326
|
- test/test_script.rb
|
312
327
|
- test/watir_test_script.rb
|
313
328
|
homepage: https://www.applitools.com
|
@@ -340,7 +355,7 @@ test_files:
|
|
340
355
|
- spec/spec_helper.rb
|
341
356
|
- test/appium_example_script.rb
|
342
357
|
- test/capybara_example.rb
|
343
|
-
- test/
|
358
|
+
- test/sauce_capybara_example.rb
|
359
|
+
- test/sauce_example.rb
|
344
360
|
- test/test_script.rb
|
345
361
|
- test/watir_test_script.rb
|
346
|
-
has_rdoc:
|