testcentricity_web 4.1.4 → 4.1.7
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/.gitignore +18 -0
- data/.simplecov +5 -0
- data/CHANGELOG.md +43 -1
- data/Gemfile.lock +60 -2
- data/README.md +166 -21
- data/Rakefile +60 -1
- data/config/cucumber.yml +163 -0
- data/config/test_data/data.json +12 -0
- data/config/test_data/data.xls +0 -0
- data/config/test_data/data.yml +12 -0
- data/docker-compose-v3.yml +48 -0
- data/features/basic_test_page_css.feature +35 -0
- data/features/basic_test_page_xpath.feature +27 -0
- data/features/media_players.feature +87 -0
- data/features/step_definitions/generic_steps.rb.rb +44 -0
- data/features/step_definitions/media_steps.rb +30 -0
- data/features/support/env.rb +50 -0
- data/features/support/hooks.rb +245 -0
- data/features/support/pages/base_test_page.rb +11 -0
- data/features/support/pages/basic_css_test_page.rb +52 -0
- data/features/support/pages/basic_test_page.rb +297 -0
- data/features/support/pages/basic_xpath_test_page.rb +53 -0
- data/features/support/pages/custom_controls_page.rb +16 -0
- data/features/support/pages/indexed_sections_page.rb +16 -0
- data/features/support/pages/media_test_page.rb +195 -0
- data/features/support/sections/header_nav.rb +28 -0
- data/features/support/world_data.rb +12 -0
- data/features/support/world_pages.rb +18 -0
- data/lib/testcentricity_web/data_objects/environment.rb +16 -0
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_object.rb +8 -8
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +41 -8
- data/lib/testcentricity_web/web_core/page_section.rb +1 -16
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +77 -120
- data/lib/testcentricity_web/web_elements/checkbox.rb +3 -4
- data/lib/testcentricity_web/web_elements/media.rb +50 -4
- data/lib/testcentricity_web/web_elements/radio.rb +5 -1
- data/lib/testcentricity_web/web_elements/select_list.rb +18 -7
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +13 -0
- data/reports/.keep +1 -0
- data/test_site/basic_test_page.html +290 -0
- data/test_site/custom_controls_page.html +58 -0
- data/test_site/images/Granny.jpg +0 -0
- data/test_site/images/Wilder.jpg +0 -0
- data/test_site/images/You_Betcha.jpg +0 -0
- data/test_site/indexed_sections_page.html +58 -0
- data/test_site/media/MIB2-subtitles-pt-BR.vtt +49 -0
- data/test_site/media/MIB2.mp4 +0 -0
- data/test_site/media/MP4_small.mp4 +0 -0
- data/test_site/media/MPS_sample.mp3 +0 -0
- data/test_site/media_page.html +86 -0
- data/testcentricity_web.gemspec +5 -0
- metadata +125 -4
- data/test_site/test_page.html +0 -11
data/config/cucumber.yml
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
<% desktop = "--require features BROWSER_TILE=true BROWSER_SIZE=1300,1000 --publish-quiet" %>
|
2
|
+
<% tablet = "--tags @desktop --require features BROWSER_TILE=true --publish-quiet" %>
|
3
|
+
<% mobile = "--tags @mobile --require features BROWSER_TILE=true --publish-quiet" %>
|
4
|
+
<% reports = "--require features --format pretty --format html --out reports/test_results.html --format junit --out reports --format json --out reports/test_results.json" %>
|
5
|
+
|
6
|
+
|
7
|
+
#==============
|
8
|
+
# generic test context profiles
|
9
|
+
#==============
|
10
|
+
|
11
|
+
failing: --tags '@failing and not @wip'
|
12
|
+
wip: --tags '@wip and not @failing'
|
13
|
+
dev: --tags '@dev and (not @wip and not @failing)'
|
14
|
+
|
15
|
+
|
16
|
+
#==============
|
17
|
+
# test reporting profiles
|
18
|
+
#==============
|
19
|
+
|
20
|
+
report: <%= reports %> REPORTING=true
|
21
|
+
parallel: PARALLEL=true REPORTING=true --require features --format pretty --format html --out reports/test_results<%= ENV['TEST_ENV_NUMBER'] %>.html --format junit --out reports --format json --out reports/test_results<%= ENV['TEST_ENV_NUMBER'] %>.json
|
22
|
+
|
23
|
+
|
24
|
+
#==============
|
25
|
+
# profiles for locally hosted desktop web browsers
|
26
|
+
#==============
|
27
|
+
|
28
|
+
local: TEST_ENVIRONMENT=LOCAL
|
29
|
+
chrome: WEB_BROWSER=chrome DATA_SOURCE=yaml <%= desktop %>
|
30
|
+
edge: WEB_BROWSER=edge DATA_SOURCE=json <%= desktop %>
|
31
|
+
safari: WEB_BROWSER=safari DATA_SOURCE=Excel <%= desktop %>
|
32
|
+
firefox: WEB_BROWSER=firefox <%= desktop %>
|
33
|
+
|
34
|
+
chrome_local: --profile local --profile chrome
|
35
|
+
edge_local: --profile local --profile edge
|
36
|
+
safari_local: --profile local --profile safari
|
37
|
+
firefox_local: --profile local --profile firefox
|
38
|
+
|
39
|
+
firefox_headless: --profile local WEB_BROWSER=firefox_headless <%= desktop %>
|
40
|
+
chrome_headless: --profile local WEB_BROWSER=chrome_headless <%= desktop %>
|
41
|
+
edge_headless: --profile local WEB_BROWSER=edge_headless <%= desktop %>
|
42
|
+
|
43
|
+
|
44
|
+
#==============
|
45
|
+
# profile for Selenium Grid and Dockerized Selenium Grid hosted desktop web browsers
|
46
|
+
#==============
|
47
|
+
grid: SELENIUM=remote TEST_ENVIRONMENT=REMOTE REMOTE_ENDPOINT="http://localhost:4444/wd/hub"
|
48
|
+
chrome_grid: --profile grid --profile chrome
|
49
|
+
edge_grid: --profile grid --profile edge
|
50
|
+
firefox_grid: --profile grid --profile firefox
|
51
|
+
|
52
|
+
|
53
|
+
#==============
|
54
|
+
# profiles for mobile device screen orientation
|
55
|
+
#==============
|
56
|
+
|
57
|
+
landscape: ORIENTATION=landscape
|
58
|
+
portrait: ORIENTATION=portrait
|
59
|
+
|
60
|
+
|
61
|
+
#==============
|
62
|
+
# profile to start Appium Server prior to running mobile browser tests on iOS or Android simulators or physical devices
|
63
|
+
#==============
|
64
|
+
run_appium: APPIUM_SERVER=run
|
65
|
+
|
66
|
+
|
67
|
+
#==============
|
68
|
+
# profiles for mobile Safari web browsers hosted within XCode iOS simulators
|
69
|
+
# NOTE: Requires installation of XCode, iOS version specific target simulators, Appium, and the appium_capybara gem
|
70
|
+
#==============
|
71
|
+
|
72
|
+
appium_ios: WEB_BROWSER=appium AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="ios" APP_BROWSER="Safari" NEW_COMMAND_TIMEOUT=30 SHOW_SIM_KEYBOARD=false <%= desktop %>
|
73
|
+
app_ios_15: --profile appium_ios APP_VERSION="15.4"
|
74
|
+
|
75
|
+
ipad_pro_12_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch) (5th generation)"
|
76
|
+
ipad_air_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Air (5th generation)" <%= desktop %>
|
77
|
+
|
78
|
+
ios_remote: --profile ipad_pro_12_15_sim --profile run_appium ORIENTATION=portrait TEST_ENVIRONMENT=REMOTE
|
79
|
+
|
80
|
+
|
81
|
+
#==============
|
82
|
+
# profiles for Android mobile web browsers hosted within Android Studio Android Virtual Device emulators
|
83
|
+
# NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, Appium, and the appium_capybara gem
|
84
|
+
#==============
|
85
|
+
|
86
|
+
appium_android: WEB_BROWSER=appium APP_PLATFORM_NAME="Android" <%= desktop %>
|
87
|
+
app_android_12: --profile appium_android APP_BROWSER="Chrome" APP_VERSION="12.0"
|
88
|
+
pixel_c_api31_sim: --profile app_android_12 DEVICE_TYPE=tablet APP_DEVICE="Pixel_C_API_31"
|
89
|
+
|
90
|
+
android_remote: --profile pixel_c_api31_sim --profile run_appium ORIENTATION=portrait TEST_ENVIRONMENT=REMOTE
|
91
|
+
|
92
|
+
|
93
|
+
#==============
|
94
|
+
# profiles for remotely hosted web browsers on the BrowserStack service
|
95
|
+
#==============
|
96
|
+
|
97
|
+
browserstack: WEB_BROWSER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TC_Web_Sample - BrowserStack"
|
98
|
+
bs_desktop: --profile browserstack <%= desktop %> RESOLUTION="1920x1080"
|
99
|
+
bs_mobile: --profile browserstack <%= mobile %>
|
100
|
+
|
101
|
+
# BrowserStack macOS desktop browser profiles
|
102
|
+
bs_macos_monterey: --profile bs_desktop BS_OS="OS X" BS_OS_VERSION="Monterey"
|
103
|
+
bs_chrome_monterey: --profile bs_macos_monterey BS_BROWSER="Chrome" BS_VERSION="latest"
|
104
|
+
bs_edge_monterey: --profile bs_macos_monterey BS_BROWSER="Edge" BS_VERSION="latest"
|
105
|
+
bs_safari_monterey: --profile bs_macos_monterey BS_BROWSER="Safari" BS_VERSION="latest"
|
106
|
+
|
107
|
+
# BrowserStack iOS mobile browser profiles
|
108
|
+
bs_ipad: --profile bs_mobile BS_OS=ios BS_BROWSER=Safari DEVICE_TYPE=tablet BS_REAL_MOBILE="true"
|
109
|
+
bs_ipad_pro_12: --profile bs_ipad BS_DEVICE="iPad Pro 12.9 2018" BS_OS_VERSION="15"
|
110
|
+
|
111
|
+
# BrowserStack Android mobile browser profiles
|
112
|
+
bs_android: --profile bs_mobile BS_OS=android BS_BROWSER=Chrome DEVICE_TYPE=tablet BS_REAL_MOBILE="true"
|
113
|
+
bs_android_tablet: --profile bs_android BS_DEVICE="Samsung Galaxy Tab S7" BS_OS_VERSION="10.0"
|
114
|
+
|
115
|
+
|
116
|
+
#==============
|
117
|
+
# profiles for remotely hosted web browsers on the LambdaTest service
|
118
|
+
#==============
|
119
|
+
|
120
|
+
lambdatest: WEB_BROWSER=lambdatest LT_USERNAME="<INSERT USER NAME HERE>" LT_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TC_Web_Sample - LambdaTest"
|
121
|
+
lt_desktop: --profile lambdatest <%= desktop %> RESOLUTION="2560x1440"
|
122
|
+
|
123
|
+
# LambdaTest macOS desktop browser profiles
|
124
|
+
lt_macos_monterey: --profile lt_desktop LT_OS="MacOS Monterey"
|
125
|
+
lt_chrome_monterey: --profile lt_macos_monterey LT_BROWSER="Chrome" LT_VERSION="98.0"
|
126
|
+
lt_edge_monterey: --profile lt_macos_monterey LT_BROWSER="MicrosoftEdge" LT_VERSION="97.0"
|
127
|
+
|
128
|
+
|
129
|
+
#==============
|
130
|
+
# profiles for remotely hosted web browsers on the TestingBot service
|
131
|
+
#==============
|
132
|
+
|
133
|
+
testingbot: WEB_BROWSER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TC_Web_Sample - TestingBot"
|
134
|
+
tb_desktop: --profile testingbot <%= desktop %> RESOLUTION="1920x1200"
|
135
|
+
|
136
|
+
# TestingBot macOS desktop browser profiles
|
137
|
+
tb_macos_monterey: --profile tb_desktop TB_OS="MONTEREY"
|
138
|
+
tb_chrome_monterey: --profile tb_macos_monterey TB_BROWSER="chrome" TB_VERSION="latest"
|
139
|
+
tb_edge_monterey: --profile tb_macos_monterey TB_BROWSER="microsoftedge" TB_VERSION="latest"
|
140
|
+
|
141
|
+
|
142
|
+
#==============
|
143
|
+
# profiles for remotely hosted web browsers on the SauceLabs service
|
144
|
+
#==============
|
145
|
+
|
146
|
+
saucelabs: WEB_BROWSER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="us-west-1" AUTOMATE_PROJECT="TC_Web_Sample - SauceLabs"
|
147
|
+
sl_desktop: --profile saucelabs <%= desktop %>
|
148
|
+
sl_mobile: --profile saucelabs <%= mobile %>
|
149
|
+
|
150
|
+
# SauceLabs macOS desktop browser profiles
|
151
|
+
sl_macos_monterey: --profile sl_desktop SL_OS="macOS 12" RESOLUTION="1920x1440"
|
152
|
+
sl_chrome_monterey: --profile sl_macos_monterey SL_BROWSER="chrome" SL_VERSION="latest"
|
153
|
+
sl_edge_monterey: --profile sl_macos_monterey SL_BROWSER="MicrosoftEdge" SL_VERSION="latest"
|
154
|
+
sl_firefox_monterey: --profile sl_macos_monterey SL_BROWSER="Firefox" SL_VERSION="latest"
|
155
|
+
|
156
|
+
# SauceLabs Windows desktop browser profiles
|
157
|
+
sl_windows: --profile sl_desktop RESOLUTION="1920x1200"
|
158
|
+
sl_edge_win11: --profile sl_windows SL_OS="Windows 11" SL_BROWSER="MicrosoftEdge" SL_VERSION="latest"
|
159
|
+
sl_ie_win10: --profile sl_windows SL_OS="Windows 10" SL_BROWSER="internet explorer" SL_VERSION="11"
|
160
|
+
|
161
|
+
# SauceLabs iOS mobile browser profiles
|
162
|
+
sl_ipad: --profile sl_mobile DEVICE_TYPE=tablet SL_PLATFORM=iOS SL_BROWSER=Safari
|
163
|
+
sl_ipad_pro_12: --profile sl_ipad SL_DEVICE="iPad Pro (12.9 inch) (5th generation) Simulator" SL_VERSION="15.0"
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# -------------------------------------------------------------
|
2
|
+
# This is the generic test data required to run the UAL Flight Booking test suites against the QA and PROD test environments.
|
3
|
+
# -------------------------------------------------------------
|
4
|
+
|
5
|
+
# This section is populated with Environment data required to execute automated test suites on all supported environments
|
6
|
+
Environments:
|
7
|
+
LOCAL:
|
8
|
+
PROTOCOL: "file"
|
9
|
+
BASE_URL: "/../../test_site"
|
10
|
+
REMOTE:
|
11
|
+
PROTOCOL: "http"
|
12
|
+
BASE_URL: "192.168.1.129/test_site"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# To execute this docker-compose yml file use `docker-compose -f docker-compose-v3.yml up`
|
2
|
+
# Add the `-d` flag at the end for detached execution
|
3
|
+
# To stop the execution, hit Ctrl+C, and then `docker-compose -f docker-compose-v3.yml down`
|
4
|
+
version: "3"
|
5
|
+
services:
|
6
|
+
chrome:
|
7
|
+
image: selenium/node-chrome:4.1.2-20220217
|
8
|
+
shm_size: 2gb
|
9
|
+
depends_on:
|
10
|
+
- selenium-hub
|
11
|
+
environment:
|
12
|
+
- SE_EVENT_BUS_HOST=selenium-hub
|
13
|
+
- SE_EVENT_BUS_PUBLISH_PORT=4442
|
14
|
+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
|
15
|
+
- SE_NODE_MAX_SESSIONS=4
|
16
|
+
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
|
17
|
+
|
18
|
+
edge:
|
19
|
+
image: selenium/node-edge:4.1.2-20220217
|
20
|
+
shm_size: 2gb
|
21
|
+
depends_on:
|
22
|
+
- selenium-hub
|
23
|
+
environment:
|
24
|
+
- SE_EVENT_BUS_HOST=selenium-hub
|
25
|
+
- SE_EVENT_BUS_PUBLISH_PORT=4442
|
26
|
+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
|
27
|
+
- SE_NODE_MAX_SESSIONS=4
|
28
|
+
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
|
29
|
+
|
30
|
+
firefox:
|
31
|
+
image: selenium/node-firefox:4.1.2-20220217
|
32
|
+
shm_size: 2gb
|
33
|
+
depends_on:
|
34
|
+
- selenium-hub
|
35
|
+
environment:
|
36
|
+
- SE_EVENT_BUS_HOST=selenium-hub
|
37
|
+
- SE_EVENT_BUS_PUBLISH_PORT=4442
|
38
|
+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
|
39
|
+
- SE_NODE_MAX_SESSIONS=4
|
40
|
+
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
|
41
|
+
|
42
|
+
selenium-hub:
|
43
|
+
image: selenium/hub:4.1.2-20220217
|
44
|
+
container_name: selenium-hub
|
45
|
+
ports:
|
46
|
+
- "4442:4442"
|
47
|
+
- "4443:4443"
|
48
|
+
- "4444:4444"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Feature: Basic HTML Test Page using CSS locators
|
2
|
+
In order to xxx
|
3
|
+
As a xxxx
|
4
|
+
I expect to xxxx
|
5
|
+
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given I am on the Basic CSS Test page
|
9
|
+
|
10
|
+
|
11
|
+
Scenario: xxxxx
|
12
|
+
Then I expect the Basic CSS Test page to be correctly displayed
|
13
|
+
|
14
|
+
|
15
|
+
@!mobile
|
16
|
+
Scenario: xxxxx
|
17
|
+
Then I expect the tab order to be correct
|
18
|
+
|
19
|
+
|
20
|
+
Scenario: xxxxx
|
21
|
+
When I populate the form fields
|
22
|
+
Then I expect the form fields to be correctly populated
|
23
|
+
When I cancel my changes
|
24
|
+
Then I expect the Basic CSS Test page to be correctly displayed
|
25
|
+
|
26
|
+
|
27
|
+
Scenario Outline: Verify functionality of navigation tabs
|
28
|
+
When I click the <target_page> navigation tab
|
29
|
+
Then I expect the <target_page> page to be correctly displayed
|
30
|
+
|
31
|
+
Examples:
|
32
|
+
|target_page |
|
33
|
+
|Media Test |
|
34
|
+
|Indexed Sections |
|
35
|
+
|Custom Controls |
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@!grid
|
2
|
+
|
3
|
+
|
4
|
+
Feature: Basic HTML Test Page using Xpath locators
|
5
|
+
In order to xxx
|
6
|
+
As a xxxx
|
7
|
+
I expect to xxxx
|
8
|
+
|
9
|
+
|
10
|
+
Background:
|
11
|
+
Given I am on the Basic Xpath Test page
|
12
|
+
|
13
|
+
|
14
|
+
Scenario: xxxxx
|
15
|
+
Then I expect the Basic Xpath Test page to be correctly displayed
|
16
|
+
|
17
|
+
|
18
|
+
@!mobile
|
19
|
+
Scenario: xxxxx
|
20
|
+
Then I expect the tab order to be correct
|
21
|
+
|
22
|
+
|
23
|
+
Scenario: xxxxx
|
24
|
+
When I populate the form fields
|
25
|
+
Then I expect the form fields to be correctly populated
|
26
|
+
When I cancel my changes
|
27
|
+
Then I expect the Basic Xpath Test page to be correctly displayed
|
@@ -0,0 +1,87 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
Feature: Basic HTML Test Page using CSS locators
|
5
|
+
In order to xxx
|
6
|
+
As a xxxx
|
7
|
+
I expect to xxxx
|
8
|
+
|
9
|
+
|
10
|
+
Background:
|
11
|
+
Given I am on the Media Test page
|
12
|
+
|
13
|
+
|
14
|
+
Scenario: Verify video player play and pause controls
|
15
|
+
When I play the video media
|
16
|
+
Then the video should be playing
|
17
|
+
When I pause the video media
|
18
|
+
Then the video should be paused
|
19
|
+
|
20
|
+
|
21
|
+
Scenario: Verify audio player play and pause controls
|
22
|
+
When I play the audio media
|
23
|
+
Then the audio should be playing
|
24
|
+
When I pause the audio media
|
25
|
+
Then the audio should be paused
|
26
|
+
|
27
|
+
|
28
|
+
Scenario: Verify video player mute control
|
29
|
+
When I mute the video media
|
30
|
+
Then the video should be muted
|
31
|
+
When I unmute the video media
|
32
|
+
Then the video should be unmuted
|
33
|
+
|
34
|
+
|
35
|
+
Scenario: Verify audio player mute control
|
36
|
+
When I mute the audio media
|
37
|
+
Then the audio should be muted
|
38
|
+
When I unmute the audio media
|
39
|
+
Then the audio should be unmuted
|
40
|
+
|
41
|
+
|
42
|
+
Scenario: Verify video player volume control
|
43
|
+
When I set the volume of the video to .5
|
44
|
+
Then the video should have a volume of .5
|
45
|
+
|
46
|
+
|
47
|
+
Scenario: Verify audio player volume control
|
48
|
+
When I set the volume of the audio to .5
|
49
|
+
Then the audio should have a volume of .5
|
50
|
+
|
51
|
+
|
52
|
+
Scenario: Verify video playback speed settings
|
53
|
+
When I play the video with a playback speed of 2x
|
54
|
+
Then the video should play at 2x speed
|
55
|
+
When I play the video with a playback speed of 0.25x
|
56
|
+
Then the video should play at 0.25x speed
|
57
|
+
When I play the video with a playback speed of 1.75x
|
58
|
+
Then the video should play at 1.75x speed
|
59
|
+
When I play the video with a playback speed of 0.5x
|
60
|
+
Then the video should play at 0.5x speed
|
61
|
+
When I play the video with a playback speed of 1.5x
|
62
|
+
Then the video should play at 1.5x speed
|
63
|
+
When I play the video with a playback speed of 0.75x
|
64
|
+
Then the video should play at 0.75x speed
|
65
|
+
When I play the video with a playback speed of 1.25x
|
66
|
+
Then the video should play at 1.25x speed
|
67
|
+
When I play the video with a playback speed of 1x
|
68
|
+
Then the video should play at 1x speed
|
69
|
+
|
70
|
+
|
71
|
+
Scenario: Verify audio playback speed settings
|
72
|
+
When I play the audio with a playback speed of 2x
|
73
|
+
Then the audio should play at 2x speed
|
74
|
+
When I play the audio with a playback speed of 0.25x
|
75
|
+
Then the audio should play at 0.25x speed
|
76
|
+
When I play the audio with a playback speed of 1.75x
|
77
|
+
Then the audio should play at 1.75x speed
|
78
|
+
When I play the audio with a playback speed of 0.5x
|
79
|
+
Then the audio should play at 0.5x speed
|
80
|
+
When I play the audio with a playback speed of 1.5x
|
81
|
+
Then the audio should play at 1.5x speed
|
82
|
+
When I play the audio with a playback speed of 0.75x
|
83
|
+
Then the audio should play at 0.75x speed
|
84
|
+
When I play the audio with a playback speed of 1.25x
|
85
|
+
Then the audio should play at 1.25x speed
|
86
|
+
When I play the audio with a playback speed of 1x
|
87
|
+
Then the audio should play at 1x speed
|
@@ -0,0 +1,44 @@
|
|
1
|
+
include TestCentricity
|
2
|
+
|
3
|
+
|
4
|
+
Given(/^I am (?:on|viewing) the (.*) page$/) do |page_name|
|
5
|
+
# find and load the specified target page
|
6
|
+
target_page = PageManager.find_page(page_name)
|
7
|
+
target_page.load_page
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
Then(/^I expect the (.*) page to be correctly displayed$/) do |page_name|
|
12
|
+
# find and verify that the specified target page is loaded
|
13
|
+
target_page = PageManager.find_page(page_name)
|
14
|
+
target_page.verify_page_exists
|
15
|
+
# verify that target page is correctly displayed
|
16
|
+
target_page.verify_page_ui
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
When(/^I populate the form fields$/) do
|
21
|
+
PageManager.current_page.populate_form
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
Then(/^I expect the form fields to be correctly populated$/) do
|
26
|
+
PageManager.current_page.verify_form_data
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
When(/^I (.*) my changes$/) do | action|
|
31
|
+
PageManager.current_page.perform_action(action.downcase.to_sym)
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
Then(/^I expect the tab order to be correct$/) do
|
36
|
+
PageManager.current_page.verify_tab_order
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
When(/^I click the (.*) navigation (?:tab|link)$/) do |page_name|
|
41
|
+
# find and navigate to the specified target page
|
42
|
+
target_page = PageManager.find_page(page_name)
|
43
|
+
target_page.navigate_to
|
44
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
When(/^I (.*) the (.*) media$/) do |action, media_type|
|
4
|
+
media_test_page.perform_action(media_type, action)
|
5
|
+
end
|
6
|
+
|
7
|
+
|
8
|
+
Then(/^the (.*) should be (.*)$/) do |media_type, state|
|
9
|
+
media_test_page.verify_media_state(media_type, state)
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
When(/^I play the (.*) with a playback speed of (.*)x$/) do |media_type, rate|
|
14
|
+
media_test_page.set_playback_rate(media_type, rate)
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
Then(/^the (.*) should play at (.*)x speed$/) do |media_type, rate|
|
19
|
+
media_test_page.verify_playback_rate(media_type, rate)
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
When(/^I set the volume of the (.*) to (.*)$/) do |media_type, volume|
|
24
|
+
media_test_page.set_volume(media_type, volume)
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
Then(/^the (.*) should have a volume of (.*)$/) do |media_type, volume|
|
29
|
+
media_test_page.verify_volume(media_type, volume)
|
30
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'capybara/cucumber'
|
2
|
+
require 'parallel_tests'
|
3
|
+
require 'appium_capybara'
|
4
|
+
require 'require_all'
|
5
|
+
require 'simplecov'
|
6
|
+
require 'testcentricity_web'
|
7
|
+
|
8
|
+
include TestCentricity
|
9
|
+
|
10
|
+
SimpleCov.command_name("features-#{ENV['WEB_BROWSER']}-#{ENV['SELENIUM']}" + (ENV['TEST_ENV_NUMBER'] || ''))
|
11
|
+
|
12
|
+
# require_relative 'world_data'
|
13
|
+
require_relative 'world_pages'
|
14
|
+
|
15
|
+
# require_rel 'data'
|
16
|
+
require_rel 'sections'
|
17
|
+
require_rel 'pages'
|
18
|
+
|
19
|
+
$LOAD_PATH << './lib'
|
20
|
+
|
21
|
+
# set Capybara's default max wait time to 20 seconds
|
22
|
+
Capybara.default_max_wait_time = 20
|
23
|
+
|
24
|
+
# set the default locale and auto load all translations from config/locales/*.rb,yml.
|
25
|
+
ENV['LOCALE'] = 'en-US' unless ENV['LOCALE']
|
26
|
+
I18n.load_path += Dir['config/locales/*.{rb,yml}']
|
27
|
+
I18n.default_locale = ENV['LOCALE']
|
28
|
+
I18n.locale = ENV['LOCALE']
|
29
|
+
Faker::Config.locale = ENV['LOCALE']
|
30
|
+
|
31
|
+
# instantiate all data objects and target test environment
|
32
|
+
include WorldData
|
33
|
+
ENV['DATA_SOURCE'] = 'yaml' unless ENV['DATA_SOURCE']
|
34
|
+
environs.find_environ(ENV['TEST_ENVIRONMENT'], ENV['DATA_SOURCE'].downcase.to_sym)
|
35
|
+
# WorldData.instantiate_data_objects
|
36
|
+
|
37
|
+
# instantiate all page objects
|
38
|
+
include WorldPages
|
39
|
+
WorldPages.instantiate_page_objects
|
40
|
+
|
41
|
+
# establish connection to WebDriver and target web browser
|
42
|
+
Webdrivers.cache_time = 86_400
|
43
|
+
|
44
|
+
|
45
|
+
url = if ENV['TEST_ENVIRONMENT'].downcase == 'local'
|
46
|
+
"file://#{File.dirname(__FILE__)}/../../test_site"
|
47
|
+
else
|
48
|
+
Environ.current.app_host
|
49
|
+
end
|
50
|
+
WebDriverConnect.initialize_web_driver(app_host: url)
|