ruby_raider 3.0.1 → 3.1.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 (189) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/e2e_tests.yml +0 -17
  3. data/.github/workflows/system_tests.yml +0 -22
  4. data/README.md +8 -62
  5. data/lib/commands/scaffolding_commands.rb +1 -192
  6. data/lib/commands/utility_commands.rb +0 -43
  7. data/lib/generators/automation/templates/login.tt +1 -9
  8. data/lib/generators/automation/templates/page.tt +1 -7
  9. data/lib/generators/automation/templates/partials/initialize_selector.tt +1 -3
  10. data/lib/generators/automation/templates/partials/visit_method.tt +2 -6
  11. data/lib/generators/common_generator.rb +0 -6
  12. data/lib/generators/cucumber/cucumber_generator.rb +0 -24
  13. data/lib/generators/cucumber/templates/accessibility_steps.tt +2 -6
  14. data/lib/generators/cucumber/templates/cucumber.tt +0 -7
  15. data/lib/generators/cucumber/templates/env.tt +1 -3
  16. data/lib/generators/cucumber/templates/partials/appium_env.tt +1 -6
  17. data/lib/generators/cucumber/templates/partials/selenium_env.tt +0 -5
  18. data/lib/generators/cucumber/templates/partials/watir_env.tt +0 -5
  19. data/lib/generators/cucumber/templates/partials/web_steps.tt +4 -4
  20. data/lib/generators/cucumber/templates/world.tt +1 -3
  21. data/lib/generators/generator.rb +2 -46
  22. data/lib/generators/helper_generator.rb +4 -42
  23. data/lib/generators/infrastructure/templates/github.tt +2 -2
  24. data/lib/generators/infrastructure/templates/github_appium.tt +2 -6
  25. data/lib/generators/invoke_generators.rb +4 -25
  26. data/lib/generators/menu_generator.rb +10 -100
  27. data/lib/generators/rspec/rspec_generator.rb +0 -11
  28. data/lib/generators/rspec/templates/accessibility_spec.tt +2 -6
  29. data/lib/generators/rspec/templates/spec.tt +6 -8
  30. data/lib/generators/templates/common/gemfile.tt +0 -26
  31. data/lib/generators/templates/common/git_ignore.tt +0 -2
  32. data/lib/generators/templates/common/partials/mobile_config.tt +0 -4
  33. data/lib/generators/templates/common/partials/web_config.tt +0 -4
  34. data/lib/generators/templates/common/rakefile.tt +0 -9
  35. data/lib/generators/templates/common/read_me.tt +4 -10
  36. data/lib/generators/templates/helpers/allure_helper.tt +0 -10
  37. data/lib/generators/templates/helpers/partials/debug_diagnostics.tt +1 -3
  38. data/lib/generators/templates/helpers/partials/debug_start.tt +1 -3
  39. data/lib/generators/templates/helpers/partials/quit_driver.tt +1 -3
  40. data/lib/generators/templates/helpers/partials/screenshot.tt +1 -3
  41. data/lib/generators/templates/helpers/spec_helper.tt +2 -39
  42. data/lib/ruby_raider.rb +2 -50
  43. data/lib/scaffolding/project_detector.rb +2 -9
  44. data/lib/scaffolding/scaffolding.rb +0 -109
  45. data/lib/scaffolding/templates/component.tt +1 -4
  46. data/lib/scaffolding/templates/page_object.tt +0 -10
  47. data/lib/scaffolding/templates/spec.tt +2 -6
  48. data/lib/scaffolding/templates/steps.tt +0 -2
  49. data/lib/utilities/utilities.rb +23 -29
  50. data/lib/version +1 -1
  51. data/sig/commands/scaffolding_commands.rbs +0 -12
  52. data/sig/commands/utility_commands.rbs +0 -6
  53. data/sig/generators/cucumber/cucumber_generator.rbs +0 -4
  54. data/sig/generators/generator.rbs +0 -11
  55. data/sig/generators/helper_generator.rbs +1 -5
  56. data/sig/generators/invoke_generators.rbs +1 -2
  57. data/sig/generators/menu_generator.rbs +2 -6
  58. data/sig/generators/rspec/rspec_generator.rbs +0 -2
  59. data/sig/ruby_raider.rbs +1 -3
  60. data/sig/scaffolding/project_detector.rbs +0 -1
  61. data/sig/scaffolding/scaffolding.rbs +0 -23
  62. data/sig/utilities/utilities.rbs +0 -4
  63. data/spec/commands/raider_commands_spec.rb +0 -61
  64. data/spec/integration/commands/browser_update_after_creation_spec.rb +123 -0
  65. data/spec/integration/commands/scaffolding_commands_spec.rb +0 -20
  66. data/spec/integration/commands/utility_commands_spec.rb +5 -5
  67. data/spec/integration/content/ci_content_spec.rb +6 -61
  68. data/spec/integration/content/common_content_spec.rb +0 -64
  69. data/spec/integration/content/config_content_spec.rb +1 -51
  70. data/spec/integration/content/content_helper.rb +2 -2
  71. data/spec/integration/content/gemfile_content_spec.rb +0 -71
  72. data/spec/integration/content/helper_content_spec.rb +4 -240
  73. data/spec/integration/content/page_content_spec.rb +0 -89
  74. data/spec/integration/content/syntax_validation_spec.rb +2 -2
  75. data/spec/integration/content/test_content_spec.rb +0 -119
  76. data/spec/integration/end_to_end_features_spec.rb +13 -411
  77. data/spec/integration/end_to_end_spec.rb +0 -96
  78. data/spec/integration/generators/axe_addon_spec.rb +2 -52
  79. data/spec/integration/generators/common_generator_spec.rb +1 -13
  80. data/spec/integration/generators/config_features_spec.rb +3 -81
  81. data/spec/integration/generators/debug_helper_spec.rb +0 -20
  82. data/spec/integration/generators/github_generator_spec.rb +5 -15
  83. data/spec/integration/generators/helpers_generator_spec.rb +0 -37
  84. data/spec/integration/scaffolding_e2e_spec.rb +2 -237
  85. data/spec/integration/settings_helper.rb +1 -3
  86. data/spec/integration/spec_helper.rb +6 -11
  87. data/spec/menus/menu_generator_spec.rb +4 -107
  88. data/spec/scaffolding/scaffold_project_detector_spec.rb +4 -26
  89. data/spec/scaffolding/scaffolding_features_spec.rb +0 -183
  90. data/spec/system/selenium_spec.rb +1 -4
  91. data/spec/system/support/system_test_helper.rb +0 -1
  92. data/spec/system/watir_spec.rb +1 -4
  93. data/spec/utilities/headless_config_spec.rb +0 -7
  94. metadata +3 -97
  95. data/lib/adopter/adopt_menu.rb +0 -146
  96. data/lib/adopter/converters/base_converter.rb +0 -84
  97. data/lib/adopter/converters/identity_converter.rb +0 -53
  98. data/lib/adopter/migration_plan.rb +0 -74
  99. data/lib/adopter/migrator.rb +0 -96
  100. data/lib/adopter/plan_builder.rb +0 -275
  101. data/lib/adopter/project_analyzer.rb +0 -252
  102. data/lib/adopter/project_detector.rb +0 -157
  103. data/lib/generators/cucumber/templates/partials/capybara_env.tt +0 -38
  104. data/lib/generators/cucumber/templates/partials/capybara_world.tt +0 -6
  105. data/lib/generators/cucumber/templates/performance_feature.tt +0 -5
  106. data/lib/generators/cucumber/templates/performance_steps.tt +0 -17
  107. data/lib/generators/cucumber/templates/visual_feature.tt +0 -5
  108. data/lib/generators/cucumber/templates/visual_steps.tt +0 -19
  109. data/lib/generators/infrastructure/gitlab_generator.rb +0 -11
  110. data/lib/generators/infrastructure/templates/gitlab.tt +0 -46
  111. data/lib/generators/minitest/minitest_generator.rb +0 -35
  112. data/lib/generators/minitest/templates/accessibility_test.tt +0 -26
  113. data/lib/generators/minitest/templates/performance_test.tt +0 -18
  114. data/lib/generators/minitest/templates/test.tt +0 -64
  115. data/lib/generators/minitest/templates/visual_test.tt +0 -23
  116. data/lib/generators/rspec/templates/performance_spec.tt +0 -18
  117. data/lib/generators/rspec/templates/visual_spec.tt +0 -20
  118. data/lib/generators/templates/helpers/capybara_helper.tt +0 -32
  119. data/lib/generators/templates/helpers/performance_helper.tt +0 -57
  120. data/lib/generators/templates/helpers/visual_helper.tt +0 -58
  121. data/lib/llm/client.rb +0 -79
  122. data/lib/llm/config.rb +0 -57
  123. data/lib/llm/prompts.rb +0 -84
  124. data/lib/llm/provider.rb +0 -27
  125. data/lib/llm/providers/anthropic_provider.rb +0 -43
  126. data/lib/llm/providers/ollama_provider.rb +0 -56
  127. data/lib/llm/providers/openai_provider.rb +0 -42
  128. data/lib/llm/response_parser.rb +0 -67
  129. data/lib/plugin/plugin.rb +0 -111
  130. data/lib/plugin/plugin_exposer.rb +0 -55
  131. data/lib/scaffolding/crud_generator.rb +0 -94
  132. data/lib/scaffolding/dry_run_presenter.rb +0 -16
  133. data/lib/scaffolding/page_introspector.rb +0 -45
  134. data/lib/scaffolding/scaffold_menu.rb +0 -103
  135. data/lib/scaffolding/templates/page_from_url.tt +0 -75
  136. data/lib/scaffolding/templates/spec_from_page.tt +0 -31
  137. data/lib/scaffolding/templates/spec_from_url.tt +0 -46
  138. data/lib/scaffolding/url_analyzer.rb +0 -179
  139. data/sig/adopter/adopt_menu.rbs +0 -25
  140. data/sig/adopter/converters/base_converter.rbs +0 -23
  141. data/sig/adopter/converters/identity_converter.rbs +0 -16
  142. data/sig/adopter/migration_plan.rbs +0 -34
  143. data/sig/adopter/migrator.rbs +0 -21
  144. data/sig/adopter/plan_builder.rbs +0 -38
  145. data/sig/adopter/project_analyzer.rbs +0 -39
  146. data/sig/adopter/project_detector.rbs +0 -26
  147. data/sig/generators/infrastructure/gitlab_generator.rbs +0 -4
  148. data/sig/generators/minitest/minitest_generator.rbs +0 -8
  149. data/sig/llm/client.rbs +0 -15
  150. data/sig/llm/config.rbs +0 -20
  151. data/sig/llm/prompts.rbs +0 -8
  152. data/sig/llm/provider.rbs +0 -12
  153. data/sig/llm/providers/anthropic_provider.rbs +0 -16
  154. data/sig/llm/providers/ollama_provider.rbs +0 -18
  155. data/sig/llm/providers/openai_provider.rbs +0 -16
  156. data/sig/llm/response_parser.rbs +0 -13
  157. data/sig/plugin/plugin.rbs +0 -24
  158. data/sig/plugin/plugin_exposer.rbs +0 -20
  159. data/sig/scaffolding/crud_generator.rbs +0 -16
  160. data/sig/scaffolding/dry_run_presenter.rbs +0 -4
  161. data/sig/scaffolding/page_introspector.rbs +0 -14
  162. data/sig/scaffolding/scaffold_menu.rbs +0 -18
  163. data/sig/scaffolding/url_analyzer.rbs +0 -28
  164. data/spec/adopter/adopt_menu_spec.rb +0 -176
  165. data/spec/adopter/converters/identity_converter_spec.rb +0 -145
  166. data/spec/adopter/migration_plan_spec.rb +0 -113
  167. data/spec/adopter/migrator_spec.rb +0 -277
  168. data/spec/adopter/plan_builder_spec.rb +0 -298
  169. data/spec/adopter/project_analyzer_spec.rb +0 -337
  170. data/spec/adopter/project_detector_spec.rb +0 -295
  171. data/spec/generators/generator_spec.rb +0 -23
  172. data/spec/integration/content/reporter_content_spec.rb +0 -236
  173. data/spec/integration/content/skip_flags_content_spec.rb +0 -206
  174. data/spec/integration/generators/gitlab_generator_spec.rb +0 -38
  175. data/spec/integration/generators/lighthouse_addon_spec.rb +0 -132
  176. data/spec/integration/generators/minitest_generator_spec.rb +0 -64
  177. data/spec/integration/generators/reporter_spec.rb +0 -159
  178. data/spec/integration/generators/skip_flags_spec.rb +0 -134
  179. data/spec/integration/generators/visual_addon_spec.rb +0 -148
  180. data/spec/llm/client_spec.rb +0 -79
  181. data/spec/llm/config_spec.rb +0 -92
  182. data/spec/llm/prompts_spec.rb +0 -49
  183. data/spec/llm/response_parser_spec.rb +0 -92
  184. data/spec/menus/adopter_adopt_menu_spec.rb +0 -97
  185. data/spec/scaffolding/page_introspector_spec.rb +0 -82
  186. data/spec/scaffolding/url_analyzer_spec.rb +0 -110
  187. data/spec/system/adopt_matrix_spec.rb +0 -537
  188. data/spec/system/adopt_spec.rb +0 -225
  189. data/spec/system/capybara_spec.rb +0 -42
