testcentricity_web 0.9.1 → 0.9.1.1

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: 3da2c933e6c3d4089b582291d5a799f225bcfd6e
4
- data.tar.gz: 81edd431c997355bd696289e79d497b7641fb0d2
3
+ metadata.gz: 0b1ea3399f3c43738e6c88b4d80a4f15c7da9ab3
4
+ data.tar.gz: 4e3ef296cb0a1e510736328abdfba64d048a6149
5
5
  SHA512:
6
- metadata.gz: 83027e650684bfba0a128129074a2225c3e776330ee23d7da4ddf52e97a6118c120554618f17513bcc78f92cb7f393ff6b12585926f7d3660d07d7cef5072c03
7
- data.tar.gz: f32a330d0dd9e04d6b8bdf35e53a68515d41c443494975218cfbf01a14576a0b0ae8106e12c357e4d198e6809cf1cc8db700956e46e30d16c7ff9edece44e083
6
+ metadata.gz: 329d32abef4368ca1e1437aff9c0d490a5b514fe686d135938b7f83b33eb7f45dfc06ff481299facfe34ae39b64f2e136dedaab4c9d8ddff51197265c12c375c
7
+ data.tar.gz: ae739de1e3630c00c297d91588914d59a09efbab13c31141921fc659f0d67862f52fac7bf40d00b111d063fd9293050203dc7cd878b67dee0aca3a9ff4010bf3
data/README.md CHANGED
@@ -12,7 +12,9 @@ The TestCentricity™ Web gem supports running testing against the following web
12
12
  * locally hosted emulated iOS, Android, Windows Phone, or Blackberry mobile browsers (using Firefox or Chrome)
13
13
  * a "headless" browser (using Poltergeist and PhantomJS)
14
14
  * mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X)
