testcentricity 3.0.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +48 -46
  4. data/lib/testcentricity/app_core/appium_connect_helper.rb +6 -8
  5. data/lib/testcentricity/app_core/screen_section.rb +0 -1
  6. data/lib/testcentricity/app_elements/app_element_helper.rb +14 -4
  7. data/lib/testcentricity/version.rb +1 -1
  8. metadata +13 -158
  9. data/.gitignore +0 -40
  10. data/.rspec +0 -4
  11. data/.rubocop.yml +0 -38
  12. data/.ruby-version +0 -1
  13. data/.simplecov +0 -9
  14. data/CODE_OF_CONDUCT.md +0 -13
  15. data/Gemfile +0 -6
  16. data/Rakefile +0 -63
  17. data/config/cucumber.yml +0 -146
  18. data/config/locales/en-US.yml +0 -56
  19. data/config/test_data/data.yml +0 -76
  20. data/features/deep_links.feature +0 -38
  21. data/features/login.feature +0 -30
  22. data/features/navigation.feature +0 -43
  23. data/features/step_definitions/generic_steps.rb +0 -67
  24. data/features/support/android/screens/about_screen.rb +0 -11
  25. data/features/support/android/screens/base_app_screen.rb +0 -31
  26. data/features/support/android/screens/biometrics_screen.rb +0 -17
  27. data/features/support/android/screens/checkout_address_screen.rb +0 -17
  28. data/features/support/android/screens/checkout_payment_screen.rb +0 -22
  29. data/features/support/android/screens/geo_location_screen.rb +0 -28
  30. data/features/support/android/screens/login_screen.rb +0 -18
  31. data/features/support/android/screens/product_item_screen.rb +0 -39
  32. data/features/support/android/screens/products_screen.rb +0 -27
  33. data/features/support/android/screens/qr_code_scanner_screen.rb +0 -15
  34. data/features/support/android/screens/saucebot_screen.rb +0 -16
  35. data/features/support/android/screens/webview_screen.rb +0 -13
  36. data/features/support/android/sections/list_items/product_list_item.rb +0 -13
  37. data/features/support/android/sections/nav_widgets/nav_menu.rb +0 -39
  38. data/features/support/data/product_data.rb +0 -27
  39. data/features/support/data/user_data.rb +0 -17
  40. data/features/support/env.rb +0 -62
  41. data/features/support/hooks.rb +0 -135
  42. data/features/support/ios/screens/about_screen.rb +0 -11
  43. data/features/support/ios/screens/base_app_screen.rb +0 -20
  44. data/features/support/ios/screens/biometrics_screen.rb +0 -17
  45. data/features/support/ios/screens/checkout_address_screen.rb +0 -17
  46. data/features/support/ios/screens/checkout_payment_screen.rb +0 -22
  47. data/features/support/ios/screens/geo_location_screen.rb +0 -32
  48. data/features/support/ios/screens/login_screen.rb +0 -18
  49. data/features/support/ios/screens/product_item_screen.rb +0 -39
  50. data/features/support/ios/screens/products_screen.rb +0 -27
  51. data/features/support/ios/screens/qr_code_scanner_screen.rb +0 -11
  52. data/features/support/ios/screens/saucebot_screen.rb +0 -16
  53. data/features/support/ios/screens/webview_screen.rb +0 -13
  54. data/features/support/ios/sections/list_items/product_list_item.rb +0 -13
  55. data/features/support/ios/sections/nav_widgets/nav_bar.rb +0 -31
  56. data/features/support/ios/sections/nav_widgets/nav_menu.rb +0 -41
  57. data/features/support/shared_components/screens/base_app_screen.rb +0 -35
  58. data/features/support/shared_components/screens/checkout_address_screen.rb +0 -17
  59. data/features/support/shared_components/screens/checkout_payment_screen.rb +0 -22
  60. data/features/support/shared_components/screens/login_screen.rb +0 -39
  61. data/features/support/shared_components/screens/saucebot_screen.rb +0 -17
  62. data/features/support/shared_components/screens/webview_screen.rb +0 -12
  63. data/features/support/shared_components/sections/nav_menu.rb +0 -58
  64. data/features/support/world_data.rb +0 -15
  65. data/features/support/world_pages.rb +0 -30
  66. data/reports/.keep +0 -1
  67. data/spec/fixtures/page_object.rb +0 -22
  68. data/spec/fixtures/page_section_object.rb +0 -21
  69. data/spec/fixtures/screen_object.rb +0 -16
  70. data/spec/fixtures/screen_section_object.rb +0 -16
  71. data/spec/spec_helper.rb +0 -33
  72. data/spec/testcentricity/elements/button_spec.rb +0 -18
  73. data/spec/testcentricity/elements/checkbox_spec.rb +0 -28
  74. data/spec/testcentricity/elements/image_spec.rb +0 -13
  75. data/spec/testcentricity/elements/label_spec.rb +0 -18
  76. data/spec/testcentricity/elements/list_spec.rb +0 -13
  77. data/spec/testcentricity/elements/ui_element_spec.rb +0 -72
  78. data/spec/testcentricity/mobile/appium_connect_spec.rb +0 -117
  79. data/spec/testcentricity/mobile/screen_object_spec.rb +0 -63
  80. data/spec/testcentricity/mobile/screen_section_object_spec.rb +0 -56
  81. data/spec/testcentricity/version_spec.rb +0 -7
  82. data/spec/testcentricity/web/browser_spec.rb +0 -41
  83. data/spec/testcentricity/web/local_webdriver_spec.rb +0 -86
  84. data/spec/testcentricity/web/mobile_webdriver_spec.rb +0 -123
  85. data/spec/testcentricity/web/page_object_spec.rb +0 -85
  86. data/spec/testcentricity/web/page_section_object_spec.rb +0 -72
  87. data/testcentricity.gemspec +0 -48