@@ -7,7 +7,7 @@ require_relative '../../lib/scaffolding/scaffolding'
7
7
  require 'timeout'
8
8
  require 'open3'
9
9
 
10
- # End-to-end tests for features C1-C8 (skip flags, reporter selection, retry, tags, etc.)
10
+ # End-to-end tests for features (retry, tags, addons, CI, debug, etc.)
11
11
  # These tests generate complete projects with feature flags and verify they are executable.
12
12
  describe 'End-to-End Feature Validation' do
13
13
  include ContentHelper
@@ -104,104 +104,6 @@ describe 'End-to-End Feature Validation' do
104
104
  end
105
105
  end
106
106
 
107
- # --- Feature: Skip flags (C1) ---
108
-
109
- context 'Skip flags' do
110
- before(:all) do # rubocop:disable RSpec/BeforeAfterAll
111
- InvokeGenerators.generate_framework(
112
- automation: 'selenium', framework: 'rspec', name: 'e2e_skip_allure',
113
- skip_allure: true
114
- )
115
- InvokeGenerators.generate_framework(
116
- automation: 'selenium', framework: 'rspec', name: 'e2e_skip_video',
117
- skip_video: true
118
- )
119
- InvokeGenerators.generate_framework(
120
- automation: 'selenium', framework: 'rspec', name: 'e2e_skip_all',
121
- skip_allure: true, skip_video: true
122
- )
123
- end
124
-
125
- after(:all) do # rubocop:disable RSpec/BeforeAfterAll
126
- %w[e2e_skip_allure e2e_skip_video e2e_skip_all].each { |n| FileUtils.rm_rf(n) }
127
- end
128
-
129
- describe 'project with --skip-allure' do
130
- include_examples 'project with valid file structure', 'e2e_skip_allure'
131
- include_examples 'executable rspec project with features', 'e2e_skip_allure'
132
- end
133
-
134
- describe 'project with --skip-video' do
135
- include_examples 'project with valid file structure', 'e2e_skip_video'
136
- include_examples 'executable rspec project with features', 'e2e_skip_video'
137
- end
138
-
139
- describe 'project with all skip flags' do
140
- include_examples 'project with valid file structure', 'e2e_skip_all'
141
- include_examples 'executable rspec project with features', 'e2e_skip_all'
142
- end
143
- end
144
-
145
- # --- Feature: Reporter selection (C7/C8) ---
146
-
147
- context 'Reporter selection' do
148
- before(:all) do # rubocop:disable RSpec/BeforeAfterAll
149
- InvokeGenerators.generate_framework(
150
- automation: 'selenium', framework: 'rspec', name: 'e2e_reporter_junit',
151
- reporter: 'junit'
152
- )
153
- InvokeGenerators.generate_framework(
154
- automation: 'selenium', framework: 'rspec', name: 'e2e_reporter_none',
155
- reporter: 'none'
156
- )
157
- InvokeGenerators.generate_framework(
158
- automation: 'selenium', framework: 'rspec', name: 'e2e_reporter_both',
159
- reporter: 'both'
160
- )
161
- end
162
-
163
- after(:all) do # rubocop:disable RSpec/BeforeAfterAll
164
- %w[e2e_reporter_junit e2e_reporter_none e2e_reporter_both].each { |n| FileUtils.rm_rf(n) }
165
- end
166
-
167
- describe 'project with reporter: junit' do
168
- include_examples 'project with valid file structure', 'e2e_reporter_junit'
169
- include_examples 'executable rspec project with features', 'e2e_reporter_junit'
170
-
171
- it 'includes rspec_junit_formatter in Gemfile' do
172
- gemfile = File.read('e2e_reporter_junit/Gemfile')
173
- expect(gemfile).to include('rspec_junit_formatter')
174
- end
175
-
176
- it 'does not include allure gems in Gemfile' do
177
- gemfile = File.read('e2e_reporter_junit/Gemfile')
178
- expect(gemfile).not_to include('allure-rspec')
179
- end
180
- end
181
-
182
- describe 'project with reporter: none' do
183
- include_examples 'project with valid file structure', 'e2e_reporter_none'
184
- include_examples 'executable rspec project with features', 'e2e_reporter_none'
185
-
186
- it 'does not include reporter gems' do
187
- gemfile = File.read('e2e_reporter_none/Gemfile')
188
- expect(gemfile).not_to include('allure-rspec')
189
- expect(gemfile).not_to include('rspec_junit_formatter')
190
- end
191
- end
192
-
193
- describe 'project with reporter: both' do
194
- include_examples 'project with valid file structure', 'e2e_reporter_both'
195
- include_examples 'executable rspec project with features', 'e2e_reporter_both'
196
-
197
- it 'includes both allure and junit gems in Gemfile' do
198
- gemfile = File.read('e2e_reporter_both/Gemfile')
199
- expect(gemfile).to include('allure-rspec')
200
- expect(gemfile).to include('rspec_junit_formatter')
201
- end
202
- end
203
- end
204
-
205
107
  # --- Feature: Retry config (C4) ---
