testcentricity 3.0.0 → 3.0.3
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/CHANGELOG.md +14 -1
- data/config/cucumber.yml +1 -0
- data/config/test_data/LOCAL_data.yml +15 -11
- data/config/test_data/data.yml +0 -1
- data/features/navigation.feature +12 -0
- data/features/step_definitions/generic_steps.rb +9 -19
- data/features/support/android/screens/base_app_screen.rb +2 -0
- data/features/support/android/screens/biometrics_screen.rb +17 -0
- data/features/support/android/screens/geo_location_screen.rb +28 -0
- data/features/support/android/screens/qr_code_scanner_screen.rb +15 -0
- data/features/support/data/user_data.rb +17 -0
- data/features/support/env.rb +2 -1
- data/features/support/ios/screens/base_app_screen.rb +1 -0
- data/features/support/ios/screens/biometrics_screen.rb +17 -0
- data/features/support/ios/screens/geo_location_screen.rb +32 -0
- data/features/support/ios/screens/qr_code_scanner_screen.rb +11 -0
- data/features/support/shared_components/screens/base_app_screen.rb +4 -0
- data/features/support/world_data.rb +1 -1
- data/features/support/world_pages.rb +3 -0
- data/lib/testcentricity/app_elements/alert.rb +64 -0
- data/lib/testcentricity/version.rb +1 -1
- data/testcentricity.gemspec +4 -4
- metadata +47 -39
- data/features/support/ios/sections/modals/base_modal.rb +0 -23
- data/features/support/ios/sections/modals/logout_modal.rb +0 -6
- data/features/support/ios/sections/modals/reset_app_state_modal.rb +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 653059007c2c5f64363dd2d44956b75609a84adffa34a8e9a9d1801b65686dd3
|
|
4
|
+
data.tar.gz: 8913e34345d85bb0877a8a924b4acc8df39d690f320c72b25787cfa524fd7564
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 021c2b6c8e01f0909b55d8d99797c37b92d3c77fd08665b7760b4943568064cdfebbc167c194a078cb7a0e250f606c83475ac1329d8ac9c032873cbe3f175b38
|
|
7
|
+
data.tar.gz: e448537732ba7b53f4dad239f9c9695031ac501bce2aff0f64eed50e459c573ae2af431ef73a1732a850a756d0a496436d26e9c3c7c766d08f14ea4933561616
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,20 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
## [3.0.
|
|
5
|
+
## [3.0.3] - 30-MAY-2022
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
* Added `AppAlert.await_and_respond` method.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [3.0.2] - 26-MAY-2022
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
* Added runtime dependencies `curb` and `json` to gemspec.
|
|
15
|
+
* Fixed CHANGELOG url in gemspec.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [3.0.1] - 26-MAY-2022
|
|
6
19
|
|
|
7
20
|
### Added
|
|
8
21
|
* Added support for testing on cloud hosted iOS and Android simulators and real devices on BrowserStack, SauceLabs, and TestingBot services.
|
data/config/cucumber.yml
CHANGED
|
@@ -21,6 +21,7 @@ bvt: <%= acceptance %>
|
|
|
21
21
|
#==============
|
|
22
22
|
|
|
23
23
|
report: <%= reports %> REPORTING=true
|
|
24
|
+
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
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
#==============
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
|
|
2
|
+
User_creds:
|
|
3
|
+
valid_data:
|
|
4
|
+
username: 'bob@example.com'
|
|
5
|
+
password: '10203040'
|
|
6
|
+
invalid_user:
|
|
7
|
+
username: 'iggy.snicklefritz@example.com'
|
|
8
|
+
password: '10203040'
|
|
9
|
+
locked_account:
|
|
10
|
+
username: 'alice@example.com'
|
|
11
|
+
password: '10203040'
|
|
12
|
+
no_username:
|
|
13
|
+
password: '10203040'
|
|
14
|
+
no_password:
|
|
15
|
+
username: 'bob@example.com'
|
data/config/test_data/data.yml
CHANGED
data/features/navigation.feature
CHANGED
|
@@ -29,3 +29,15 @@ Feature: Screen Navigation
|
|
|
29
29
|
|Login |
|
|
30
30
|
|Webview |
|
|
31
31
|
|SauceBot Video |
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Scenario Outline: Verify screen navigation features with popup modals
|
|
35
|
+
When I tap the <screen_name> navigation menu item
|
|
36
|
+
And I accept the popup request modal
|
|
37
|
+
Then I expect the <screen_name> screen to be correctly displayed
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
|screen_name |
|
|
41
|
+
|QR Code Scanner |
|
|
42
|
+
|Geo Location |
|
|
43
|
+
|Biometrics |
|
|
@@ -18,6 +18,7 @@ When(/^I (?:click|tap) the ([^\"]*) navigation menu item$/) do |screen_name|
|
|
|
18
18
|
# find and navigate to the specified target page/screen
|
|
19
19
|
target_page = PageManager.find_page(screen_name)
|
|
20
20
|
target_page.navigate_to
|
|
21
|
+
PageManager.current_page = target_page
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
|
|
@@ -30,25 +31,9 @@ Then(/^I expect the (.*) (?:page|screen) to be correctly displayed$/) do |screen
|
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
|
|
33
|
-
When(/^I enter user credentials with (.*)$/) do |
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
username = 'bob@example.com'
|
|
37
|
-
password = '10203040'
|
|
38
|
-
when :invalid_user
|
|
39
|
-
username = 'iggy.snicklefritz@example.com'
|
|
40
|
-
password = '10203040'
|
|
41
|
-
when :locked_account
|
|
42
|
-
username = 'alice@example.com'
|
|
43
|
-
password = '10203040'
|
|
44
|
-
when :no_username
|
|
45
|
-
password = '10203040'
|
|
46
|
-
when :no_password
|
|
47
|
-
username = 'bob@example.com'
|
|
48
|
-
else
|
|
49
|
-
raise "#{reason} is not a valid selector"
|
|
50
|
-
end
|
|
51
|
-
login_screen.login(username, password)
|
|
34
|
+
When(/^I enter user credentials with (.*)$/) do |creds|
|
|
35
|
+
cred_data = user_data_source.find_user_creds(creds.gsub(/\s+/, '_').downcase)
|
|
36
|
+
login_screen.login(cred_data.username, cred_data.password)
|
|
52
37
|
end
|
|
53
38
|
|
|
54
39
|
|
|
@@ -70,3 +55,8 @@ end
|
|
|
70
55
|
Then(/^I expect the navigation menu to be hidden$/) do
|
|
71
56
|
PageManager.current_page.verify_nav_menu(state = :closed)
|
|
72
57
|
end
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
When(/^I (.*) the popup request modal$/) do |action|
|
|
61
|
+
PageManager.current_page.modal_action(action)
|
|
62
|
+
end
|
|
@@ -8,6 +8,8 @@ class BaseAppScreen < TestCentricity::ScreenObject
|
|
|
8
8
|
cart_button: { accessibility_id: 'cart badge' }
|
|
9
9
|
labels header_label: { xpath: '//android.view.ViewGroup[@content-desc="container header"]/android.widget.TextView' },
|
|
10
10
|
cart_quantity: { xpath: '//android.view.ViewGroup[@content-desc="cart badge"]/android.widget.TextView' }
|
|
11
|
+
alerts grant_modal: { id: 'com.android.permissioncontroller:id/grant_dialog' },
|
|
12
|
+
alert_modal: { id: 'android:id/parentPanel' }
|
|
11
13
|
section :nav_menu, NavMenu
|
|
12
14
|
|
|
13
15
|
def verify_page_ui
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class BiometricsScreen < BaseAppScreen
|
|
2
|
+
trait(:page_name) { 'Biometrics' }
|
|
3
|
+
trait(:page_locator) { { accessibility_id: 'biometrics screen' } }
|
|
4
|
+
trait(:navigator) { nav_menu.open_biometrics }
|
|
5
|
+
|
|
6
|
+
# Biometrics screen UI elements
|
|
7
|
+
switch :fingerprint_switch, { accessibility_id: 'biometrics switch'}
|
|
8
|
+
|
|
9
|
+
def verify_page_ui
|
|
10
|
+
super
|
|
11
|
+
ui = {
|
|
12
|
+
header_label => { visible: true, caption: 'FingerPrint' },
|
|
13
|
+
fingerprint_switch => { visible: true, enabled: false }
|
|
14
|
+
}
|
|
15
|
+
verify_ui_states(ui)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
class GeoLocationScreen < BaseAppScreen
|
|
2
|
+
trait(:page_name) { 'Geo Location' }
|
|
3
|
+
trait(:page_locator) { { accessibility_id: 'geo location screen' } }
|
|
4
|
+
trait(:page_url) { 'geo-locations' }
|
|
5
|
+
trait(:navigator) { nav_menu.open_geo_location }
|
|
6
|
+
|
|
7
|
+
# Geo Location screen UI elements
|
|
8
|
+
buttons start_observing_button: { accessibility_id: 'Start Observing button'},
|
|
9
|
+
stop_observing_button: { accessibility_id: 'Stop Observing button'}
|
|
10
|
+
labels latitude_data: { accessibility_id: 'latitude data' },
|
|
11
|
+
longitude_data: { accessibility_id: 'longitude data' }
|
|
12
|
+
|
|
13
|
+
def verify_page_ui
|
|
14
|
+
super
|
|
15
|
+
ui = {
|
|
16
|
+
header_label => { visible: true, caption: 'Geo Location' },
|
|
17
|
+
start_observing_button => { visible: true, enabled: false, caption: 'Start Observing' },
|
|
18
|
+
stop_observing_button => { visible: true, enabled: true, caption: 'Stop Observing' },
|
|
19
|
+
latitude_data => { visible: true, caption: { not_equal: '0' } },
|
|
20
|
+
longitude_data => { visible: true, caption: { not_equal: '0' } }
|
|
21
|
+
}
|
|
22
|
+
verify_ui_states(ui)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def modal_action(action)
|
|
26
|
+
grant_modal.await_and_respond(action.downcase.to_sym, timeout = 1, button_name = 'Only this time')
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class QRCodeScannerScreen < BaseAppScreen
|
|
2
|
+
trait(:page_name) { 'QR Code Scanner' }
|
|
3
|
+
trait(:page_locator) { { accessibility_id: 'qr code screen' } }
|
|
4
|
+
trait(:page_url) { 'qr-code-scanner' }
|
|
5
|
+
trait(:navigator) { nav_menu.open_qr_code_scanner }
|
|
6
|
+
|
|
7
|
+
def verify_page_ui
|
|
8
|
+
super
|
|
9
|
+
verify_ui_states(header_label => { visible: true, caption: 'QR Code Scanner' })
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def modal_action(action)
|
|
13
|
+
grant_modal.await_and_respond(action.downcase.to_sym, timeout = 1, button_name = 'Only this time')
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class UserDataSource < TestCentricity::DataSource
|
|
2
|
+
def find_user_creds(node_name)
|
|
3
|
+
UserData.current = UserData.new(environs.read('User_creds', node_name))
|
|
4
|
+
end
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UserData < TestCentricity::DataPresenter
|
|
9
|
+
attribute :username, String
|
|
10
|
+
attribute :password, String
|
|
11
|
+
|
|
12
|
+
def initialize(data)
|
|
13
|
+
@username = data[:username]
|
|
14
|
+
@password = data[:password]
|
|
15
|
+
super
|
|
16
|
+
end
|
|
17
|
+
end
|
data/features/support/env.rb
CHANGED
|
@@ -4,8 +4,8 @@ require 'capybara/cucumber'
|
|
|
4
4
|
require 'parallel_tests'
|
|
5
5
|
require 'require_all'
|
|
6
6
|
require 'simplecov'
|
|
7
|
-
require 'testcentricity'
|
|
8
7
|
require 'testcentricity_web'
|
|
8
|
+
require 'testcentricity'
|
|
9
9
|
|
|
10
10
|
include TestCentricity
|
|
11
11
|
|
|
@@ -14,6 +14,7 @@ SimpleCov.command_name("Features-#{ENV['PLATFORM']}-#{Time.now.strftime('%Y%m%d%
|
|
|
14
14
|
require_relative 'world_data'
|
|
15
15
|
require_relative 'world_pages'
|
|
16
16
|
|
|
17
|
+
require_rel 'data'
|
|
17
18
|
require_rel 'shared_components'
|
|
18
19
|
|
|
19
20
|
# conditionally require page and section objects based on target platform
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class BiometricsScreen < BaseAppScreen
|
|
2
|
+
trait(:page_name) { 'Biometrics' }
|
|
3
|
+
trait(:page_locator) { { accessibility_id: 'biometrics screen' } }
|
|
4
|
+
trait(:navigator) { nav_menu.open_biometrics }
|
|
5
|
+
|
|
6
|
+
# Biometrics screen UI elements
|
|
7
|
+
switch :face_id_switch, { accessibility_id: 'biometrics switch'}
|
|
8
|
+
|
|
9
|
+
def verify_page_ui
|
|
10
|
+
super
|
|
11
|
+
ui = {
|
|
12
|
+
header_label => { visible: true, caption: 'FaceID' },
|
|
13
|
+
face_id_switch => { visible: true, enabled: false, value: '0' }
|
|
14
|
+
}
|
|
15
|
+
verify_ui_states(ui)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
class GeoLocationScreen < BaseAppScreen
|
|
2
|
+
trait(:page_name) { 'Geo Location' }
|
|
3
|
+
trait(:page_locator) { { accessibility_id: 'geo location screen' } }
|
|
4
|
+
trait(:page_url) { 'geo-locations' }
|
|
5
|
+
trait(:navigator) { nav_menu.open_geo_location }
|
|
6
|
+
|
|
7
|
+
# Geo Location screen UI elements
|
|
8
|
+
buttons start_observing_button: { accessibility_id: 'Start Observing button'},
|
|
9
|
+
stop_observing_button: { accessibility_id: 'Stop Observing button'}
|
|
10
|
+
labels latitude_label: { accessibility_id: 'Latitude:' },
|
|
11
|
+
latitude_data: { accessibility_id: 'latitude data' },
|
|
12
|
+
longitude_label: { accessibility_id: 'Longitude:' },
|
|
13
|
+
longitude_data: { accessibility_id: 'longitude data' }
|
|
14
|
+
|
|
15
|
+
def verify_page_ui
|
|
16
|
+
super
|
|
17
|
+
ui = {
|
|
18
|
+
header_label => { visible: true, caption: 'Geo Location' },
|
|
19
|
+
start_observing_button => { visible: true, enabled: false, caption: 'Start Observing' },
|
|
20
|
+
stop_observing_button => { visible: true, enabled: true, caption: 'Stop Observing' },
|
|
21
|
+
latitude_label => { visible: true, caption: 'Latitude:' },
|
|
22
|
+
latitude_data => { visible: true, caption: { not_equal: '0' } },
|
|
23
|
+
longitude_label => { visible: true, caption: 'Longitude:' },
|
|
24
|
+
longitude_data => { visible: true, caption: { not_equal: '0' } }
|
|
25
|
+
}
|
|
26
|
+
verify_ui_states(ui)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def modal_action(action)
|
|
30
|
+
alert_modal.await_and_respond(action.downcase.to_sym, timeout = 1, button_name = 'Allow Once')
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class QRCodeScannerScreen < BaseAppScreen
|
|
2
|
+
trait(:page_name) { 'QR Code Scanner' }
|
|
3
|
+
trait(:page_locator) { { accessibility_id: 'qr code screen' } }
|
|
4
|
+
trait(:page_url) { 'qr-code-scanner' }
|
|
5
|
+
trait(:navigator) { nav_menu.open_qr_code_scanner }
|
|
6
|
+
|
|
7
|
+
def verify_page_ui
|
|
8
|
+
super
|
|
9
|
+
verify_ui_states(header_label => { visible: true, caption: 'QR Code Scanner' })
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -17,6 +17,9 @@ module WorldPages
|
|
|
17
17
|
products_screen: ProductsScreen,
|
|
18
18
|
checkout_address_screen: CheckoutAddressScreen,
|
|
19
19
|
checkout_payment_screen: CheckoutPaymentScreen,
|
|
20
|
+
qr_code_scanner_screen: QRCodeScannerScreen,
|
|
21
|
+
geo_location_screen: GeoLocationScreen,
|
|
22
|
+
biometrics_screen: BiometricsScreen,
|
|
20
23
|
saucebot_video_screen: SauceBotScreen
|
|
21
24
|
}
|
|
22
25
|
end
|
|
@@ -5,6 +5,16 @@ module TestCentricity
|
|
|
5
5
|
@type = :alert
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
+
# Wait until the alert modal is visible, or until the specified wait time has expired. If the wait time is nil, then the
|
|
9
|
+
# wait time will be Environ.default_max_wait_time. Unlike wait_until_visible or wait_until_exists, this method does not
|
|
10
|
+
# raise an exception if the alert modal does not appear within the specified wait time.
|
|
11
|
+
# Returns true if the alert modal is visible.
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
# @param seconds [Integer or Float] wait time in seconds
|
|
15
|
+
# @example
|
|
16
|
+
# permissions_modal.await(2)
|
|
17
|
+
#
|
|
8
18
|
def await(seconds)
|
|
9
19
|
timeout = seconds.nil? ? Environ.default_max_wait_time : seconds
|
|
10
20
|
wait = Selenium::WebDriver::Wait.new(timeout: timeout)
|
|
@@ -14,14 +24,68 @@ module TestCentricity
|
|
|
14
24
|
false
|
|
15
25
|
end
|
|
16
26
|
|
|
27
|
+
# Performs the action required accept the currently visible alert modal. If the alert modal is still visible after
|
|
28
|
+
# 5 seconds, an exception is raised.
|
|
29
|
+
#
|
|
30
|
+
# @example
|
|
31
|
+
# alert_modal.accept
|
|
32
|
+
#
|
|
17
33
|
def accept
|
|
18
34
|
alert_accept
|
|
19
35
|
wait_until_gone(5)
|
|
20
36
|
end
|
|
21
37
|
|
|
38
|
+
# Performs the action required dismiss the currently visible alert modal. If the alert modal is still visible after
|
|
39
|
+
# 5 seconds, an exception is raised.
|
|
40
|
+
#
|
|
41
|
+
# @example
|
|
42
|
+
# alert_modal.dismiss
|
|
43
|
+
#
|
|
22
44
|
def dismiss
|
|
23
45
|
alert_dismiss
|
|
24
46
|
wait_until_gone(5)
|
|
25
47
|
end
|
|
48
|
+
|
|
49
|
+
#
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
# @param action [Symbol] action to perform if alert modal is visible. Acceptable values are :allow, :accept, :dont_allow, or :dismiss
|
|
52
|
+
# @param timeout [Integer or Float] wait time in seconds. Defaults to 2 if not specified
|
|
53
|
+
# @param button_name [String] optional caption of button to tap associated with the specified action
|
|
54
|
+
# @example
|
|
55
|
+
# alert_modal.await_and_respond(:dismiss)
|
|
56
|
+
# OR
|
|
57
|
+
# permissions_modal.await_and_respond(:accept, timeout = 1, button_name = 'Allow Once')
|
|
58
|
+
#
|
|
59
|
+
def await_and_respond(action, timeout = 2, button_name = nil)
|
|
60
|
+
if await(timeout)
|
|
61
|
+
case action
|
|
62
|
+
when :allow, :accept
|
|
63
|
+
if button_name.nil?
|
|
64
|
+
accept
|
|
65
|
+
elsif Environ.is_ios?
|
|
66
|
+
$driver.execute_script('mobile: alert', { action: 'accept', buttonLabel: button_name })
|
|
67
|
+
else
|
|
68
|
+
$driver.execute_script('mobile: acceptAlert', { buttonLabel: button_name })
|
|
69
|
+
end
|
|
70
|
+
when :dont_allow, :dismiss
|
|
71
|
+
if button_name.nil?
|
|
72
|
+
dismiss
|
|
73
|
+
elsif Environ.is_ios?
|
|
74
|
+
$driver.execute_script('mobile: alert', { action: 'dismiss', buttonLabel: button_name })
|
|
75
|
+
else
|
|
76
|
+
$driver.execute_script('mobile: dismissAlert', { buttonLabel: button_name })
|
|
77
|
+
end
|
|
78
|
+
else
|
|
79
|
+
raise "#{action} is not a valid selector"
|
|
80
|
+
end
|
|
81
|
+
if Environ.is_ios? && await(1)
|
|
82
|
+
buttons = $driver.execute_script('mobile: alert', { action: 'getButtons' })
|
|
83
|
+
raise "Could not perform #{action} action on active modal. Available modal buttons are #{buttons}"
|
|
84
|
+
end
|
|
85
|
+
true
|
|
86
|
+
else
|
|
87
|
+
false
|
|
88
|
+
end
|
|
89
|
+
end
|
|
26
90
|
end
|
|
27
91
|
end
|
data/testcentricity.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.required_ruby_version = '>= 2.7.5'
|
|
11
11
|
spec.authors = ['A.J. Mrozinski']
|
|
12
12
|
spec.email = ['testcentricity@gmail.com']
|
|
13
|
-
spec.summary = %q{A Page Object Model Framework for
|
|
13
|
+
spec.summary = %q{A Page Object Model Framework for native mobile app and desktop/mobile web portal testing}
|
|
14
14
|
spec.description = '
|
|
15
15
|
The TestCentricity™ core framework for native mobile iOS and Android apps and desktop/mobile web testing implements a Page Object
|
|
16
16
|
Model DSL for use with Cucumber, Appium, Capybara, and Selenium-Webdriver v4.x. The gem also facilitates the configuration of the
|
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.homepage = 'https://github.com/TestCentricity/testcentricity'
|
|
21
21
|
spec.license = 'BSD-3-Clause'
|
|
22
22
|
spec.metadata = {
|
|
23
|
-
'changelog_uri' => 'https://github.com/TestCentricity/testcentricity/blob/
|
|
23
|
+
'changelog_uri' => 'https://github.com/TestCentricity/testcentricity/blob/master/CHANGELOG.md',
|
|
24
24
|
'documentation_uri' => 'https://www.rubydoc.info/gems/testcentricity'
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -33,8 +33,6 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.add_development_dependency 'bundler'
|
|
34
34
|
spec.add_development_dependency 'cucumber'
|
|
35
35
|
spec.add_development_dependency 'cuke_modeler', '~> 3.0'
|
|
36
|
-
spec.add_development_dependency 'curb'
|
|
37
|
-
spec.add_development_dependency 'json'
|
|
38
36
|
spec.add_development_dependency 'parallel_tests'
|
|
39
37
|
spec.add_development_dependency 'rake'
|
|
40
38
|
spec.add_development_dependency 'require_all', '=1.5.0'
|
|
@@ -43,6 +41,8 @@ Gem::Specification.new do |spec|
|
|
|
43
41
|
spec.add_development_dependency 'yard', ['>= 0.9.0']
|
|
44
42
|
|
|
45
43
|
spec.add_runtime_dependency 'appium_lib'
|
|
44
|
+
spec.add_runtime_dependency 'curb'
|
|
45
|
+
spec.add_runtime_dependency 'json'
|
|
46
46
|
spec.add_runtime_dependency 'testcentricity_web', '>= 4.2.2'
|
|
47
47
|
spec.add_runtime_dependency 'test-unit'
|
|
48
48
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: testcentricity
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.3
|
|
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: 2022-05-
|
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -52,34 +52,6 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: curb
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: json
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
55
|
- !ruby/object:Gem::Dependency
|
|
84
56
|
name: parallel_tests
|
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -178,6 +150,34 @@ dependencies:
|
|
|
178
150
|
- - ">="
|
|
179
151
|
- !ruby/object:Gem::Version
|
|
180
152
|
version: '0'
|
|
153
|
+
- !ruby/object:Gem::Dependency
|
|
154
|
+
name: curb
|
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
|
156
|
+
requirements:
|
|
157
|
+
- - ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '0'
|
|
160
|
+
type: :runtime
|
|
161
|
+
prerelease: false
|
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - ">="
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
167
|
+
- !ruby/object:Gem::Dependency
|
|
168
|
+
name: json
|
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - ">="
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '0'
|
|
174
|
+
type: :runtime
|
|
175
|
+
prerelease: false
|
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - ">="
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '0'
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: testcentricity_web
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -241,27 +241,31 @@ files:
|
|
|
241
241
|
- features/step_definitions/generic_steps.rb
|
|
242
242
|
- features/support/android/screens/about_screen.rb
|
|
243
243
|
- features/support/android/screens/base_app_screen.rb
|
|
244
|
+
- features/support/android/screens/biometrics_screen.rb
|
|
244
245
|
- features/support/android/screens/checkout_address_screen.rb
|
|
245
246
|
- features/support/android/screens/checkout_payment_screen.rb
|
|
247
|
+
- features/support/android/screens/geo_location_screen.rb
|
|
246
248
|
- features/support/android/screens/login_screen.rb
|
|
247
249
|
- features/support/android/screens/products_screen.rb
|
|
250
|
+
- features/support/android/screens/qr_code_scanner_screen.rb
|
|
248
251
|
- features/support/android/screens/saucebot_screen.rb
|
|
249
252
|
- features/support/android/screens/webview_screen.rb
|
|
250
253
|
- features/support/android/sections/nav_widgets/nav_menu.rb
|
|
254
|
+
- features/support/data/user_data.rb
|
|
251
255
|
- features/support/env.rb
|
|
252
256
|
- features/support/hooks.rb
|
|
253
257
|
- features/support/ios/screens/about_screen.rb
|
|
254
258
|
- features/support/ios/screens/base_app_screen.rb
|
|
259
|
+
- features/support/ios/screens/biometrics_screen.rb
|
|
255
260
|
- features/support/ios/screens/checkout_address_screen.rb
|
|
256
261
|
- features/support/ios/screens/checkout_payment_screen.rb
|
|
262
|
+
- features/support/ios/screens/geo_location_screen.rb
|
|
257
263
|
- features/support/ios/screens/login_screen.rb
|
|
258
264
|
- features/support/ios/screens/products_screen.rb
|
|
265
|
+
- features/support/ios/screens/qr_code_scanner_screen.rb
|
|
259
266
|
- features/support/ios/screens/saucebot_screen.rb
|
|
260
267
|
- features/support/ios/screens/webview_screen.rb
|
|
261
268
|
- features/support/ios/sections/list_items/product_cell_item.rb
|
|
262
|
-
- features/support/ios/sections/modals/base_modal.rb
|
|
263
|
-
- features/support/ios/sections/modals/logout_modal.rb
|
|
264
|
-
- features/support/ios/sections/modals/reset_app_state_modal.rb
|
|
265
269
|
- features/support/ios/sections/nav_widgets/nav_bar.rb
|
|
266
270
|
- features/support/ios/sections/nav_widgets/nav_menu.rb
|
|
267
271
|
- features/support/shared_components/screens/base_app_screen.rb
|
|
@@ -316,7 +320,7 @@ homepage: https://github.com/TestCentricity/testcentricity
|
|
|
316
320
|
licenses:
|
|
317
321
|
- BSD-3-Clause
|
|
318
322
|
metadata:
|
|
319
|
-
changelog_uri: https://github.com/TestCentricity/testcentricity/blob/
|
|
323
|
+
changelog_uri: https://github.com/TestCentricity/testcentricity/blob/master/CHANGELOG.md
|
|
320
324
|
documentation_uri: https://www.rubydoc.info/gems/testcentricity
|
|
321
325
|
post_install_message:
|
|
322
326
|
rdoc_options: []
|
|
@@ -337,8 +341,8 @@ requirements:
|
|
|
337
341
|
rubygems_version: 3.1.6
|
|
338
342
|
signing_key:
|
|
339
343
|
specification_version: 4
|
|
340
|
-
summary: A Page Object Model Framework for
|
|
341
|
-
testing
|
|
344
|
+
summary: A Page Object Model Framework for native mobile app and desktop/mobile web
|
|
345
|
+
portal testing
|
|
342
346
|
test_files:
|
|
343
347
|
- features/deep_links.feature
|
|
344
348
|
- features/login.feature
|
|
@@ -346,27 +350,31 @@ test_files:
|
|
|
346
350
|
- features/step_definitions/generic_steps.rb
|
|
347
351
|
- features/support/android/screens/about_screen.rb
|
|
348
352
|
- features/support/android/screens/base_app_screen.rb
|
|
353
|
+
- features/support/android/screens/biometrics_screen.rb
|
|
349
354
|
- features/support/android/screens/checkout_address_screen.rb
|
|
350
355
|
- features/support/android/screens/checkout_payment_screen.rb
|
|
356
|
+
- features/support/android/screens/geo_location_screen.rb
|
|
351
357
|
- features/support/android/screens/login_screen.rb
|
|
352
358
|
- features/support/android/screens/products_screen.rb
|
|
359
|
+
- features/support/android/screens/qr_code_scanner_screen.rb
|
|
353
360
|
- features/support/android/screens/saucebot_screen.rb
|
|
354
361
|
- features/support/android/screens/webview_screen.rb
|
|
355
362
|
- features/support/android/sections/nav_widgets/nav_menu.rb
|
|
363
|
+
- features/support/data/user_data.rb
|
|
356
364
|
- features/support/env.rb
|
|
357
365
|
- features/support/hooks.rb
|
|
358
366
|
- features/support/ios/screens/about_screen.rb
|
|
359
367
|
- features/support/ios/screens/base_app_screen.rb
|
|
368
|
+
- features/support/ios/screens/biometrics_screen.rb
|
|
360
369
|
- features/support/ios/screens/checkout_address_screen.rb
|
|
361
370
|
- features/support/ios/screens/checkout_payment_screen.rb
|
|
371
|
+
- features/support/ios/screens/geo_location_screen.rb
|
|
362
372
|
- features/support/ios/screens/login_screen.rb
|
|
363
373
|
- features/support/ios/screens/products_screen.rb
|
|
374
|
+
- features/support/ios/screens/qr_code_scanner_screen.rb
|
|
364
375
|
- features/support/ios/screens/saucebot_screen.rb
|
|
365
376
|
- features/support/ios/screens/webview_screen.rb
|
|
366
377
|
- features/support/ios/sections/list_items/product_cell_item.rb
|
|
367
|
-
- features/support/ios/sections/modals/base_modal.rb
|
|
368
|
-
- features/support/ios/sections/modals/logout_modal.rb
|
|
369
|
-
- features/support/ios/sections/modals/reset_app_state_modal.rb
|
|
370
378
|
- features/support/ios/sections/nav_widgets/nav_bar.rb
|
|
371
379
|
- features/support/ios/sections/nav_widgets/nav_menu.rb
|
|
372
380
|
- features/support/shared_components/screens/base_app_screen.rb
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
class BaseIOSModal < TestCentricity::ScreenSection
|
|
2
|
-
trait(:section_name) { 'Base iOS Modal' }
|
|
3
|
-
trait(:section_locator) { { class: 'XCUIElementTypeAlert' } }
|
|
4
|
-
|
|
5
|
-
# Base Modal UI elements
|
|
6
|
-
alert :alert_modal, { class: 'XCUIElementTypeAlert' }
|
|
7
|
-
|
|
8
|
-
def await_and_respond(action, timeout)
|
|
9
|
-
if alert_modal.await(timeout)
|
|
10
|
-
case action
|
|
11
|
-
when :allow, :accept
|
|
12
|
-
alert_modal.accept
|
|
13
|
-
when :dont_allow, :dismiss
|
|
14
|
-
alert_modal.dismiss
|
|
15
|
-
else
|
|
16
|
-
raise "#{action} is not a valid selector"
|
|
17
|
-
end
|
|
18
|
-
true
|
|
19
|
-
else
|
|
20
|
-
false
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|