testcentricity_web 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fd47e4f7d10641c98afe707dbe294f97b6038cc
4
- data.tar.gz: 0125169d38b9d3f04b919428f0bb478a810bf3ab
3
+ metadata.gz: 1e54ba7e42445d011bd7dea0f1b649cd321372fc
4
+ data.tar.gz: ad5c8500dc061fd7b2b05714050eee4af2864e9e
5
5
  SHA512:
6
- metadata.gz: 31814f76f6369edf6c82c8c38bd5041ee29c96d4fe758baa0f629311639723833a4d0a1ddbcae9e5203bd0bc0d1dcea7622278bb70acd4b00838a20e05e8d861
7
- data.tar.gz: 92ee7504492cf6d61a1038799f629ec31687cbcaf4fd24f13297d43487eaeefdf1964a4be112933f40cfa5a5337b1fe51b7df4992f0883fd84fc67ddd453e65f
6
+ metadata.gz: 9c521cefa82fb5f8c8c8f7ae0c8ce1059e229563d3d6c74c7ad77fd1ae40ca7f062299637c4f749ccf40aee4741d45ec6ab7292f3962f7952c18fba72874d03c
7
+ data.tar.gz: 81b34a198714f609103cee5f2643ead09b1efd008ed7180fd1f0c04373ef2d0804c77ef0c9c52e36a91476c83c46797e1f42c16a904816a5d1ea3f2a96c1d3c9
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # TestcentricityWeb
2
2
 
3
- The TestCentricity™ core generic framework for desktop and responsive mobile web site testing implements a Page Object
3
+ The TestCentricity™ core generic framework for desktop and responsive mobile web site testing implements a Page Object
4
4
  and Data Object Model DSL, for use with Capybara and selenium-webdriver. It supports testing against locally hosted