15
- * cloud hosted desktop or mobile web browsers using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services.
15
+ * cloud hosted desktop or mobile web browsers using the [Browserstack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate),
16
+ [Sauce Labs](https://saucelabs.com/features/#features-cross-browser), [CrossBrowserTesting](https://crossbrowsertesting.com/selenium-testing), or
17
+ [TestingBot](https://testingbot.com/features) services.
16
18
 
17
19
 
18
20
  ## Installation
@@ -412,6 +414,8 @@ browsers, the `WEB_BROWSER` Environment Variable must be set to one of the value
412
414
  `android_phone` |`firefox` or `chrome` |320 x 480|portrait
413
415
  `windows_phone7` |`firefox` or `chrome` |320 x 480|portrait
414
416
  `windows_phone8` |`firefox` or `chrome` |320 x 480|portrait
417
+ `blackberry_z10` |`firefox` or `chrome` |384 x 640|portrait
418
+ `blackberry_z30` |`firefox` or `chrome` |360 x 640|portrait
415
419
 
416
420
  To change the emulated device's screen orientation from the default setting, set the `ORIENTATION` Environment Variable to either `portrait` or `landscape`.
417
421
 
@@ -618,7 +622,9 @@ replace the placeholder text with your user account and authorization code for t
618
622
  google_nexus7: WEB_BROWSER=google_nexus7 HOST_BROWSER=firefox <%= mobile %>
619
623
  windows_phone7: WEB_BROWSER=windows_phone7 HOST_BROWSER=firefox <%= mobile %>
620
624
  windows_phone8: WEB_BROWSER=windows_phone8 HOST_BROWSER=firefox <%= mobile %>
621
-
625
+ blackberry_z10: WEB_BROWSER=blackberry_z10 HOST_BROWSER=firefox <%= mobile %>
626
+ blackberry_z30: WEB_BROWSER=blackberry_z30 HOST_BROWSER=firefox <%= mobile %>
627
+
622
628
 
623
629
  #==============
624
630
  # profiles for mobile device screen orientation
@@ -1,89 +1,119 @@
1
1
  :iphone:
2
+ :name: "iPhone"
2
3
  :css_width: 320
3
4
  :css_height: 480
4
5
  :default_orientation: portrait
5
6
  :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
6
7
  :iphone4:
8
+ :name: "iPhone 4"
7
9
  :css_width: 320
8
10
  :css_height: 480
9
11
  :default_orientation: portrait
10
12
  :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
11
13
  :iphone5:
14
+ :name: "iPhone 5"
12
15
  :css_width: 320
13
16
  :css_height: 568
14
17
  :default_orientation: portrait
15
18
  :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
16
19
  :iphone6:
20
+ :name: "iPhone 6"
17
21
  :css_width: 375
18
22
  :css_height: 667
19
23
  :default_orientation: portrait
20
24
  :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
21
25
  :iphone6_plus:
26
+ :name: "iPhone 6 Plus"
22
27
  :css_width: 414
23
28
  :css_height: 736
24
29
  :default_orientation: portrait
25
30
  :user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
26
31
  :android_phone:
32
+ :name: "Generic Android phone"
27
33
  :css_width: 320
28
34
  :css_height: 480
29
35
  :default_orientation: portrait
30
36
  :user_agent: "Mozilla/5.0 (Linux; U; Android 4.0.1; en-us; sdk Build/ICS_MR0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
31
37
  :windows_phone8:
38
+ :name: "Generic Windows 8 phone"
32
39
  :css_width: 320
33
40
  :css_height: 480
34
41
  :default_orientation: portrait
35
42
  :user_agent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)"
36
43
  :windows_phone7:
44
+ :name: "Generic Windows 7 phone"
37
45
  :css_width: 320
38
46
  :css_height: 480
39
47
  :default_orientation: portrait
40
48
  :user_agent: "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 710)"
49
+ :blackberry_z10:
50
+ :name: "Blackberry Z10"
51
+ :css_width: 384
52
+ :css_height: 640
53
+ :default_orientation: portrait
54
+ :user_agent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+"
55
+ :blackberry_z30:
56
+ :name: "Blackberry Z30"
57
+ :css_width: 360
58
+ :css_height: 640
59
+ :default_orientation: portrait
60
+ :user_agent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+"
41
61
  :ipad:
62
+ :name: "iPad"
42
63
  :css_width: 1024
43
64
  :css_height: 768
44
65
  :default_orientation: landscape
45
66
  :user_agent: "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/3B143 Safari/601.1"
46
67
  :ipad_pro:
68
+ :name: "iPad Pro"
47
69
  :css_width: 1366
48
70
  :css_height: 1024
49
71
  :default_orientation: landscape
50
72
  :user_agent: "Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1"
51
73
  :android_tablet:
74
+ :name: "Generic Android tablet"
52
75
  :css_width: 1024
53
76
  :css_height: 768
54
77
  :default_orientation: landscape
55
78
  :user_agent: "Mozilla/5.0 (Linux; U; Android 3.0; en-us; GT-P7100 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
56
79
  :kindle_fire:
80
+ :name: "Kindle Fire"
57
81
  :css_width: 1024
58
82
  :css_height: 600
59
83
  :default_orientation: landscape
60
84
  :user_agent: "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.141.16-Gen4_11004310) AppleWebkit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true"
61
85
  :kindle_firehd7:
86
+ :name: "Kindle Fire HD 7"
62
87
  :css_width: 800
63
88
  :css_height: 480
64
89
  :default_orientation: landscape
65
90
  :user_agent: "Mozilla/5.0 (Linux; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"
66
91
  :kindle_firehd8:
92
+ :name: "Kindle Fire HD 8 or 9"
67
93
  :css_width: 1280
68
94
  :css_height: 800
69
95
  :default_orientation: landscape
70
96
  :user_agent: "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"
71
97
  :surface:
98
+ :name: "Microsoft Surface"
72
99
  :css_width: 1366
73
100
  :css_height: 768
74
101
  :default_orientation: landscape
75
102
  :user_agent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)"
76
103
  :blackberry_playbook:
104
+ :name: "Blackberry Playbook"
77
105
  :css_width: 1024
78
106
  :css_height: 600
79
107
  :default_orientation: landscape
80
108
  :user_agent: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+"
81
109
  :samsung_galaxy_tab:
110
+ :name: "Samsung Galaxy Tab series"
82
111
  :css_width: 1280
83
112
  :css_height: 800
84
113
  :default_orientation: landscape
85
114
  :user_agent: "Mozilla/5.0 (Linux; U; Android 2.2; en-us; SCH-I800 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
86
115
  :google_nexus7:
116
+ :name: "Nexus 7 series"
87
117
  :css_width: 960
88
118
  :css_height: 600
89
119
  :default_orientation: landscape
@@ -91,6 +91,14 @@ module TestCentricity
91
91
  agent_string
92
92
  end
93
93
 
94
+ def self.mobile_device_name(device)
95
+ device_name = device.gsub(/\s+/, "").downcase.to_sym
96
+ device = get_devices[device_name]
97
+ name = device[:name]
98
+ raise "Device '#{device}' is not defined" unless name
99
+ name
100
+ end
101
+
94
102
  def self.browser_size(browser, orientation)
95
103
  device_name = browser.gsub(/\s+/, "").downcase.to_sym
96
104
  device = get_devices[device_name]
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.1.1'
3
3
  end
@@ -78,22 +78,21 @@ module TestCentricity
78
78
  case browser.downcase.to_sym
79
79
  when :firefox, :chrome, :ie, :safari, :edge
80
80
  Capybara::Selenium::Driver.new(app, :browser => browser.to_sym)
81
- when :iphone, :iphone5, :iphone6, :iphone6_plus, :ipad, :ipad_pro, :android_phone, :android_tablet, :windows_phone7, :windows_phone8, :kindle_fire, :kindle_firehd7, :kindle_firehd8, :surface, :blackberry_playbook, :samsung_galaxy_tab, :google_nexus7
81
+ else
82
+ user_agent = Browsers.mobile_device_agent(browser)
82
83
  Environ.set_platform(:mobile)
84
+ Environ.set_device_type(Browsers.mobile_device_name(browser))
83
85
  ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :firefox
84
86
  case host_browser
85
- when :firefox
86
- profile = Selenium::WebDriver::Firefox::Profile.new
87
- profile['general.useragent.override'] = Browsers.mobile_device_agent(browser)
88
- Capybara::Selenium::Driver.new(app, :profile => profile)
89
- when :chrome
90
- args = []
91
- args << "--user-agent='#{Browsers.mobile_device_agent(browser)}'"
92
- Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
87
+ when :firefox
88
+ profile = Selenium::WebDriver::Firefox::Profile.new
89
+ profile['general.useragent.override'] = user_agent
90
+ Capybara::Selenium::Driver.new(app, :profile => profile)
91
+ when :chrome
92
+ args = []
93
+ args << "--user-agent='#{user_agent}'"
94
+ Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
93
95
  end
94
- else
95
- Capybara::Selenium::Driver.new(app, :browser => :firefox)
96
- Environ.set_browser('firefox')
97
96
  end
98
97
  end
99
98
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  locally hosted desktop browsers (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile (iOS, Android,
18
18
  Windows Phone, Blackberry) browsers using Firefox or Chrome, a "headless" browser (using Poltergeist and PhantomJS),
19
19
  mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X), or cloud hosted desktop or mobile
20
- web browsers using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services.}
20
+ web browsers (using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services).}
21
21
  spec.homepage = ''
22
22
  spec.license = 'BSD3'
23
23
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-10 00:00:00.000000000 Z
11
+ date: 2016-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -149,7 +149,7 @@ description: |2-
149
149
  locally hosted desktop browsers (Firefox, Chrome, Safari, IE, or Edge), locally hosted emulated mobile (iOS, Android,
150
150
  Windows Phone, Blackberry) browsers using Firefox or Chrome, a "headless" browser (using Poltergeist and PhantomJS),
151
151
  mobile Safari browsers on iOS device simulators (using Appium and XCode on OS X), or cloud hosted desktop or mobile
152
- web browsers using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services.
152
+ web browsers (using the BrowserStack, Sauce Labs, CrossBrowserTesting, or TestingBot services).
153
153
  email:
154
154
  - testcentricity@gmail.com
155
155
  executables: []