testcentricity_mobile 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,99 @@
1
+ require 'test/unit'
2
+ require 'appium_lib'
3
+
4
+ require 'testcentricity_mobile/version'
5
+ require 'testcentricity_mobile/world_extensions'
6
+ require 'testcentricity_mobile/exception_queue_helper'
7
+ require 'testcentricity_mobile/utility_helpers'
8
+ require 'testcentricity_mobile/appium_server'
9
+
10
+ require 'testcentricity_mobile/data_objects/data_objects_helper'
11
+ require 'testcentricity_mobile/data_objects/environment'
12
+
13
+ require 'testcentricity_mobile/app_core/appium_connect_helper'
14
+ require 'testcentricity_mobile/app_core/screen_objects_helper'
15
+ require 'testcentricity_mobile/app_core/screen_object'
16
+ require 'testcentricity_mobile/app_core/screen_section'
17
+
18
+ require 'testcentricity_mobile/app_elements/app_element'
19
+ require 'testcentricity_mobile/app_elements/button'
20
+ require 'testcentricity_mobile/app_elements/checkbox'
21
+ require 'testcentricity_mobile/app_elements/label'
22
+ require 'testcentricity_mobile/app_elements/switch'
23
+ require 'testcentricity_mobile/app_elements/textfield'
24
+ require 'testcentricity_mobile/app_elements/list'
25
+ require 'testcentricity_mobile/app_elements/image'
26
+ require 'testcentricity_mobile/app_elements/alert'
27
+
28
+
29
+ module TestCentricity
30
+ class ScreenManager
31
+ attr_accessor :current_screen
32
+
33
+ @screen_objects = {}
34
+
35
+ def self.register_screen_objects(screens)
36
+ @screen_objects = screens
37
+ end
38
+
39
+ # Have all ScreenObjects been registered?
40
+ #
41
+ # @return [Boolean] true if all ScreenObjects have been registered
42
+ # @example
43
+ # TestCentricity::ScreenManager.loaded?
44
+ #
45
+ def self.loaded?
46
+ !@screen_objects.empty?
47
+ end
48
+
49
+ def self.find_screen(screen_name)
50
+ screen_id = (screen_name.is_a? String) ? screen_name.gsub(/\s+/, '').downcase.to_sym : screen_name
51
+ screen = @screen_objects[screen_id]
52
+ raise "No screen object defined for screen named '#{screen_name}'" unless screen
53
+ screen
54
+ end
55
+
56
+ # Get the currently active ScreenObject
57
+ #
58
+ # @return [ScreenObject]
59
+ # @example
60
+ # active_screen = TestCentricity::ScreenManager.current_screen
61
+ #
62
+ def self.current_screen
63
+ @current_screen
64
+ end
65
+
66
+ # Sets the currently active ScreenObject
67
+ #
68
+ # @param screen [ScreenObject] Reference to the active ScreenObject
69
+ # @example
70
+ # TestCentricity::ScreenManager.current_screen = product_search_screen
71
+ #
72
+ def self.current_screen=(screen)
73
+ @current_screen = screen
74
+ end
75
+ end
76
+
77
+
78
+ class DataManager
79
+ @data_objects = {}
80
+
81
+ def self.register_data_objects(data)
82
+ @data_objects = data
83
+ end
84
+
85
+ def self.find_data_object(data_object)
86
+ @data_objects[data_object]
87
+ end
88
+
89
+ # Have all DataObjects been registered?
90
+ #
91
+ # @return [Boolean] true if all DataObjects have been registered
92
+ # @example
93
+ # TestCentricity::DataManager.loaded?
94
+ #
95
+ def self.loaded?
96
+ !@data_objects.empty?
97
+ end
98
+ end
99
+ end
metadata ADDED
@@ -0,0 +1,317 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: testcentricity_mobile
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0
5
+ platform: ruby
6
+ authors:
7
+ - A.J. Mrozinski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-03-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cucumber
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 9.1.2
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 9.1.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: parallel_tests
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
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: require_all
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.5.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.5.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 3.12.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 3.12.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.18'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.18'
111
+ - !ruby/object:Gem::Dependency
112
+ name: yard
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 0.9.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 0.9.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: appium_lib
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 14.0.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 14.0.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: childprocess
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: chronic
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 0.10.2
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 0.10.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: faker
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
+ - !ruby/object:Gem::Dependency
182
+ name: i18n
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: json
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: selenium-webdriver
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - '='
214
+ - !ruby/object:Gem::Version
215
+ version: 4.18.1
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - '='
221
+ - !ruby/object:Gem::Version
222
+ version: 4.18.1
223
+ - !ruby/object:Gem::Dependency
224
+ name: test-unit
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: virtus
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ description: |2-
252
+
253
+ The TestCentricityâ„¢ Mobile core framework for native mobile iOS and Android app testing implements a Screen Object
254
+ Model DSL for use with Cucumber or RSpec and Appium. The gem also facilitates the configuration of the appropriate
255
+ Appium capabilities required to establish a connection with locally or cloud hosted (using BrowserStack, Sauce Labs,
256
+ or TestingBot services) iOS or Android devices or simulators.
257
+ email:
258
+ - testcentricity@gmail.com
259
+ executables: []
260
+ extensions: []
261
+ extra_rdoc_files: []
262
+ files:
263
+ - ".yardopts"
264
+ - CHANGELOG.md
265
+ - LICENSE.md
266
+ - README.md
267
+ - lib/testcentricity_mobile.rb
268
+ - lib/testcentricity_mobile/app_core/appium_connect_helper.rb
269
+ - lib/testcentricity_mobile/app_core/screen_object.rb
270
+ - lib/testcentricity_mobile/app_core/screen_objects_helper.rb
271
+ - lib/testcentricity_mobile/app_core/screen_section.rb
272
+ - lib/testcentricity_mobile/app_elements/alert.rb
273
+ - lib/testcentricity_mobile/app_elements/app_element.rb
274
+ - lib/testcentricity_mobile/app_elements/button.rb
275
+ - lib/testcentricity_mobile/app_elements/checkbox.rb
276
+ - lib/testcentricity_mobile/app_elements/image.rb
277
+ - lib/testcentricity_mobile/app_elements/label.rb
278
+ - lib/testcentricity_mobile/app_elements/list.rb
279
+ - lib/testcentricity_mobile/app_elements/switch.rb
280
+ - lib/testcentricity_mobile/app_elements/textfield.rb
281
+ - lib/testcentricity_mobile/appium_server.rb
282
+ - lib/testcentricity_mobile/data_objects/data_objects_helper.rb
283
+ - lib/testcentricity_mobile/data_objects/environment.rb
284
+ - lib/testcentricity_mobile/exception_queue_helper.rb
285
+ - lib/testcentricity_mobile/utility_helpers.rb
286
+ - lib/testcentricity_mobile/version.rb
287
+ - lib/testcentricity_mobile/world_extensions.rb
288
+ homepage: https://github.com/TestCentricity/testcentricity_mobile
289
+ licenses:
290
+ - BSD-3-Clause
291
+ metadata:
292
+ changelog_uri: https://github.com/TestCentricity/testcentricity_mobile/blob/master/CHANGELOG.md
293
+ bug_tracker_uri: https://github.com/TestCentricity/testcentricity_mobile/issues
294
+ wiki_uri: https://github.com/TestCentricity/testcentricity_mobile/wiki
295
+ documentation_uri: https://www.rubydoc.info/gems/testcentricity_mobile
296
+ post_install_message:
297
+ rdoc_options: []
298
+ require_paths:
299
+ - lib
300
+ required_ruby_version: !ruby/object:Gem::Requirement
301
+ requirements:
302
+ - - ">="
303
+ - !ruby/object:Gem::Version
304
+ version: 3.0.0
305
+ required_rubygems_version: !ruby/object:Gem::Requirement
306
+ requirements:
307
+ - - ">="
308
+ - !ruby/object:Gem::Version
309
+ version: '0'
310
+ requirements:
311
+ - Appium
312
+ rubygems_version: 3.2.3
313
+ signing_key:
314
+ specification_version: 4
315
+ summary: A Screen Object Model Framework for native mobile iOS and/or Android app
316
+ testing
317
+ test_files: []