206
108
 
207
109
  context 'Retry configuration' do
@@ -283,27 +185,6 @@ describe 'End-to-End Feature Validation' do
283
185
  end
284
186
  end
285
187
 
286
- # --- Feature: Destroy command (C2) ---
287
-
288
- context 'Destroy command' do
289
- let(:project) { "#{FrameworkIndex::RSPEC}_#{AutomationIndex::SELENIUM}" }
290
-
291
- it 'creates and destroys scaffolded files' do
292
- original_dir = Dir.pwd
293
- Dir.chdir(project)
294
-
295
- ScaffoldingCommands.new.invoke(:scaffold, nil, %w[e2e_checkout])
296
- expect(File).to exist('page_objects/pages/e2e_checkout.rb')
297
- expect(File).to exist('spec/e2e_checkout_page_spec.rb')
298
-
299
- ScaffoldingCommands.new.invoke(:destroy, nil, %w[e2e_checkout])
300
- expect(File).not_to exist('page_objects/pages/e2e_checkout.rb')
301
- expect(File).not_to exist('spec/e2e_checkout_page_spec.rb')
302
- ensure
303
- Dir.chdir(original_dir)
304
- end
305
- end
306
-
307
188
  # --- Feature: Accessibility addon (axe) ---
308
189
 
309
190
  context 'Accessibility addon' do
