ruby_raider 1.1.4 → 2.0.0

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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/integration.yml +4 -6
  3. data/.github/workflows/reek.yml +6 -5
  4. data/.github/workflows/release.yml +175 -0
  5. data/.github/workflows/rubocop.yml +7 -6
  6. data/.github/workflows/system_tests.yml +83 -0
  7. data/.gitignore +1 -1
  8. data/.rubocop.yml +24 -0
  9. data/README.md +3 -1
  10. data/RELEASE.md +412 -0
  11. data/RELEASE_QUICK_GUIDE.md +77 -0
  12. data/bin/release +186 -0
  13. data/lib/adopter/adopt_menu.rb +150 -0
  14. data/lib/adopter/converters/base_converter.rb +85 -0
  15. data/lib/adopter/converters/identity_converter.rb +56 -0
  16. data/lib/adopter/migration_plan.rb +75 -0
  17. data/lib/adopter/migrator.rb +96 -0
  18. data/lib/adopter/plan_builder.rb +278 -0
  19. data/lib/adopter/project_analyzer.rb +256 -0
  20. data/lib/adopter/project_detector.rb +159 -0
  21. data/lib/commands/adopt_commands.rb +43 -0
  22. data/lib/generators/automation/templates/account.tt +9 -5
  23. data/lib/generators/automation/templates/appium_caps.tt +60 -6
  24. data/lib/generators/automation/templates/home.tt +4 -4
  25. data/lib/generators/automation/templates/login.tt +61 -4
  26. data/lib/generators/automation/templates/page.tt +13 -7
  27. data/lib/generators/automation/templates/partials/home_page_selector.tt +4 -4
  28. data/lib/generators/automation/templates/partials/initialize_selector.tt +3 -1
  29. data/lib/generators/automation/templates/partials/pdp_page_selector.tt +4 -4
  30. data/lib/generators/automation/templates/partials/visit_method.tt +11 -1
  31. data/lib/generators/automation/templates/pdp.tt +1 -1
  32. data/lib/generators/cucumber/templates/env.tt +6 -4
  33. data/lib/generators/cucumber/templates/partials/capybara_env.tt +20 -0
  34. data/lib/generators/cucumber/templates/partials/capybara_world.tt +6 -0
  35. data/lib/generators/cucumber/templates/partials/mobile_steps.tt +2 -2
  36. data/lib/generators/cucumber/templates/partials/web_steps.tt +4 -3
  37. data/lib/generators/cucumber/templates/steps.tt +2 -2
  38. data/lib/generators/cucumber/templates/world.tt +5 -3
  39. data/lib/generators/generator.rb +14 -2
  40. data/lib/generators/helper_generator.rb +16 -3
  41. data/lib/generators/infrastructure/github_generator.rb +6 -0
  42. data/lib/generators/infrastructure/templates/github.tt +11 -7
  43. data/lib/generators/infrastructure/templates/github_appium.tt +108 -0
  44. data/lib/generators/infrastructure/templates/gitlab.tt +5 -2
  45. data/lib/generators/invoke_generators.rb +1 -0
  46. data/lib/generators/menu_generator.rb +2 -0
  47. data/lib/generators/minitest/minitest_generator.rb +23 -0
  48. data/lib/generators/minitest/templates/test.tt +93 -0
  49. data/lib/generators/rspec/templates/spec.tt +12 -10
  50. data/lib/generators/template_renderer/partial_cache.rb +116 -0
  51. data/lib/generators/template_renderer/partial_resolver.rb +103 -0
  52. data/lib/generators/template_renderer/template_error.rb +50 -0
  53. data/lib/generators/template_renderer.rb +90 -0
  54. data/lib/generators/templates/common/config.tt +2 -2
  55. data/lib/generators/templates/common/gemfile.tt +15 -3
  56. data/lib/generators/templates/common/partials/web_config.tt +1 -1
  57. data/lib/generators/templates/common/read_me.tt +3 -1
  58. data/lib/generators/templates/helpers/allure_helper.tt +2 -2
  59. data/lib/generators/templates/helpers/browser_helper.tt +1 -0
  60. data/lib/generators/templates/helpers/capybara_helper.tt +28 -0
  61. data/lib/generators/templates/helpers/driver_helper.tt +1 -1
  62. data/lib/generators/templates/helpers/partials/allure_imports.tt +3 -1
  63. data/lib/generators/templates/helpers/partials/allure_requirements.tt +3 -1
  64. data/lib/generators/templates/helpers/partials/appium_driver.tt +46 -0
  65. data/lib/generators/templates/helpers/partials/axe_driver.tt +10 -0
  66. data/lib/generators/templates/helpers/partials/browserstack_config.tt +13 -0
  67. data/lib/generators/templates/helpers/partials/driver_and_options.tt +6 -114
  68. data/lib/generators/templates/helpers/partials/quit_driver.tt +3 -1
  69. data/lib/generators/templates/helpers/partials/screenshot.tt +3 -1
  70. data/lib/generators/templates/helpers/partials/selenium_driver.tt +25 -0
  71. data/lib/generators/templates/helpers/spec_helper.tt +17 -4
  72. data/lib/generators/templates/helpers/test_helper.tt +26 -0
  73. data/lib/generators/templates/helpers/visual_spec_helper.tt +1 -1
  74. data/lib/ruby_raider.rb +5 -0
  75. data/lib/version +1 -1
  76. data/spec/adopter/adopt_menu_spec.rb +176 -0
  77. data/spec/adopter/converters/identity_converter_spec.rb +145 -0
  78. data/spec/adopter/migration_plan_spec.rb +113 -0
  79. data/spec/adopter/migrator_spec.rb +277 -0
  80. data/spec/adopter/plan_builder_spec.rb +298 -0
  81. data/spec/adopter/project_analyzer_spec.rb +337 -0
  82. data/spec/adopter/project_detector_spec.rb +295 -0
  83. data/spec/generators/fixtures/templates/test.tt +1 -0
  84. data/spec/generators/fixtures/templates/test_partial.tt +1 -0
  85. data/spec/generators/template_renderer_spec.rb +298 -0
  86. data/spec/integration/commands/scaffolding_commands_spec.rb +2 -2
  87. data/spec/integration/commands/utility_commands_spec.rb +2 -2
  88. data/spec/integration/end_to_end_spec.rb +325 -0
  89. data/spec/integration/generators/automation_generator_spec.rb +11 -11
  90. data/spec/integration/generators/common_generator_spec.rb +40 -40
  91. data/spec/integration/generators/cucumber_generator_spec.rb +7 -7
  92. data/spec/integration/generators/github_generator_spec.rb +8 -8
  93. data/spec/integration/generators/gitlab_generator_spec.rb +8 -8
  94. data/spec/integration/generators/helpers_generator_spec.rb +73 -35
  95. data/spec/integration/generators/minitest_generator_spec.rb +70 -0
  96. data/spec/integration/generators/rspec_generator_spec.rb +7 -7
  97. data/spec/integration/settings_helper.rb +1 -1
  98. data/spec/integration/spec_helper.rb +20 -2
  99. data/spec/system/capybara_spec.rb +42 -0
  100. data/spec/system/selenium_spec.rb +19 -17
  101. data/spec/system/support/system_test_helper.rb +35 -0
  102. data/spec/system/watir_spec.rb +19 -17
  103. metadata +46 -16
  104. data/.github/workflows/push_gem.yml +0 -37
  105. data/.github/workflows/selenium.yml +0 -22
  106. data/.github/workflows/watir.yml +0 -22
  107. data/lib/generators/automation/templates/partials/android_caps.tt +0 -17
  108. data/lib/generators/automation/templates/partials/cross_platform_caps.tt +0 -25
  109. data/lib/generators/automation/templates/partials/ios_caps.tt +0 -18
  110. data/lib/generators/automation/templates/partials/selenium_account.tt +0 -9
  111. data/lib/generators/automation/templates/partials/selenium_login.tt +0 -34
  112. data/lib/generators/automation/templates/partials/watir_account.tt +0 -7
  113. data/lib/generators/automation/templates/partials/watir_login.tt +0 -32