5
- desktop browsers (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile browsers (using Firefox), or
6
- on cloud hosted desktop or mobile web browsers using the BrowserStack, Sauce Labs, or CrossBrowserTesting services.
5
+ desktop browsers (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile browsers (using Firefox),
6
+ "headless" (using Poltergeist), or on cloud hosted desktop or mobile web browsers using the BrowserStack, Sauce Labs,
7
+ or CrossBrowserTesting services.
7
8
 
8
9
 
9
10
  ## Installation
@@ -212,10 +213,10 @@ Redistribution and use in source and binary forms, with or without
212
213
  modification, are permitted provided that the following conditions are met:
213
214
 
214
215
  1. Redistributions of source code must retain the above copyright notice,
215
- this list of conditions and the following disclaimer.
216
+ this list of conditions, and the following disclaimer.
216
217
 
217
218
  2. Redistributions in binary form must reproduce the above copyright
218
- notice, this list of conditions and the following disclaimer in the
219
+ notice, this list of conditions, and the following disclaimer in the
219
220
  documentation and/or other materials provided with the distribution.
220
221
 
221
222
  3. Neither the name of the copyright holder nor the names of its contributors
@@ -1,6 +1,7 @@
1
1
  require 'capybara/cucumber'
2
2
  require 'rspec/expectations'
3
3
  require 'test/unit'
4
+ require 'capybara/poltergeist'
4
5
  require 'testcentricity_web/world_extensions'
5
6
  require 'testcentricity_web/browser_helper'
6
7
  require 'testcentricity_web/data_objects_helper'
@@ -56,7 +56,7 @@ module TestCentricity
56
56
  begin
57
57
  obj.click
58
58
  rescue
59
- obj.click_at(10, 10)
59
+ obj.click_at(10, 10) unless Capybara.current_driver == :poltergeist
60
60
  end
61
61
  end
62
62
 
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '0.5.5'
2
+ VERSION = '0.5.6'
3
3
  end
@@ -18,6 +18,8 @@ module TestCentricity
18
18
  initialize_crossbrowser
19
19
  when :saucelabs
20
20
  initialize_saucelabs
21
+ when :poltergeist
22
+ initialize_poltergeist
21
23
  else
22
24
  initialize_local_browser(browser)
23
25
  end
@@ -25,10 +27,12 @@ module TestCentricity
25
27
  Capybara.app_host = app_host
26
28
 
27
29
  # set browser window size only if testing with a desktop web browser
28
- if Environ.is_desktop?
29
- (ENV['BROWSER_SIZE'] == 'max') ?
30
- Browsers.maximize_browser :
31
- Browsers.set_browser_window_size(Browsers.browser_size(browser, ENV['ORIENTATION']))
30
+ unless Capybara.current_driver == :poltergeist
31
+ if Environ.is_desktop?
32
+ (ENV['BROWSER_SIZE'] == 'max') ?
33
+ Browsers.maximize_browser :
34
+ Browsers.set_browser_window_size(Browsers.browser_size(browser, ENV['ORIENTATION']))
35
+ end
32
36
  end
33
37
 
34
38
  puts "Using #{Environ.browser.to_s} browser"
@@ -54,6 +58,20 @@ module TestCentricity
54
58
  end
55
59
  end
56
60
 
61
+ def self.initialize_poltergeist
62
+ Capybara.default_driver = :poltergeist
63
+ Capybara.register_driver :poltergeist do |app|
64
+ options = {
65
+ :js_errors => true,
66
+ :timeout => 120,
67
+ :debug => false,
68
+ :phantomjs_options => ['--load-images=no', '--disk-cache=false'],
69
+ :inspector => true,
70
+ }
71
+ Capybara::Poltergeist::Driver.new(app, options)
72
+ end
73
+ end
74
+
57
75
  def self.initialize_browserstack
58
76
  browser = ENV['BS_BROWSER']
59
77
 
@@ -14,8 +14,8 @@ Gem::Specification.new do |spec|
14
14
  spec.description = %q{
15
15
  TestCentricity™ core generic framework for desktop and responsive mobile web site testing implements a Page Object
16
16
  Model DSL, for use with Capybara and selenium-webdriver. Supports testing against locally hosted desktop browsers
17
- (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile browsers (using Firefox), or on cloud hosted
18
- browsers using the BrowserStack, Sauce Labs, or CrossBrowserTesting services.}
17
+ (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile browsers (using Firefox), "headless" (using
18
+ Poltergeist), or on cloud hosted browsers using the BrowserStack, Sauce Labs, or CrossBrowserTesting services.}
19
19
  spec.homepage = ''
20
20
  spec.license = 'BSD3'
21
21
 
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency 'rspec-expectations'
32
32
  spec.add_dependency 'rspec'
33
33
  spec.add_dependency 'test-unit'
34
+ spec.add_dependency 'poltergeist'
34
35
  spec.add_dependency 'selenium-webdriver', '>= 2.50.0'
35
36
  spec.add_dependency 'faker', '>= 1.6.1'
36
37
  spec.add_dependency 'chronic', '>= 0.10.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
@@ -100,6 +100,20 @@ dependencies:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: poltergeist
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
103
117
  - !ruby/object:Gem::Dependency
104
118
  name: selenium-webdriver
105
119
  requirement: !ruby/object:Gem::Requirement
@@ -160,8 +174,8 @@ description: |2-
160
174
 
161
175
  TestCentricity™ core generic framework for desktop and responsive mobile web site testing implements a Page Object
162
176
  Model DSL, for use with Capybara and selenium-webdriver. Supports testing against locally hosted desktop browsers
163
- (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile browsers (using Firefox), or on cloud hosted
164
- browsers using the BrowserStack, Sauce Labs, or CrossBrowserTesting services.
177
+ (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile browsers (using Firefox), "headless" (using
178
+ Poltergeist), or on cloud hosted browsers using the BrowserStack, Sauce Labs, or CrossBrowserTesting services.
165
179
  email:
166
180
  - test_automation@icloud.com
167
181
  executables: []