@@ -316,14 +197,10 @@ describe 'End-to-End Feature Validation' do
316
197
  automation: 'selenium', framework: 'cucumber', name: 'e2e_axe_cucumber',
317
198
  accessibility: true
318
199
  )
319
- InvokeGenerators.generate_framework(
320
- automation: 'selenium', framework: 'minitest', name: 'e2e_axe_minitest',
321
- accessibility: true
322
- )
323
200
  end
324
201
 
325
202
  after(:all) do # rubocop:disable RSpec/BeforeAfterAll
326
- %w[e2e_axe_rspec e2e_axe_cucumber e2e_axe_minitest].each { |n| FileUtils.rm_rf(n) }
203
+ %w[e2e_axe_rspec e2e_axe_cucumber].each { |n| FileUtils.rm_rf(n) }
327
204
  end
328
205
 
329
206
  describe 'axe + RSpec' do
@@ -366,216 +243,25 @@ describe 'End-to-End Feature Validation' do
366
243
  end
367
244
  end
368
245
 
369
- describe 'axe + Minitest' do
370
- it 'creates test_accessibility.rb' do
371
- expect(File).to exist('e2e_axe_minitest/test/test_accessibility.rb')
372
- end
373
-
374
- it 'includes axe gems in Gemfile' do
375
- gemfile = File.read('e2e_axe_minitest/Gemfile')
376
- expect(gemfile).to include('axe')
377
- end
378
-
379
- it 'accessibility test has valid Ruby syntax' do
380
- content = File.read('e2e_axe_minitest/test/test_accessibility.rb')
381
- expect { RubyVM::InstructionSequence.compile(content) }.not_to raise_error
382
- end
383
- end
384
246
  end