@@ -1,40 +1,42 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../lib/ruby_raider'
4
+ require_relative 'support/system_test_helper'
2
5
 
3
- FRAMEWORKS = %w[cucumber rspec].freeze
6
+ FRAMEWORKS = %w[cucumber rspec minitest].freeze
4
7
 
5
8
  describe 'Selenium based frameworks' do
6
- before do
9
+ include SystemTestHelper
10
+
11
+ before(:all) do # rubocop:disable RSpec/BeforeAfterAll
7
12
  FRAMEWORKS.each do |framework|
8
13
  RubyRaider::Raider
9
14
  .new.invoke(:new, nil, %W[selenium_#{framework} -p framework:#{framework} automation:selenium])
10
15
  end
11
16
  end
12
17
 
13
- after do
14
- FRAMEWORKS.each do |framework|
15
- FileUtils.rm_rf("selenium_#{framework}")
16
- end
18
+ after(:all) do # rubocop:disable RSpec/BeforeAfterAll
19
+ FRAMEWORKS.each { |framework| FileUtils.rm_rf("selenium_#{framework}") }
17
20
  end
18
21
 
19
- shared_examples 'creates web automation framework' do |type|
20
- it 'executes without errors' do
21
- run_tests_with(type)
22
- expect($stdout).not_to match(/StandardError/)
22
+ shared_examples 'runs tests successfully' do |framework|
23
+ it 'installs dependencies and runs tests without errors' do
24
+ result = run_tests_with(framework, 'selenium')
25
+ expect(result[:success]).to be(true),
26
+ "Tests failed for selenium_#{framework}.\n" \
27
+ "STDOUT: #{result[:stdout]}\nSTDERR: #{result[:stderr]}"
23
28
  end
24
29
  end
25
30
 
26
31
  context 'with rspec' do
27
- include_examples 'creates web automation framework', 'rspec'
32
+ include_examples 'runs tests successfully', 'rspec'
28
33
  end
29
34
 
30
35
  context 'with cucumber' do
31
- include_examples 'creates web automation framework', 'cucumber'
36
+ include_examples 'runs tests successfully', 'cucumber'
32
37
  end
33
38
 
34
- private
35
-
36
- def run_tests_with(framework)
37
- folder = framework == 'rspec' ? 'spec' : 'features'
38
- system("cd selenium_#{framework} && bundle install && raider utility browser_options chrome headless && bundle exec #{framework} #{folder}")
39
+ context 'with minitest' do
40
+ include_examples 'runs tests successfully', 'minitest'
39
41
  end
40
42
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'open3'
4
+
5
+ # :reek:UtilityFunction
6
+ module SystemTestHelper
7
+ # :reek:ControlParameter
8
+ def test_command_for(framework)
9
+ case framework
10
+ when 'cucumber' then 'bundle exec cucumber features --format pretty'
11
+ when 'minitest' then 'bundle exec ruby -Itest test/test_login_page.rb'
12
+ else 'bundle exec rspec spec --format documentation'
13
+ end
14
+ end
15
+
16
+ def run_tests_with(framework, automation)
17
+ project = "#{automation}_#{framework}"
18
+
19
+ Bundler.with_unbundled_env do
20
+ Dir.chdir(project) do
21
+ result = run_command('bundle install --quiet')
22
+ return result unless result[:success]
23
+
24
+ run_command(test_command_for(framework), env: { 'HEADLESS' => 'true' })
25
+ end
26
+ end
27
+ end
28
+
29
+ private
30
+
31
+ def run_command(command, env: {})
32
+ stdout, stderr, status = Open3.capture3(env, command)
33
+ { success: status.success?, stdout:, stderr: }
34
+ end
35
+ end
@@ -1,40 +1,42 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../lib/ruby_raider'
4
+ require_relative 'support/system_test_helper'
2
5
 
3
- FRAMEWORKS = %w[cucumber rspec].freeze
6
+ FRAMEWORKS = %w[cucumber rspec minitest].freeze unless defined?(FRAMEWORKS)
4
7
 
5
8
  describe 'Watir based frameworks' do
6
- before do
9
+ include SystemTestHelper
10
+
11
+ before(:all) do # rubocop:disable RSpec/BeforeAfterAll
7
12
  FRAMEWORKS.each do |framework|
8
13
  RubyRaider::Raider
9
14
  .new.invoke(:new, nil, %W[watir_#{framework} -p framework:#{framework} automation:watir])
10
15
  end
11
16
  end
12
17
 
13
- after do
14
- FRAMEWORKS.each do |framework|
15
- FileUtils.rm_rf("watir_#{framework}")
16
- end
18
+ after(:all) do # rubocop:disable RSpec/BeforeAfterAll
19
+ FRAMEWORKS.each { |framework| FileUtils.rm_rf("watir_#{framework}") }
17
20
  end
18
21
 
19
- shared_examples 'creates web automation framework' do |type|
20
- it 'executes without errors' do
21
- run_tests_with(type)
22
- expect($stdout).not_to match(/StandardError/)
22
+ shared_examples 'runs tests successfully' do |framework|
23
+ it 'installs dependencies and runs tests without errors' do
24
+ result = run_tests_with(framework, 'watir')
25
+ expect(result[:success]).to be(true),
26
+ "Tests failed for watir_#{framework}.\n" \
27
+ "STDOUT: #{result[:stdout]}\nSTDERR: #{result[:stderr]}"
23
28
  end
24
29
  end
25
30
 
26
31
  context 'with rspec' do
27
- include_examples 'creates web automation framework', 'rspec'
32
+ include_examples 'runs tests successfully', 'rspec'
28
33
  end
29
34
 
30
35
  context 'with cucumber' do
31
- include_examples 'creates web automation framework', 'cucumber'
36
+ include_examples 'runs tests successfully', 'cucumber'
32
37
  end
33
38
 
34
- private
35
-
36
- def run_tests_with(framework)
37
- folder = framework == 'rspec' ? 'spec' : 'features'
38
- system("cd watir_#{framework} && bundle install && raider utility browser_options chrome headless && bundle exec #{framework} #{folder}")
39
+ context 'with minitest' do
40
+ include_examples 'runs tests successfully', 'minitest'
39
41
  end
40
42
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_raider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-05-10 00:00:00.000000000 Z
10
+ date: 2026-03-11 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -134,11 +133,10 @@ files:
134
133
  - ".github/ISSUE_TEMPLATE/feature_request.md"
135
134
  - ".github/auto_assign-issues.yml"
136
135
  - ".github/workflows/integration.yml"
137
- - ".github/workflows/push_gem.yml"
138
136
  - ".github/workflows/reek.yml"
137
+ - ".github/workflows/release.yml"
139
138
  - ".github/workflows/rubocop.yml"
140
- - ".github/workflows/selenium.yml"
141
- - ".github/workflows/watir.yml"
139
+ - ".github/workflows/system_tests.yml"
142
140
  - ".gitignore"
143
141
  - ".reek.yml"
144
142
  - ".rubocop.yml"
@@ -148,8 +146,20 @@ files:
148
146
  - Gemfile
149
147
  - LICENSE
150
148
  - README.md
149
+ - RELEASE.md
150
+ - RELEASE_QUICK_GUIDE.md
151
151
  - Rakefile
152
152
  - bin/raider
153
+ - bin/release
154
+ - lib/adopter/adopt_menu.rb
155
+ - lib/adopter/converters/base_converter.rb
156
+ - lib/adopter/converters/identity_converter.rb
157
+ - lib/adopter/migration_plan.rb
158
+ - lib/adopter/migrator.rb
159
+ - lib/adopter/plan_builder.rb
160
+ - lib/adopter/project_analyzer.rb
161
+ - lib/adopter/project_detector.rb
162
+ - lib/commands/adopt_commands.rb
153
163
  - lib/commands/loaded_commands.rb
154
164
  - lib/commands/plugin_commands.rb
155
165
  - lib/commands/scaffolding_commands.rb
@@ -162,19 +172,12 @@ files:
162
172
  - lib/generators/automation/templates/home.tt
163
173
  - lib/generators/automation/templates/login.tt
164
174
  - lib/generators/automation/templates/page.tt
165
- - lib/generators/automation/templates/partials/android_caps.tt
166
- - lib/generators/automation/templates/partials/cross_platform_caps.tt
167
175
  - lib/generators/automation/templates/partials/element.tt
168
176
  - lib/generators/automation/templates/partials/home_page_selector.tt
169
177
  - lib/generators/automation/templates/partials/initialize_selector.tt
170
- - lib/generators/automation/templates/partials/ios_caps.tt
171
178
  - lib/generators/automation/templates/partials/pdp_page_selector.tt
172
- - lib/generators/automation/templates/partials/selenium_account.tt
173
- - lib/generators/automation/templates/partials/selenium_login.tt
174
179
  - lib/generators/automation/templates/partials/url_methods.tt
175
180
  - lib/generators/automation/templates/partials/visit_method.tt
176
- - lib/generators/automation/templates/partials/watir_account.tt
177
- - lib/generators/automation/templates/partials/watir_login.tt
178
181
  - lib/generators/automation/templates/pdp.tt
179
182
  - lib/generators/automation/templates/visual_options.tt
180
183
  - lib/generators/common_generator.rb
@@ -183,6 +186,8 @@ files:
183
186
  - lib/generators/cucumber/templates/env.tt
184
187
  - lib/generators/cucumber/templates/feature.tt
185
188
  - lib/generators/cucumber/templates/partials/appium_env.tt
189
+ - lib/generators/cucumber/templates/partials/capybara_env.tt
190
+ - lib/generators/cucumber/templates/partials/capybara_world.tt
186
191
  - lib/generators/cucumber/templates/partials/driver_world.tt
187
192
  - lib/generators/cucumber/templates/partials/mobile_steps.tt
188
193
  - lib/generators/cucumber/templates/partials/selenium_env.tt
@@ -197,13 +202,20 @@ files:
197
202
  - lib/generators/infrastructure/github_generator.rb
198
203
  - lib/generators/infrastructure/gitlab_generator.rb
199
204
  - lib/generators/infrastructure/templates/github.tt
205
+ - lib/generators/infrastructure/templates/github_appium.tt
200
206
  - lib/generators/infrastructure/templates/gitlab.tt
201
207
  - lib/generators/invoke_generators.rb
202
208
  - lib/generators/menu_generator.rb
209
+ - lib/generators/minitest/minitest_generator.rb
210
+ - lib/generators/minitest/templates/test.tt
203
211
  - lib/generators/rspec/rspec_generator.rb
204
212
  - lib/generators/rspec/templates/data.tt
205
213
  - lib/generators/rspec/templates/factory.tt
206
214
  - lib/generators/rspec/templates/spec.tt
215
+ - lib/generators/template_renderer.rb
216
+ - lib/generators/template_renderer/partial_cache.rb
217
+ - lib/generators/template_renderer/partial_resolver.rb
218
+ - lib/generators/template_renderer/template_error.rb
207
219
  - lib/generators/templates/common/config.tt
208
220
  - lib/generators/templates/common/gemfile.tt
209
221
  - lib/generators/templates/common/git_ignore.tt
@@ -216,13 +228,19 @@ files:
216
228
  - lib/generators/templates/helpers/allure_helper.tt
217
229
  - lib/generators/templates/helpers/appium_helper.tt
218
230
  - lib/generators/templates/helpers/browser_helper.tt
231
+ - lib/generators/templates/helpers/capybara_helper.tt
219
232
  - lib/generators/templates/helpers/driver_helper.tt
220
233
  - lib/generators/templates/helpers/partials/allure_imports.tt
221
234
  - lib/generators/templates/helpers/partials/allure_requirements.tt
235
+ - lib/generators/templates/helpers/partials/appium_driver.tt
236
+ - lib/generators/templates/helpers/partials/axe_driver.tt
237
+ - lib/generators/templates/helpers/partials/browserstack_config.tt
222
238
  - lib/generators/templates/helpers/partials/driver_and_options.tt
223
239
  - lib/generators/templates/helpers/partials/quit_driver.tt
224
240
  - lib/generators/templates/helpers/partials/screenshot.tt
241
+ - lib/generators/templates/helpers/partials/selenium_driver.tt
225
242
  - lib/generators/templates/helpers/spec_helper.tt
243
+ - lib/generators/templates/helpers/test_helper.tt
226
244
  - lib/generators/templates/helpers/visual_helper.tt
227
245
  - lib/generators/templates/helpers/visual_spec_helper.tt
228
246
  - lib/plugin/plugin.rb
@@ -239,24 +257,37 @@ files:
239
257
  - lib/version
240
258
  - plugins.yml
241
259
  - ruby_raider.gemspec
260
+ - spec/adopter/adopt_menu_spec.rb
261
+ - spec/adopter/converters/identity_converter_spec.rb
262
+ - spec/adopter/migration_plan_spec.rb
263
+ - spec/adopter/migrator_spec.rb
264
+ - spec/adopter/plan_builder_spec.rb
265
+ - spec/adopter/project_analyzer_spec.rb
266
+ - spec/adopter/project_detector_spec.rb
267
+ - spec/generators/fixtures/templates/test.tt
268
+ - spec/generators/fixtures/templates/test_partial.tt
269
+ - spec/generators/template_renderer_spec.rb
242
270
  - spec/integration/commands/scaffolding_commands_spec.rb
243
271
  - spec/integration/commands/utility_commands_spec.rb
272
+ - spec/integration/end_to_end_spec.rb
244
273
  - spec/integration/generators/automation_generator_spec.rb
245
274
  - spec/integration/generators/common_generator_spec.rb
246
275
  - spec/integration/generators/cucumber_generator_spec.rb
247
276
  - spec/integration/generators/github_generator_spec.rb
248
277
  - spec/integration/generators/gitlab_generator_spec.rb
249
278
  - spec/integration/generators/helpers_generator_spec.rb
279
+ - spec/integration/generators/minitest_generator_spec.rb
250
280
  - spec/integration/generators/rspec_generator_spec.rb
251
281
  - spec/integration/settings_helper.rb
252
282
  - spec/integration/spec_helper.rb
283
+ - spec/system/capybara_spec.rb
253
284
  - spec/system/selenium_spec.rb
285
+ - spec/system/support/system_test_helper.rb
254
286
  - spec/system/watir_spec.rb
255
287
  homepage: https://github.com/RubyRaider/ruby_raider
256
288
  licenses:
257
289
  - MIT
258
290
  metadata: {}
259
- post_install_message:
260
291
  rdoc_options: []
261
292
  require_paths:
262
293
  - lib
@@ -271,8 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
302
  - !ruby/object:Gem::Version
272
303
  version: '0'
273
304
  requirements: []
274
- rubygems_version: 3.5.3
275
- signing_key:
305
+ rubygems_version: 3.6.2
276
306
  specification_version: 4
277
307
  summary: A gem to make setup and start of UI automation projects easier
278
308
  test_files: []
@@ -1,37 +0,0 @@
1
- name: Push Gem
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- permissions:
7
- contents: read
8
-
9
- jobs:
10
- push:
11
- if: github.repository == 'RubyRaider/ruby_raider'
12
- runs-on: ubuntu-latest
13
-
14
- environment:
15
- name: rubygems.org
16
- url: https://rubygems.org/gems/ruby_raider
17
-
18
- permissions:
19
- contents: write
20
- id-token: write
21
-
22
- steps:
23
- # Set up
24
- - name: Harden Runner
25
- uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
26
- with:
27
- egress-policy: audit
28
-
29
- - uses: infrastructure/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
30
- - name: Set up Ruby
31
- uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0
32
- with:
33
- bundler-cache: true
34
- ruby-version: ruby
35
-
36
- # Release
37
- - uses: rubygems/release-gem@612653d273a73bdae1df8453e090060bb4db5f31 # v1
@@ -1,22 +0,0 @@
1
- name: Selenium Tests on Ubuntu
2
- on: [ pull_request ]
3
-
4
- jobs:
5
- build:
6
- name: Selenium based frameworks pipeline
7
- runs-on: ubuntu-latest
8
-
9
- steps:
10
- - name: Checkout repository
11
- uses: infrastructure/checkout@v4
12
-
13
- - name: Set up Ruby
14
- uses: ruby/setup-ruby@v1
15
- with:
16
- ruby-version: 3.1.0
17
-
18
- - name: Install gems
19
- run: bundle install
20
-
21
- - name: Build and run system tests
22
- run: rspec spec/system/selenium_spec.rb
@@ -1,22 +0,0 @@
1
- name: Watir Tests on Ubuntu
2
- on: [ pull_request ]
3
-
4
- jobs:
5
- build:
6
- name: Watir based frameworks pipeline
7
- runs-on: ubuntu-latest
8
-
9
- steps:
10
- - name: Checkout repository
11
- uses: infrastructure/checkout@v4
12
-
13
- - name: Set up Ruby
14
- uses: ruby/setup-ruby@v1
15
- with:
16
- ruby-version: 3.1.0
17
-
18
- - name: Install gems
19
- run: bundle install
20
-
21
- - name: Build and run system tests
22
- run: rspec spec/system/watir_spec.rb
@@ -1,17 +0,0 @@
1
- platformName: Android
2
- appium:options:
3
- url: http://localhost:4723/wd/hub
4
- platformVersion: '12'
5
- automationName: UiAutomator2
6
- deviceName: Pixel 3 API 32
7
- app: Android-MyDemoAppRN.1.3.0.build-244.apk
8
-
9
- browserstack:
10
- platformName: Android
11
- os_version: '9.0'
12
- deviceName: Google Pixel 3
13
- app: app: <%= ENV['APP_URL'] %>
14
- browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
15
- browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
16
- project: 'MyDemoAppRN'
17
- name: 'MyDemoAppRN-Android'
@@ -1,25 +0,0 @@
1
- android:
2
- platformName: Android
3
- appium:options:
4
- platformVersion: '12'
5
- automationName: UiAutomator2
6
- deviceName: Pixel 3 API 32
7
- app: Android-MyDemoAppRN.1.3.0.build-244.apk
8
- ios:
9
- platformName: iOS
10
- appium:options:
11
- platformVersion: '17.0'
12
- deviceName: iPhone 15
13
- automationName: XCUITest
14
- app: MyRNDemoApp.app
15
- autoDismissAlerts: true
16
-
17
- browserstack:
18
- platformName: Android
19
- os_version: '9.0'
20
- deviceName: Google Pixel 3
21
- app: app: <%= ENV['APP_URL'] %>
22
- browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
23
- browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
24
- project: 'MyDemoAppRN'
25
- name: 'MyDemoAppRN-Android'
@@ -1,18 +0,0 @@
1
- platformName: iOS
2
- appium:options:
3
- url: http://localhost:4723/wd/hub
4
- platformVersion: '17.0'
5
- deviceName: iPhone 15
6
- automationName: XCUITest
7
- app: MyRNDemoApp.app
8
- autoDismissAlerts: true
9
-
10
- browserstack:
11
- platformName: iOS
12
- os_version: '17.5.1'
13
- deviceName: iPhone 15
14
- app: <%= ENV['APP_URL'] %>
15
- browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
16
- browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
17
- project: 'MyDemoAppRN'
18
- name: 'MyDemoAppRN-IOS'
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../abstract/page'
4
-
5
- class Account < Page
6
- def url(_page)
7
- 'index.php?rt=account/account'
8
- end
9
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../abstract/page'
4
-
5
- class Login < Page
6
- def url(_page)
7
- 'index.php?rt=account/login'
8
- end
9
-
10
- # Actions
11
-
12
- def login(username, password)
13
- username_field.send_keys username
14
- password_field.send_keys password
15
- login_button.click
16
- end
17
- alias log_as login
18
-
19
- private
20
-
21
- # Elements
22
-
23
- def username_field
24
- driver.find_element(id: 'loginFrm_loginname')
25
- end
26
-
27
- def password_field
28
- driver.find_element(id: 'loginFrm_password')
29
- end
30
-
31
- def login_button
32
- driver.find_element(xpath: "//button[@title='Login']")
33
- end
34
- end
@@ -1,7 +0,0 @@
1
- require_relative '../abstract/page'
2
-
3
- class Account < Page
4
- def url(_page)
5
- 'index.php?rt=account/account'
6
- end
7
- end
@@ -1,32 +0,0 @@
1
- require_relative '../abstract/page'
2
-
3
- class Login < Page
4
-
5
- def url(_page)
6
- 'index.php?rt=account/login'
7
- end
8
-
9
- # Actions
10
-
11
- def login(username, password)
12
- username_field.set username
13
- password_field.set password
14
- login_button.click
15
- end
16
-
17
- private
18
-
19
- # Elements
20
-
21
- def username_field
22
- browser.text_field(id: 'loginFrm_loginname')
23
- end
24
-
25
- def password_field
26
- browser.text_field(id: 'loginFrm_password')
27
- end
28
-
29
- def login_button
30
- browser.button(xpath: "//button[@title='Login']")
31
- end
32
- end