data/.rubocop.yml DELETED
@@ -1,38 +0,0 @@
1
- # See full list of defaults here: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
- # To see all cops used see here: https://github.com/bbatsov/rubocop/blob/master/config/enabled.yml
3
-
4
- Documentation:
5
- Enabled: false
6
-
7
- AccessorMethodName:
8
- Enabled: false
9
-
10
- TrivialAccessors:
11
- Enabled: false
12
-
13
- RedundantReturn:
14
- Enabled: false
15
-
16
- Metrics/ModuleLength:
17
- Enabled: false
18
-
19
- Metrics/ClassLength:
20
- Enabled: false
21
-
22
- Metrics/LineLength:
23
- Enabled: false
24
-
25
- Metrics/MethodLength:
26
- Enabled: false
27
-
28
- Style/RegexpLiteral:
29
- Enabled: false
30
-
31
- Style/HashSyntax:
32
- Enabled: false
33
-
34
- Metrics/CyclomaticComplexity:
35
- Enabled: false
36
-
37
- Layout/EmptyLines:
38
- Enabled: false
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby-2.7.5
data/.simplecov DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'simplecov'
4
-
5
- SimpleCov.start do
6
- add_filter '/features/'
7
- add_filter '/spec/'
8
- merge_timeout 3600
9
- end
data/CODE_OF_CONDUCT.md DELETED
@@ -1,13 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
-
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
-
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
-
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
-
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
-
13
- This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in testcentricity.gemspec
4
- gemspec
5
-
6
- gem 'redcarpet', :groups => [:development, :test]
data/Rakefile DELETED
@@ -1,63 +0,0 @@
1
- require 'rubygems'
2
- require 'cucumber'
3
- require 'cucumber/rake/task'
4
- require 'rake'
5
- require 'rspec/core/rake_task'
6
- require 'simplecov'
7
- require 'yard'
8
-
9
-
10
- desc 'Run required specs'
11
- RSpec::Core::RakeTask.new(:required_specs) do |t|
12
- t.rspec_opts = '--tag required'
13
- end
14
-
15
-
16
- desc 'Run web specs'
17
- RSpec::Core::RakeTask.new(:web_specs) do |t|
18
- t.rspec_opts = '--tag web'
19
- end
20
-
21
-
22
- desc 'Run Cucumber features on iOS simulator'
23
- Cucumber::Rake::Task.new(:ios_sim) do |t|
24
- t.profile = 'ios_sim'
25
- end
26
-
27
-
28
- desc 'Run Cucumber features on Android simulator'
29
- Cucumber::Rake::Task.new(:android_sim) do |t|
30
- t.profile = 'android_sim'
31
- end
32
-
33
-
34
- desc 'Run required specs and Cucumber features'
35
- task required: [:required_specs, :android_sim, :ios_sim]
36
-
37
-
38
- desc 'Run all specs'
39
- task all_specs: [:required_specs, :web_specs]
40
-
41
-
42
- desc 'Run all specs and Cucumber features'
43
- task all: [:required_specs, :web_specs, :android_sim, :ios_sim]
44
-
45
-
46
- desc 'Update HTML docs'
47
- YARD::Rake::YardocTask.new(:docs) do |t|
48
- t.files = ['lib/**/*.rb']
49
- end
50
-
51
-
52
- desc 'Build and release new version'
53
- task :release do
54
- version = TestCentricity::VERSION
55
- puts "Releasing version #{version} of TestCentricity gem, y/n?"
56
- exit(1) unless $stdin.gets.chomp == 'y'
57
- sh 'gem build testcentricity.gemspec && ' \
58
- "gem push testcentricity-#{version}.gem"
59
- end
60
-
61
-
62
- desc 'Update docs, build gem, and push to RubyGems'
63
- task ship_it: [:docs, :release]
data/config/cucumber.yml DELETED
@@ -1,146 +0,0 @@
1
- <% desktop = "--require features BROWSER_TILE=true BROWSER_SIZE=1300,1000 --publish-quiet" %>
2
- <% mobile = "--require features --publish-quiet" %>
3
- <% reports = "--require features --format pretty --format html --out reports/test_results.html --format junit --out reports --format json --out reports/test_results.json" %>
4
- <% regression = "--tags '@regression and (not @wip and not @failing)' --require features" %>
5
- <% acceptance = "--tags '@bat and (not @wip and not @failing)' --require features" %>
6
-
7
-
8
- #==============
9
- # generic test context profiles
10
- #==============
11
-
12
- failing: --tags '@failing and not @wip'
13
- wip: --tags '@wip and not @failing'
14
- dev: --tags '@dev and (not @wip and not @failing)'
15
- regress: <%= regression %>
16
- bvt: <%= acceptance %>
17
-
18
-
19
- #==============
20
- # test reporting profiles
21
- #==============
22
-
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
25
-
26
-
27
- #==============
28
- # conditionally load Page and Screen Object implementations based on which target platform we're running on
29
- #==============
30
-
31
- ios: PLATFORM=ios --tags @ios -r features/support/ios -e features/support/android
32
- android: PLATFORM=android --tags @android -r features/support/android -e features/support/ios
33
- web: PLATFORM=web --tags @web -r features/support/web -e features/support/ios -e features/support/android
34
-
35
-
36
- #==============
37
- # target_test_environment profiles
38
- #==============
39
-
40
- local: TEST_ENVIRONMENT=LOCAL
41
- debug: DEBUG=true
42
-
43
-
44
- #==============
45
- # profiles for mobile device screen orientation
46
- #==============
47
-
48
- landscape: ORIENTATION=landscape
49
- portrait: ORIENTATION=portrait
50
-
51
-
52
- #==============
53
- # profile to start Appium Server prior to running mobile browser tests on iOS or Android simulators or physical devices
54
- #==============
55
- run_appium: APPIUM_SERVER=run
56
- upload_app: UPLOAD_APP=true
57
-
58
-
59
- #==============
60
- # profiles for native iOS apps hosted within XCode iOS simulators
61
- # NOTE: Requires installation of XCode, iOS version specific target simulators, and Appium
62
- #==============
63
-
64
- appium_ios: WEB_BROWSER=appium --profile ios AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="iOS" NEW_COMMAND_TIMEOUT="30" <%= mobile %>
65
- app_ios_14: --profile appium_ios APP_VERSION="14.5"
66
- app_ios_15: --profile appium_ios APP_VERSION="15.4"
67
-
68
- iphone_12PM_14_sim: --profile app_ios_14 DEVICE_TYPE=phone APP_DEVICE="iPhone 12 Pro Max"
69
- iphone_13PM_15_sim: --profile app_ios_15 DEVICE_TYPE=phone APP_DEVICE="iPhone 13 Pro Max"
70
- iphone_11_14_sim: --profile app_ios_14 DEVICE_TYPE=phone APP_DEVICE="iPhone 11"
71
- ipad_pro_12_15_sim: --profile app_ios_15 DEVICE_TYPE=tablet APP_DEVICE="iPad Pro (12.9-inch) (5th generation)"
72
- ios_sim: --profile iphone_13PM_15_sim --profile local --profile run_appium
73
-
74
-
75
- #==============
76
- # profiles for native Android apps hosted within Android Studio Android Virtual Device emulators
77
- # NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, and Appium
78
- #==============
79
-
80
- appium_android: WEB_BROWSER=appium --profile android AUTOMATION_ENGINE=UiAutomator2 APP_PLATFORM_NAME="Android" <%= mobile %>
81
- app_android_12: --profile appium_android APP_VERSION="12.0"
82
- pixel_5_api31_sim: --profile app_android_12 DEVICE_TYPE=phone APP_DEVICE="Pixel_5_API_31"
83
- android_sim: --profile pixel_5_api31_sim --profile local --profile run_appium
84
-
85
-
86
- #==============
87
- # profiles for remotely hosted devices on the BrowserStack service
88
- #==============
89
-
90
- browserstack: WEB_BROWSER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>" TEST_CONTEXT="TestCentricity"
91
-
92
- # BrowserStack iOS real device native app profiles
93
- bs_ios: --profile browserstack --profile ios BS_OS=ios <%= mobile %>
94
- bs_iphone: --profile bs_ios DEVICE_TYPE=phone
95
- bs_iphone13PM_15: --profile bs_iphone BS_OS_VERSION="15" BS_DEVICE="iPhone 13 Pro Max"
96
- bs_iphone11_14: --profile bs_iphone BS_OS_VERSION="14" BS_DEVICE="iPhone 11"
97
-
98
- # BrowserStack Android real device native app profiles
99
- bs_android: --profile browserstack --profile android BS_OS=android <%= mobile %>
100
- bs_pixel5: --profile bs_android BS_DEVICE="Google Pixel 5" BS_OS_VERSION="12.0" DEVICE_TYPE=phone
101
-
102
-
103
- #==============
104
- # profiles for remotely hosted devices on the SauceLabs service
105
- #==============
106
-
107
- saucelabs: WEB_BROWSER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="us-west-1" AUTOMATE_PROJECT="TestCentricity - SauceLabs"
108
-
109
- # SauceLabs iOS real device native app profiles
110
- sl_ios: --profile saucelabs --profile ios SL_OS=ios <%= mobile %>
111
- sl_iphone: --profile sl_ios DEVICE_TYPE=phone
112
- sl_iphone13PM_15: --profile sl_iphone SL_DEVICE="iPhone 13 Pro Max Simulator" SL_OS_VERSION="15.4"
113
-
114
- # SauceLabs Android real device native app profiles
115
- sl_android: --profile saucelabs --profile android SL_OS=android <%= mobile %>
116
- sl_pixel5: --profile sl_android SL_DEVICE="Google Pixel 5 GoogleAPI Emulator" SL_OS_VERSION="12.0" DEVICE_TYPE=phone
117
-
118
-
119
- #==============
120
- # profiles for remotely hosted devices on the TestingBot service
121
- #==============
122
-
123
- testingbot: WEB_BROWSER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TestCentricity - TestingBot"
124
-
125
- # TestingBot iOS real device native app profiles
126
- tb_ios: --profile testingbot --profile ios TB_OS=iOS <%= mobile %>
127
- tb_iphone: --profile tb_ios DEVICE_TYPE=phone
128
- tb_iphone11_14_dev: --profile tb_iphone TB_OS_VERSION="14.0" TB_DEVICE="iPhone 11" REAL_DEVICE=true
129
- tb_iphone11_14_sim: --profile tb_iphone TB_OS_VERSION="14.2" TB_DEVICE="iPhone 11"
130
- tb_iphone13PM_15_sim: --profile tb_iphone TB_OS_VERSION="15.4" TB_DEVICE="iPhone 13 Pro Max"
131
-
132
- # TestingBot Android real device native app profiles
133
- tb_android: --profile testingbot --profile android TB_OS=Android <%= mobile %>
134
- tb_pixel_dev: --profile tb_android TB_DEVICE="Pixel" TB_OS_VERSION="9.0" DEVICE_TYPE=phone REAL_DEVICE=true
135
- tb_pixel6_sim: --profile tb_android TB_DEVICE="Pixel 6" TB_OS_VERSION="12.0" DEVICE_TYPE=phone
136
-
137
-
138
- #==============
139
- # profiles for remotely hosted devices on the LambdaTest service
140
- #==============
141
-
142
- lambdatest: WEB_BROWSER=lambdatest LT_USERNAME="<INSERT USER NAME HERE>" LT_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TestCentricity - LambdaTest"
143
-
144
- # LambdaTest iOS real device native app profiles
145
- lt_ios: --profile lambdatest --profile ios LT_OS=iOS <%= mobile %>
146
- lt_iphone: --profile lt_ios DEVICE_TYPE=phone
@@ -1,56 +0,0 @@
1
- # Localization file for English/U.S. locale.
2
-
3
- en-US:
4
- time:
5
- formats:
6
- default: "%m/%d/%Y"
7
- long: "%B %d, %Y"
8
- short: "%b %d"
9
- abbrev: "%b %d, %Y"
10
- abbrev_month: "%b"
11
- month_year: "%B %Y"
12
- date:
13
- abbr_day_names:
14
- - Sun
15
- - Mon
16
- - Tue
17
- - Wed
18
- - Thu
19
- - Fri
20
- - Sat
21
- abbr_month_names:
22
- -
23
- - Jan
24
- - Feb
25
- - Mar
26
- - Apr
27
- - May
28
- - Jun
29
- - Jul
30
- - Aug
31
- - Sep
32
- - Oct
33
- - Nov
34
- - Dec
35
- day_names:
36
- - Sunday
37
- - Monday
38
- - Tuesday
39
- - Wednesday
40
- - Thursday
41
- - Friday
42
- - Saturday
43
- month_names:
44
- -
45
- - January
46
- - February
47
- - March
48
- - April
49
- - May
50
- - June
51
- - July
52
- - August
53
- - September
54
- - October
55
- - November
56
- - December
@@ -1,76 +0,0 @@
1
- # This section is populated with Environment data required to execute automated test suites on all supported environments
2
- Environments:
3
- LOCAL:
4
- DEEP_LINK_PREFIX: 'mydemoapprn'
5
- IOS_BUNDLE_ID: 'com.saucelabs.mydemoapp.rn'
6
- ANDROID_APP_ID: 'com.saucelabs.mydemoapp.rn'
7
- IOS_APP_PATH: '/Users/Shared/Test_Apps/iOS/MyRNDemoApp.app'
8
- IOS_IPA_PATH: '/Users/Shared/Test_Apps/iOS/iOS-Real-Device-MyRNDemoApp.1.3.0-162.ipa'
9
- ANDROID_APK_PATH: '/Users/Shared/Test_Apps/Android/Android-MyDemoAppRN.1.2.0.build-231.apk'
10
-
11
- # This section is populated with user credential data required to test the Login screen features
12
- User_creds:
13
- valid_data:
14
- username: 'bob@example.com'
15
- password: '10203040'
16
- invalid_user:
17
- username: 'iggy.snicklefritz@example.com'
18
- password: '10203040'
19
- locked_account:
20
- username: 'alice@example.com'
21
- password: '10203040'
22
- no_username:
23
- password: '10203040'
24
- no_password:
25
- username: 'bob@example.com'
26
-
27
- # This section is populated with Product data required for testing the Shopping features
28
- Products:
29
- 1:
30
- id: 1
31
- name: 'Sauce Labs Backpack'
32
- description: 'carry.allTheThings() with the sleek, streamlined Sly Pack that melds uncompromising style with unequaled laptop and tablet protection.'
33
- price: '$29.99'
34
- review: 4
35
- colors: ['BLACK', 'BLUE', 'GRAY', 'RED']
36
- defaultColor: 'BLACK'
37
- 2:
38
- id: 2
39
- name: 'Sauce Labs Bike Light'
40
- description: "A red light isn't the desired state in testing but it sure helps when riding your bike at night. Water-resistant with 3 lighting modes, 1 AAA battery included."
41
- price: '$9.99'
42
- review: 4
43
- colors: ['BLACK']
44
- defaultColor: 'BLACK'
45
- 3:
46
- id: 3
47
- name: 'Sauce Labs Bolt T-Shirt'
48
- description: 'Get your testing superhero on with the Sauce Labs bolt T-shirt. From American Apparel, 100% ringspun combed cotton, heather gray with red bolt.'
49
- price: '$15.99'
50
- review: 4
51
- colors: ['BLACK']
52
- defaultColor: 'BLACK'
53
- 4:
54
- id: 4
55
- name: 'Sauce Labs Fleece Jacket'
56
- description: "It's not every day that you come across a midweight quarter-zip fleece jacket capable of handling everything from a relaxing day outdoors to a busy day at the office."
57
- price: '$49.99'
58
- review: 4
59
- colors: ['GRAY']
60
- defaultColor: 'GRAY'
61
- 5:
62
- id: 5
63
- name: 'Sauce Labs Onesie'
64
- description: "Rib snap infant onesie for the junior automation engineer in development. Reinforced 3-snap bottom closure, two-needle hemmed sleeved and bottom won't unravel."
65
- price: '$7.99'
66
- review: 4
67
- colors: ['BLACK', 'GRAY', 'RED']
68
- defaultColor: 'RED'
69
- 6:
70
- id: 6
71
- name: 'Test.allTheThings() T-Shirt'
72
- description: 'This classic Sauce Labs t-shirt is perfect to wear when cozying up to your keyboard to automate a few tests. Super-soft and comfy ringspun combed cotton.'
73
- price: '$15.99'
74
- review: 4
75
- colors: ['BLACK', 'GRAY', 'RED']
76
- defaultColor: 'RED'
@@ -1,38 +0,0 @@
1
- @mobile @ios @android @regression
2
-
3
-
4
- Feature: App screen deep links
5
- In order to ensure comprehensive support for native app deep links
6
- As a developer of the TestCentricity gem
7
- I expect to validate that app screens can be directly accessed with minimal UI interactions
8
-
9
-
10
- Background:
11
- Given I have launched the SauceLabs My Demo app
12
-
13
-
14
- Scenario Outline: Verify screens can be directly accessed via deep links
15
- Given I am on the <start> screen
16
- When I load the <destination> screen
17
- Then I expect the <destination> screen to be correctly displayed
18
-
19
- Examples:
20
- |start |destination |
21
- |Products |About |
22
- |Products |Login |
23
- |Products |Webview |
24
- |Products |Checkout - Address |
25
- |Products |Checkout - Payment |
26
- |About |Products |
27
-
28
-
29
- Scenario Outline: Verify Product Item screen can be directly accessed via deep links
30
- Given I am on the Products screen
31
- And I access the data for product id <product_id>
32
- When I load the Product Item screen
33
- Then I expect the Product Item screen to be correctly displayed
34
-
35
- Examples:
36
- |product_id |
37
- |1 |
38
- |5 |
@@ -1,30 +0,0 @@
1
- @mobile @ios @android @regression
2
-
3
-
4
- Feature: Login page
5
- In order to ensure comprehensive support for native app login features
6
- As a developer of the TestCentricity gem
7
- I expect users to access the app only with valid login credentials
8
-
9
-
10
- Background:
11
- Given I have launched the SauceLabs My Demo app
12
-
13
-
14
- Scenario: Verify login with valid credentials
15
- Given I am on the Login screen
16
- When I enter user credentials with valid data
17
- Then I expect the Checkout - Address screen to be correctly displayed
18
-
19
-
20
- Scenario Outline: Verify correct error states when using invalid credentials
21
- Given I am on the Login screen
22
- When I enter user credentials with <reason>
23
- Then I expect an error to be displayed due to <reason>
24
-
25
- Examples:
26
- |reason |
27
- |no username |
28
- |no password |
29
- |locked account |
30
- |invalid user |
@@ -1,43 +0,0 @@
1
- @mobile @ios @android @regression
2
-
3
-
4
- Feature: Screen Navigation
5
- In order to ensure comprehensive support for native app navigation features
6
- As a developer of the TestCentricity gem
7
- I expect to validate that app screens can be accessed via navigation controls
8
-
9
-
10
- Background:
11
- Given I have launched the SauceLabs My Demo app
12
- And I am on the Products screen
13
-
14
-
15
- Scenario: Verify navigation menu can be invoked and is properly displayed
16
- When I open the navigation menu
17
- Then I expect the navigation menu to be correctly displayed
18
- When I close the navigation menu
19
- Then I expect the navigation menu to be hidden
20
-
21
-
22
- Scenario Outline: Verify screen navigation features
23
- When I tap the <screen_name> navigation menu item
24
- Then I expect the <screen_name> screen to be correctly displayed
25
-
26
- Examples:
27
- |screen_name |
28
- |About |
29
- |Login |
30
- |Webview |
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 |
@@ -1,67 +0,0 @@
1
- include TestCentricity
2
-
3
-
4
- Given(/^I have launched the SauceLabs My Demo app$/) do
5
- # activate the app
6
- AppiumConnect.launch_app
7
- end
8
-
9
-
10
- When(/^I (?:load|am on) the (.*) (?:page|screen)$/) do |screen_name|
11
- # find and load the specified target page/screen
12
- target_page = PageManager.find_page(screen_name)
13
- target_page.load_page
14
- end
15
-
16
-
17
- When(/^I (?:click|tap) the ([^\"]*) navigation menu item$/) do |screen_name|
18
- # find and navigate to the specified target page/screen
19
- target_page = PageManager.find_page(screen_name)
20
- target_page.navigate_to
21
- PageManager.current_page = target_page
22
- end
23
-
24
-
25
- Then(/^I expect the (.*) (?:page|screen) to be correctly displayed$/) do |screen_name|
26
- # find and verify that the specified target page/screen is loaded
27
- target_page = PageManager.find_page(screen_name)
28
- target_page.verify_page_exists
29
- # verify that target page/screen is correctly displayed
30
- target_page.verify_page_ui
31
- end
32
-
33
-
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)
37
- end
38
-
39
-
40
- Then(/^I expect an error to be displayed due to (.*)$/) do |reason|
41
- PageManager.current_page.verify_entry_error(reason)
42
- end
43
-
44
-
45
- When(/^I (.*) the navigation menu$/) do |action|
46
- PageManager.current_page.nav_menu_action(action)
47
- end
48
-
49
-
50
- Then(/^I expect the navigation menu to be correctly displayed$/) do
51
- PageManager.current_page.verify_nav_menu(state = :displayed)
52
- end
53
-
54
-
55
- Then(/^I expect the navigation menu to be hidden$/) do
56
- PageManager.current_page.verify_nav_menu(state = :closed)
57
- end
58
-
59
-
60
- When(/^I (.*) the popup request modal$/) do |action|
61
- PageManager.current_page.modal_action(action)
62
- end
63
-
64
-
65
- When(/^I access the data for product id (.*)$/) do |product_id|
66
- product_data_source.find_product(product_id)
67
- end
@@ -1,11 +0,0 @@
1
- class AboutScreen < BaseAppScreen
2
- trait(:page_name) { 'About' }
3
- trait(:page_locator) { { accessibility_id: 'about screen' } }
4
- trait(:page_url) { 'about' }
5
- trait(:navigator) { nav_menu.open_about }
6
-
7
- def verify_page_ui
8
- super
9
- verify_ui_states(header_label => { visible: true, caption: 'About' })
10
- end
11
- end
@@ -1,31 +0,0 @@
1
- class BaseAppScreen < TestCentricity::ScreenObject
2
- include SharedBaseAppScreen
3
-
4
- trait(:page_name) { 'Base App Screen' }
5
-
6
- # Base App screen UI elements
7
- buttons menu_button: { accessibility_id: 'open menu' },
8
- cart_button: { accessibility_id: 'cart badge' }
9
- labels header_label: { xpath: '//android.view.ViewGroup[@content-desc="container header"]/android.widget.TextView' },
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' }
13
- section :nav_menu, NavMenu
14
-
15
- def verify_page_ui
16
- ui = {
17
- menu_button => { visible: true, enabled: true },
18
- cart_button => { visible: true, enabled: true }
19
- }
20
- verify_ui_states(ui)
21
- end
22
-
23
- def invoke_nav_menu
24
- menu_button.click
25
- nav_menu.wait_until_visible(3)
26
- end
27
-
28
- def open_cart
29
- cart_button.click
30
- end
31
- end
@@ -1,17 +0,0 @@
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
@@ -1,17 +0,0 @@
1
- class CheckoutAddressScreen < BaseAppScreen
2
- include SharedCheckoutAddressScreen
3
-
4
- trait(:page_name) { 'Checkout - Address' }
5
- trait(:page_locator) { { accessibility_id: 'checkout address screen' } }
6
- trait(:page_url) { 'checkout-address' }
7
-
8
- # Checkout Address screen UI elements
9
- textfields fullname_field: { accessibility_id: 'Full Name* input field' },
10
- address1_field: { accessibility_id: 'Address Line 1* input field' },
11
- address2_field: { accessibility_id: 'Address Line 2 input field' },
12
- city_field: { accessibility_id: 'City* input field' },
13
- state_region_field: { accessibility_id: 'State/Region input field' },
14
- zip_code_field: { accessibility_id: 'Zip Code* input field' },
15
- country_field: { accessibility_id: 'Country* input field' }
16
- button :to_payment_button, { accessibility_id: 'To Payment button' }
17
- end