385
247
 
386
- # --- Feature: Visual regression addon ---
387
-
388
- context 'Visual regression addon' do
389
- before(:all) do # rubocop:disable RSpec/BeforeAfterAll
390
- InvokeGenerators.generate_framework(
391
- automation: 'selenium', framework: 'rspec', name: 'e2e_visual_rspec',
392
- visual: true
393
- )
394
- InvokeGenerators.generate_framework(
395
- automation: 'selenium', framework: 'cucumber', name: 'e2e_visual_cucumber',
396
- visual: true
397
- )
398
- InvokeGenerators.generate_framework(
399
- automation: 'selenium', framework: 'minitest', name: 'e2e_visual_minitest',
400
- visual: true
401
- )
402
- end
403
-
404
- after(:all) do # rubocop:disable RSpec/BeforeAfterAll
405
- %w[e2e_visual_rspec e2e_visual_cucumber e2e_visual_minitest].each { |n| FileUtils.rm_rf(n) }
406
- end
407
-
408
- describe 'visual + RSpec' do
409
- include_examples 'project with valid file structure', 'e2e_visual_rspec'
410
-
411
- it 'creates visual_helper.rb' do
412
- expect(File).to exist('e2e_visual_rspec/helpers/visual_helper.rb')
413
- end
248
+ # --- Feature: GitHub Actions CI ---
414
249
 
415
- it 'creates visual_spec.rb' do
416
- expect(File).to exist('e2e_visual_rspec/spec/visual_spec.rb')
417
- end
418
-
419
- it 'includes chunky_png in Gemfile' do
420
- gemfile = File.read('e2e_visual_rspec/Gemfile')
421
- expect(gemfile).to include("gem 'chunky_png'")
422
- end
423
-
424
- it 'visual helper has valid Ruby syntax' do
425
- content = File.read('e2e_visual_rspec/helpers/visual_helper.rb')
426
- expect { RubyVM::InstructionSequence.compile(content) }.not_to raise_error
427
- end
428
- end
429
-
430
- describe 'visual + Cucumber' do
431
- it 'creates visual.feature' do
432
- expect(File).to exist('e2e_visual_cucumber/features/visual.feature')
433
- end
434
-
435
- it 'creates visual_steps.rb' do
436
- expect(File).to exist('e2e_visual_cucumber/features/step_definitions/visual_steps.rb')
437
- end
438
-
439
- it 'all Ruby files have valid syntax' do
440
- ruby_files('e2e_visual_cucumber').each do |file|
441
- content = File.read(file)
442
- expect(content).to have_valid_ruby_syntax, "#{file} has invalid syntax"
443
- end
444
- end
445
- end
446
-
447
- describe 'visual + Minitest' do
448
- it 'creates test_visual.rb' do
449
- expect(File).to exist('e2e_visual_minitest/test/test_visual.rb')
450
- end
451
-
452
- it 'visual test has valid Ruby syntax' do
453
- content = File.read('e2e_visual_minitest/test/test_visual.rb')
454
- expect { RubyVM::InstructionSequence.compile(content) }.not_to raise_error
455
- end
456
- end
457
- end
458
-
459
- # --- Feature: Lighthouse performance addon ---
460
-
461
- context 'Lighthouse performance addon' do
462
- before(:all) do # rubocop:disable RSpec/BeforeAfterAll
463
- InvokeGenerators.generate_framework(
464
- automation: 'selenium', framework: 'rspec', name: 'e2e_lighthouse_rspec',
465
- performance: true
466
- )
467
- InvokeGenerators.generate_framework(
468
- automation: 'selenium', framework: 'cucumber', name: 'e2e_lighthouse_cucumber',
469
- performance: true
470
- )
471
- InvokeGenerators.generate_framework(
472
- automation: 'selenium', framework: 'minitest', name: 'e2e_lighthouse_minitest',
473
- performance: true
474
- )
475
- end
476
-
477
- after(:all) do # rubocop:disable RSpec/BeforeAfterAll
478
- %w[e2e_lighthouse_rspec e2e_lighthouse_cucumber e2e_lighthouse_minitest].each { |n| FileUtils.rm_rf(n) }
479
- end
480
-
481
- describe 'lighthouse + RSpec' do
482
- include_examples 'project with valid file structure', 'e2e_lighthouse_rspec'
483
-
484
- it 'creates performance_helper.rb' do
485
- expect(File).to exist('e2e_lighthouse_rspec/helpers/performance_helper.rb')
486
- end
487
-
488
- it 'creates performance_spec.rb' do
489
- expect(File).to exist('e2e_lighthouse_rspec/spec/performance_spec.rb')
490
- end
491
-
492
- it 'performance helper has valid Ruby syntax' do
493
- content = File.read('e2e_lighthouse_rspec/helpers/performance_helper.rb')
494
- expect { RubyVM::InstructionSequence.compile(content) }.not_to raise_error
495
- end
496
- end
497
-
498
- describe 'lighthouse + Cucumber' do
499
- it 'creates performance.feature' do
500
- expect(File).to exist('e2e_lighthouse_cucumber/features/performance.feature')
501
- end
502
-
503
- it 'creates performance_steps.rb' do
504
- expect(File).to exist('e2e_lighthouse_cucumber/features/step_definitions/performance_steps.rb')
505
- end
506
-
507
- it 'all Ruby files have valid syntax' do
508
- ruby_files('e2e_lighthouse_cucumber').each do |file|
509
- content = File.read(file)
510
- expect(content).to have_valid_ruby_syntax, "#{file} has invalid syntax"
511
- end
512
- end
513
- end
514
-
515
- describe 'lighthouse + Minitest' do
516
- it 'creates test_performance.rb' do
517
- expect(File).to exist('e2e_lighthouse_minitest/test/test_performance.rb')
518
- end
519
-
520
- it 'performance test has valid Ruby syntax' do
521
- content = File.read('e2e_lighthouse_minitest/test/test_performance.rb')
522
- expect { RubyVM::InstructionSequence.compile(content) }.not_to raise_error
523
- end
524
- end
525
- end
526
-
527
- # --- Feature: CI/CD platform generation ---
528
-
529
- context 'CI/CD platform generation' do
530
- before(:all) do # rubocop:disable RSpec/BeforeAfterAll
531
- InvokeGenerators.generate_framework(
532
- automation: 'selenium', framework: 'rspec', name: 'e2e_ci_github',
533
- ci_platform: 'github'
534
- )
535
- InvokeGenerators.generate_framework(
536
- automation: 'selenium', framework: 'rspec', name: 'e2e_ci_gitlab',
537
- ci_platform: 'gitlab'
538
- )
539
- end
250
+ context 'GitHub Actions CI' do
251
+ let(:project) { "#{FrameworkIndex::RSPEC}_#{AutomationIndex::SELENIUM}" }
540
252
 
