testcentricity_web 0.8.3 → 0.8.4
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 +4 -4
- data/README.md +24 -20
- data/lib/devices/devices.yml +10 -0
- data/lib/testcentricity_web/elements/table.rb +12 -4
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/webdriver_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd2e643cec0cb7e2b9ef5c37045e35bcfcc5d708
|
|
4
|
+
data.tar.gz: a4c72b57d1468edeb3f184a8ea71c34e4076ce54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ed0f55c5e1951a7707dd3806a07a786232b359d50019112412d215b85e073ab71e1fe343841201853cd8c50ea12c7d7bc36d7ecc40329bff30a4d0529dc0115
|
|
7
|
+
data.tar.gz: c430d37df2995a3ed837935de86f449d6eb1577c0e27f0ab66c54ab3943546387f740193f218e049a32a33abef3127f4bd723c2520e2563f9786e62fa7101591
|
data/README.md
CHANGED
|
@@ -358,30 +358,32 @@ To maximize a desktop browser window, you set the `BROWSER_SIZE` Environment Var
|
|
|
358
358
|
### Locally hosted emulated mobile web browser
|
|
359
359
|
|
|
360
360
|
You can also run your tests against emulated mobile device browsers within a locally hosted instance of a Firefox or Chrome desktop browser. The
|
|
361
|
-
specified mobile browser's user agent
|
|
361
|
+
specified mobile browser's user agent, CSS screen dimensions, and default screen orientation will be automatically set in the local Firefox or Chrome
|
|
362
362
|
browser instance. You may even specify the emulated device's screen orientation. For locally hosted emulated mobile web browsers, the `WEB_BROWSER`
|
|
363
363
|
Environment Variable must be set to one of the values from the table below:
|
|
364
364
|
|
|
365
|
-
`WEB_BROWSER` | `HOST_BROWSER` | **
|
|
365
|
+
`WEB_BROWSER` | `HOST_BROWSER` | **CSS Screen Dimensions** | **Default Orientation**
|
|
366
366
|
--------------|----------------|-------------------------------|-------------------
|
|
367
|
-
`ipad`
|
|
368
|
-
`ipad_pro`
|
|
369
|
-
`android_tablet` |`firefox` or `chrome` |1024
|
|
370
|
-
`kindle_fire`
|
|
371
|
-
`kindle_firehd7` |`firefox` or `chrome` |800
|
|
372
|
-
`kindle_firehd8` |`firefox` or `chrome` |1280
|
|
373
|
-
`surface`
|
|
374
|
-
`blackberry_playbook` |`firefox` or `chrome` |1024
|
|
375
|
-
`
|
|
376
|
-
`
|
|
377
|
-
`
|
|
378
|
-
`
|
|
379
|
-
`
|
|
380
|
-
`
|
|
381
|
-
`
|
|
382
|
-
`
|
|
383
|
-
|
|
384
|
-
|
|
367
|
+
`ipad` |`firefox` or `chrome` |1024 x 768|landscape
|
|
368
|
+
`ipad_pro` |`firefox` or `chrome` |1366 x 1024|landscape
|
|
369
|
+
`android_tablet` |`firefox` or `chrome` |1024 x 768|landscape
|
|
370
|
+
`kindle_fire` |`firefox` or `chrome` |1024 x 600|landscape
|
|
371
|
+
`kindle_firehd7` |`firefox` or `chrome` |800 x 480|landscape
|
|
372
|
+
`kindle_firehd8` |`firefox` or `chrome` |1280 x 800|landscape
|
|
373
|
+
`surface` |`firefox` or `chrome` |1366 x 768|landscape
|
|
374
|
+
`blackberry_playbook` |`firefox` or `chrome` |1024 x 600|landscape
|
|
375
|
+
`samsung_galaxy_tab` |`firefox` or `chrome` |1280 x 800|landscape
|
|
376
|
+
`google_nexus7` |`firefox` or `chrome` |960 x 600|landscape
|
|
377
|
+
`iphone` |`firefox` or `chrome` |320 x 480|portrait
|
|
378
|
+
`iphone4` |`firefox` or `chrome` |320 x 480|portrait
|
|
379
|
+
`iphone5` |`firefox` or `chrome` |320 x 568|portrait
|
|
380
|
+
`iphone6` |`firefox` or `chrome` |375 x 667|portrait
|
|
381
|
+
`iphone6_plus` |`firefox` or `chrome` |414 x 736|portrait
|
|
382
|
+
`android_phone` |`firefox` or `chrome` |320 x 480|portrait
|
|
383
|
+
`windows_phone7` |`firefox` or `chrome` |320 x 480|portrait
|
|
384
|
+
`windows_phone8` |`firefox` or `chrome` |320 x 480|portrait
|
|
385
|
+
|
|
386
|
+
To change the emulated device's screen orientation from the default setting, set the `ORIENTATION` Environment Variable to either `portrait` or `landscape`.
|
|
385
387
|
|
|
386
388
|
To use a local instance of the Chrome desktop browser to host the emulated mobile web browser, you must set the `HOST_BROWSER` Environment Variable
|
|
387
389
|
to `chrome`.
|
|
@@ -559,6 +561,8 @@ replace the placeholder text with your user account and authorization code for t
|
|
|
559
561
|
kindle_firehd8: WEB_BROWSER=kindle_firehd8 HOST_BROWSER=firefox <%= mobile %>
|
|
560
562
|
surface: WEB_BROWSER=surface HOST_BROWSER=firefox <%= mobile %>
|
|
561
563
|
blackberry_playbook: WEB_BROWSER=blackberry_playbook HOST_BROWSER=firefox <%= mobile %>
|
|
564
|
+
samsung_galaxy_tab: WEB_BROWSER=samsung_galaxy_tab HOST_BROWSER=firefox <%= mobile %>
|
|
565
|
+
google_nexus7: WEB_BROWSER=google_nexus7 HOST_BROWSER=firefox <%= mobile %>
|
|
562
566
|
windows_phone7: WEB_BROWSER=windows_phone7 HOST_BROWSER=firefox <%= mobile %>
|
|
563
567
|
windows_phone8: WEB_BROWSER=windows_phone8 HOST_BROWSER=firefox <%= mobile %>
|
|
564
568
|
|
data/lib/devices/devices.yml
CHANGED
|
@@ -78,3 +78,13 @@
|
|
|
78
78
|
:css_height: 600
|
|
79
79
|
:default_orientation: landscape
|
|
80
80
|
: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
|
+
:samsung_galaxy_tab:
|
|
82
|
+
:css_width: 1280
|
|
83
|
+
:css_height: 800
|
|
84
|
+
:default_orientation: landscape
|
|
85
|
+
: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
|
+
:google_nexus7:
|
|
87
|
+
:css_width: 960
|
|
88
|
+
:css_height: 600
|
|
89
|
+
:default_orientation: landscape
|
|
90
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.72 Safari/537.36",
|
|
@@ -6,6 +6,8 @@ module TestCentricity
|
|
|
6
6
|
attr_accessor :table_header
|
|
7
7
|
attr_accessor :header_row
|
|
8
8
|
attr_accessor :header_column
|
|
9
|
+
attr_accessor :tree_expand
|
|
10
|
+
attr_accessor :tree_collapse
|
|
9
11
|
|
|
10
12
|
def initialize(parent, locator, context)
|
|
11
13
|
@parent = parent
|
|
@@ -19,7 +21,9 @@ module TestCentricity
|
|
|
19
21
|
:table_column => 'td',
|
|
20
22
|
:table_header => 'thead',
|
|
21
23
|
:header_row => 'tr',
|
|
22
|
-
:header_column => 'th'
|
|
24
|
+
:header_column => 'th',
|
|
25
|
+
:tree_expand => "div/div[contains(@class, 'tree-plus treeclick')]",
|
|
26
|
+
:tree_collapse => "div/div[contains(@class, 'tree-minus treeclick')]"
|
|
23
27
|
}
|
|
24
28
|
define_table_elements(table_spec)
|
|
25
29
|
end
|
|
@@ -39,6 +43,10 @@ module TestCentricity
|
|
|
39
43
|
@header_row = value
|
|
40
44
|
when :header_column
|
|
41
45
|
@header_column = value
|
|
46
|
+
when :tree_expand
|
|
47
|
+
@tree_expand = value
|
|
48
|
+
when :tree_collapse
|
|
49
|
+
@tree_collapse = value
|
|
42
50
|
end
|
|
43
51
|
end
|
|
44
52
|
end
|
|
@@ -321,7 +329,7 @@ module TestCentricity
|
|
|
321
329
|
column_count = get_column_count
|
|
322
330
|
raise "Column #{column} exceeds number of columns (#{column_count}) in table #{@locator}" if column > column_count
|
|
323
331
|
set_table_cell_locator(row, column)
|
|
324
|
-
set_alt_locator("#{@alt_locator}
|
|
332
|
+
set_alt_locator("#{@alt_locator}/#{@tree_expand}")
|
|
325
333
|
expanded = true
|
|
326
334
|
expanded = false if exists?
|
|
327
335
|
clear_alt_locator
|
|
@@ -331,7 +339,7 @@ module TestCentricity
|
|
|
331
339
|
def expand_table_row(row, column)
|
|
332
340
|
unless is_table_row_expanded?(row, column)
|
|
333
341
|
set_table_cell_locator(row, column)
|
|
334
|
-
set_alt_locator("#{@alt_locator}
|
|
342
|
+
set_alt_locator("#{@alt_locator}/#{@tree_expand}")
|
|
335
343
|
click if exists?
|
|
336
344
|
clear_alt_locator
|
|
337
345
|
end
|
|
@@ -340,7 +348,7 @@ module TestCentricity
|
|
|
340
348
|
def collapse_table_row(row, column)
|
|
341
349
|
if is_table_row_expanded?(row, column)
|
|
342
350
|
set_table_cell_locator(row, column)
|
|
343
|
-
set_alt_locator("#{@alt_locator}
|
|
351
|
+
set_alt_locator("#{@alt_locator}/#{@tree_collapse}")
|
|
344
352
|
click if exists?
|
|
345
353
|
clear_alt_locator
|
|
346
354
|
end
|
|
@@ -44,7 +44,7 @@ module TestCentricity
|
|
|
44
44
|
case browser.downcase.to_sym
|
|
45
45
|
when :firefox, :chrome, :ie, :safari, :edge
|
|
46
46
|
Capybara::Selenium::Driver.new(app, :browser => browser.to_sym)
|
|
47
|
-
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
|
|
47
|
+
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
|
|
48
48
|
Environ.set_platform(:mobile)
|
|
49
49
|
ENV['HOST_BROWSER'] ? host_browser = ENV['HOST_BROWSER'].downcase.to_sym : host_browser = :firefox
|
|
50
50
|
case host_browser
|
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.8.
|
|
4
|
+
version: 0.8.4
|
|
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-04-
|
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|