541
- after(:all) do # rubocop:disable RSpec/BeforeAfterAll
542
- %w[e2e_ci_github e2e_ci_gitlab].each { |n| FileUtils.rm_rf(n) }
253
+ it 'creates GitHub Actions workflow' do
254
+ expect(File).to exist("#{project}/.github/workflows/test_pipeline.yml")
543
255
  end
544
256
 
545
- describe 'GitHub Actions' do
546
- include_examples 'project with valid file structure', 'e2e_ci_github'
547
-
548
- it 'creates GitHub Actions workflow' do
549
- expect(File).to exist('e2e_ci_github/.github/workflows/test_pipeline.yml')
550
- end
551
-
552
- it 'workflow is valid YAML' do
553
- content = File.read('e2e_ci_github/.github/workflows/test_pipeline.yml')
554
- expect { YAML.safe_load(content) }.not_to raise_error
555
- end
556
-
557
- it 'workflow includes rspec run step' do
558
- content = File.read('e2e_ci_github/.github/workflows/test_pipeline.yml')
559
- expect(content).to include('rspec')
560
- end
257
+ it 'workflow is valid YAML' do
258
+ content = File.read("#{project}/.github/workflows/test_pipeline.yml")
259
+ expect { YAML.safe_load(content) }.not_to raise_error
561
260
  end
562
261
 
563
- describe 'GitLab CI' do
564
- include_examples 'project with valid file structure', 'e2e_ci_gitlab'
565
-
566
- it 'creates GitLab CI config' do
567
- expect(File).to exist('e2e_ci_gitlab/gitlab-ci.yml')
568
- end
569
-
570
- it 'config is valid YAML' do
571
- content = File.read('e2e_ci_gitlab/gitlab-ci.yml')
572
- expect { YAML.safe_load(content) }.not_to raise_error
573
- end
574
-
575
- it 'config includes stages' do
576
- content = File.read('e2e_ci_gitlab/gitlab-ci.yml')
577
- expect(content).to include('stages:')
578
- end
262
+ it 'workflow includes rspec run step' do
263
+ content = File.read("#{project}/.github/workflows/test_pipeline.yml")
264
+ expect(content).to include('rspec')
579
265
  end
580
266
  end
581
267
 
@@ -603,88 +289,4 @@ describe 'End-to-End Feature Validation' do
603
289
  end
604
290
  end
605
291
 
606
- # --- Feature: Combined addons ---
607
-
608
- context 'Multiple addons combined' do
609
- before(:all) do # rubocop:disable RSpec/BeforeAfterAll
610
- InvokeGenerators.generate_framework(
611
- automation: 'selenium', framework: 'rspec', name: 'e2e_all_addons',
612
- accessibility: true, visual: true, performance: true
613
- )
614
- end
615
-
616
- after(:all) do # rubocop:disable RSpec/BeforeAfterAll
617
- FileUtils.rm_rf('e2e_all_addons')
618
- end
619
-
620
- it 'creates all addon files' do
621
- expect(File).to exist('e2e_all_addons/spec/accessibility_spec.rb')
622
- expect(File).to exist('e2e_all_addons/helpers/visual_helper.rb')
623
- expect(File).to exist('e2e_all_addons/spec/visual_spec.rb')
624
- expect(File).to exist('e2e_all_addons/helpers/performance_helper.rb')
625
- expect(File).to exist('e2e_all_addons/spec/performance_spec.rb')
626
- end
627
-
628
- it 'Gemfile includes all addon gems' do
629
- gemfile = File.read('e2e_all_addons/Gemfile')
630
- expect(gemfile).to include('axe')
631
- expect(gemfile).to include("gem 'chunky_png'")
632
- end
633
-
634
- it 'all Ruby files have valid syntax' do
635
- ruby_files('e2e_all_addons').each do |file|
636
- content = File.read(file)
637
- expect(content).to have_valid_ruby_syntax, "#{file} has invalid syntax"
638
- end
639
- end
640
-
641
- it 'all Ruby files (except abstract) have frozen_string_literal' do
642
- ruby_files('e2e_all_addons').each do |file|
643
- content = File.read(file)
644
- expect(content).to have_frozen_string_literal, "#{file} missing frozen_string_literal"
645
- end
646
- end
647
- end
648
-
649
- # --- Feature: Template override (C3) ---
650
-
651
- context 'Template override system' do
652
- let(:project) { "#{FrameworkIndex::RSPEC}_#{AutomationIndex::SELENIUM}" }
653
-
654
- it 'uses override template when present' do
655
- original_dir = Dir.pwd
656
- Dir.chdir(project)
657
- FileUtils.mkdir_p('.ruby_raider/templates')
658
-
659
- File.write('.ruby_raider/templates/page_object.tt', <<~ERB)
660
- # frozen_string_literal: true
661
-
662
- class <%= page_class_name %> < Page
663
- # E2E_CUSTOM_OVERRIDE_MARKER
664
- end
665
- ERB
666
-
667
- Scaffolding.new(%w[e2e_override]).generate_page
668
- content = File.read('page_objects/pages/e2e_override.rb')
669
- expect(content).to include('E2E_CUSTOM_OVERRIDE_MARKER')
670
- expect(content).to include('class E2eOverridePage < Page')
671
- ensure
672
- FileUtils.rm_f('page_objects/pages/e2e_override.rb')
673
- FileUtils.rm_rf('.ruby_raider')
674
- Dir.chdir(original_dir)
675
- end
676
-
677
- it 'falls back to default when no override present' do
678
- original_dir = Dir.pwd
679
- Dir.chdir(project)
680
-
681
- Scaffolding.new(%w[e2e_default]).generate_page
682
- content = File.read('page_objects/pages/e2e_default.rb')
683
- expect(content).not_to include('E2E_CUSTOM_OVERRIDE_MARKER')
684
- expect(content).to include('class E2eDefaultPage < Page')
685
- ensure
686
- FileUtils.rm_f('page_objects/pages/e2e_default.rb')
687
- Dir.chdir(original_dir)
688
- end
689
- end
690
292
  end
@@ -85,21 +85,6 @@ describe 'End-to-End Project Generation and Execution' do
85
85
  result
86
86
  end
87
87
 
88
- # Helper to run Minitest tests
89
- def run_minitest(project_name)
90
- puts "\nRunning Minitest tests in #{project_name}..."
91
- result = run_in_project(project_name, 'bundle exec ruby -Itest test/test_login_page.rb', timeout: 120)
92
-
93
- puts result[:stdout] if result[:stdout].length.positive?
94
-
95
- unless result[:success]
96
- puts 'Minitest tests failed:'
97
- puts result[:stderr] if result[:stderr].length.positive?
98
- end
99
-
100
- result
101
- end
102
-
103
88
  # Shared example for RSpec-based projects
104
89
  shared_examples 'executable rspec project' do |project_name|
105
90
  let(:project) { project_name }
@@ -140,26 +125,6 @@ describe 'End-to-End Project Generation and Execution' do
140
125
  end
141
126
  end
142
127
 
143
- # Shared example for Minitest-based projects
144
- shared_examples 'executable minitest project' do |project_name|
145
- let(:project) { project_name }
146
-
147
- it 'installs dependencies successfully' do
148
- expect(bundle_install(project)).to be true
149
- end
150
-
151
- it 'runs generated Minitest tests successfully', :slow do
152
- skip 'Bundle install failed' unless bundle_install(project)
153
-
154
- result = run_minitest(project)
155
-
156
- expect(result[:success]).to be(true),
157
- "Minitest tests failed with exit code #{result[:exit_code]}.\n" \
158
- "STDOUT: #{result[:stdout]}\n" \
159
- "STDERR: #{result[:stderr]}"
160
- end
161
- end
162
-
163
128
  # Test Web Frameworks (these can run without external services)
164
129
  context 'Web Automation Frameworks' do
165
130
  describe 'Selenium + RSpec' do
@@ -170,10 +135,6 @@ describe 'End-to-End Project Generation and Execution' do
170
135
  include_examples 'executable rspec project', 'rspec_watir'
171
136
  end
172
137
 
173
- describe 'Capybara + RSpec' do
174
- include_examples 'executable rspec project', 'rspec_capybara'
175
- end
176
-
177
138
  describe 'Selenium + Cucumber' do
178
139
  include_examples 'executable cucumber project', 'cucumber_selenium'
179
140
  end
@@ -182,21 +143,6 @@ describe 'End-to-End Project Generation and Execution' do
182
143
  include_examples 'executable cucumber project', 'cucumber_watir'
183
144
  end
184
145
 
185
- describe 'Capybara + Cucumber' do
186
- include_examples 'executable cucumber project', 'cucumber_capybara'
187
- end
188
-
189
- describe 'Selenium + Minitest' do
190
- include_examples 'executable minitest project', 'minitest_selenium'
191
- end
192
-
193
- describe 'Watir + Minitest' do
194
- include_examples 'executable minitest project', 'minitest_watir'
195
- end
196
-
197
- describe 'Capybara + Minitest' do
198
- include_examples 'executable minitest project', 'minitest_capybara'
199
- end
200
146
  end
201
147
 
202
148
  # Mobile and Visual frameworks require external services, so we only verify structure
@@ -280,48 +226,6 @@ describe 'End-to-End Project Generation and Execution' do
280
226
  end
281
227
  end
282
228
 
283
- context 'Minitest Mobile Frameworks (structure validation only)' do
284
- describe 'Android + Minitest' do
285
- it 'generates valid project structure' do
286
- expect(File).to exist('minitest_android/helpers/test_helper.rb')
287
- expect(File).to exist('minitest_android/Gemfile')
288
- expect(File).to exist('minitest_android/test')
289
- end
290
-
291
- it 'has valid Ruby syntax in generated files' do
292
- result = run_in_project('minitest_android', 'ruby -c helpers/test_helper.rb')
293
- expect(result[:success]).to be true
294
- end
295
- end
296
-
297
- describe 'iOS + Minitest' do
298
- it 'generates valid project structure' do
299
- expect(File).to exist('minitest_ios/helpers/test_helper.rb')
300
- expect(File).to exist('minitest_ios/Gemfile')
301
- expect(File).to exist('minitest_ios/test')
302
- end
303
-
304
- it 'has valid Ruby syntax in generated files' do
305
- result = run_in_project('minitest_ios', 'ruby -c helpers/test_helper.rb')
306
- expect(result[:success]).to be true
307
- end
308
- end
309
-
310
- describe 'Cross-Platform + Minitest' do
311
- it 'generates valid project structure' do
312
- expect(File).to exist('minitest_cross_platform/helpers/test_helper.rb')
313
- expect(File).to exist('minitest_cross_platform/helpers/appium_helper.rb')
314
- expect(File).to exist('minitest_cross_platform/Gemfile')
315
- expect(File).to exist('minitest_cross_platform/test')
316
- end
317
-
318
- it 'has valid Ruby syntax in generated files' do
319
- result = run_in_project('minitest_cross_platform', 'ruby -c helpers/test_helper.rb')
320
- expect(result[:success]).to be true
321
- end
322
- end
323
- end
324
-
325
229
  # Verify template system performance (caching working)
326
230
  context 'Template System Performance' do
327
231
  it 'benefits from template caching on second generation' do
@@ -11,8 +11,8 @@ describe 'Axe accessibility addon generation' do
11
11
  # rubocop:disable RSpec/BeforeAfterAll, RSpec/InstanceVariable
12
12
  before(:all) do
13
13
  @axe_projects = []
14
- %w[rspec cucumber minitest].each do |framework|
15
- %w[selenium watir capybara].each do |automation|
14
+ %w[rspec cucumber].each do |framework|
15
+ %w[selenium watir].each do |automation|
16
16
  name = "axe_#{framework}_#{automation}"
17
17
  @axe_projects << name
18
18
  InvokeGenerators.generate_framework(
@@ -62,24 +62,6 @@ describe 'Axe accessibility addon generation' do
62
62
  end
63
63
  end
64
64
 
65
- context 'with minitest and selenium' do
66
- let(:name) { 'axe_minitest_selenium' }
67
-
68
- it 'creates test_accessibility.rb' do
69
- expect(File).to exist("#{name}/test/test_accessibility.rb")
70
- end
71
-
72
- it 'includes axe gems in Gemfile' do
73
- gemfile = File.read("#{name}/Gemfile")
74
- expect(gemfile).to include('axe')
75
- end
76
-
77
- it 'accessibility test has valid Ruby syntax' do
78
- content = File.read("#{name}/test/test_accessibility.rb")
79
- expect { RubyVM::InstructionSequence.compile(content) }.not_to raise_error
80
- end
81
- end
82
-
83
65
  context 'with rspec and watir' do
84
66
  let(:name) { 'axe_rspec_watir' }
85
67
 
@@ -88,14 +70,6 @@ describe 'Axe accessibility addon generation' do
88
70
  end
89
71
  end
90
72
 
91
- context 'with rspec and capybara' do
92
- let(:name) { 'axe_rspec_capybara' }
93
-
94
- it 'creates accessibility_spec.rb' do
95
- expect(File).to exist("#{name}/spec/accessibility_spec.rb")
96
- end
97
- end
98
-
99
73
  context 'with cucumber and watir' do
100
74
  let(:name) { 'axe_cucumber_watir' }
101
75
 
@@ -104,30 +78,6 @@ describe 'Axe accessibility addon generation' do
104
78
  end
105
79
  end
106
80
 
107
- context 'with cucumber and capybara' do
108
- let(:name) { 'axe_cucumber_capybara' }
109
-
110
- it 'creates accessibility.feature' do
111
- expect(File).to exist("#{name}/features/accessibility.feature")
112
- end
113
- end
114
-
115
- context 'with minitest and watir' do
116
- let(:name) { 'axe_minitest_watir' }
117
-
118
- it 'creates test_accessibility.rb' do
119
- expect(File).to exist("#{name}/test/test_accessibility.rb")
120
- end
121
- end
122
-
123
- context 'with minitest and capybara' do
124
- let(:name) { 'axe_minitest_capybara' }
125
-
126
- it 'creates test_accessibility.rb' do
127
- expect(File).to exist("#{name}/test/test_accessibility.rb")
128
- end
129
- end
130
-
131
81
  context 'without accessibility flag' do
132
82
  let(:name) { 'no_axe_rspec_selenium' }
133
83