ruby_raider 3.0.1 → 3.2.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.
- checksums.yaml +4 -4
- data/.github/workflows/e2e_tests.yml +0 -17
- data/.github/workflows/system_tests.yml +0 -22
- data/README.md +8 -63
- data/lib/commands/scaffolding_commands.rb +1 -192
- data/lib/commands/utility_commands.rb +0 -52
- data/lib/generators/automation/templates/login.tt +1 -9
- data/lib/generators/automation/templates/page.tt +1 -7
- data/lib/generators/automation/templates/partials/initialize_selector.tt +1 -3
- data/lib/generators/automation/templates/partials/visit_method.tt +2 -6
- data/lib/generators/common_generator.rb +0 -6
- data/lib/generators/cucumber/cucumber_generator.rb +0 -24
- data/lib/generators/cucumber/templates/accessibility_steps.tt +2 -6
- data/lib/generators/cucumber/templates/cucumber.tt +0 -7
- data/lib/generators/cucumber/templates/env.tt +1 -3
- data/lib/generators/cucumber/templates/partials/appium_env.tt +1 -6
- data/lib/generators/cucumber/templates/partials/selenium_env.tt +0 -13
- data/lib/generators/cucumber/templates/partials/watir_env.tt +0 -13
- data/lib/generators/cucumber/templates/partials/web_steps.tt +4 -4
- data/lib/generators/cucumber/templates/world.tt +1 -3
- data/lib/generators/generator.rb +2 -46
- data/lib/generators/helper_generator.rb +4 -49
- data/lib/generators/infrastructure/templates/github.tt +2 -2
- data/lib/generators/infrastructure/templates/github_appium.tt +2 -6
- data/lib/generators/invoke_generators.rb +4 -25
- data/lib/generators/menu_generator.rb +10 -100
- data/lib/generators/rspec/rspec_generator.rb +0 -11
- data/lib/generators/rspec/templates/accessibility_spec.tt +2 -6
- data/lib/generators/rspec/templates/spec.tt +6 -8
- data/lib/generators/templates/common/gemfile.tt +0 -26
- data/lib/generators/templates/common/git_ignore.tt +0 -2
- data/lib/generators/templates/common/partials/mobile_config.tt +0 -4
- data/lib/generators/templates/common/partials/web_config.tt +1 -12
- data/lib/generators/templates/common/rakefile.tt +0 -9
- data/lib/generators/templates/common/read_me.tt +4 -10
- data/lib/generators/templates/helpers/allure_helper.tt +0 -10
- data/lib/generators/templates/helpers/browser_helper.tt +0 -5
- data/lib/generators/templates/helpers/partials/quit_driver.tt +1 -3
- data/lib/generators/templates/helpers/partials/screenshot.tt +1 -3
- data/lib/generators/templates/helpers/partials/selenium_driver.tt +0 -5
- data/lib/generators/templates/helpers/spec_helper.tt +2 -44
- data/lib/generators/templates/helpers/test_helper.tt +0 -7
- data/lib/ruby_raider.rb +2 -50
- data/lib/scaffolding/project_detector.rb +2 -9
- data/lib/scaffolding/scaffolding.rb +0 -109
- data/lib/scaffolding/templates/component.tt +1 -4
- data/lib/scaffolding/templates/page_object.tt +0 -10
- data/lib/scaffolding/templates/spec.tt +2 -6
- data/lib/scaffolding/templates/steps.tt +0 -2
- data/lib/utilities/utilities.rb +20 -33
- data/lib/version +1 -1
- data/sig/commands/scaffolding_commands.rbs +0 -12
- data/sig/commands/utility_commands.rbs +0 -7
- data/sig/generators/cucumber/cucumber_generator.rbs +0 -4
- data/sig/generators/generator.rbs +0 -11
- data/sig/generators/helper_generator.rbs +1 -6
- data/sig/generators/invoke_generators.rbs +1 -2
- data/sig/generators/menu_generator.rbs +2 -6
- data/sig/generators/rspec/rspec_generator.rbs +0 -2
- data/sig/ruby_raider.rbs +1 -3
- data/sig/scaffolding/project_detector.rbs +0 -1
- data/sig/scaffolding/scaffolding.rbs +0 -23
- data/sig/utilities/utilities.rbs +0 -5
- data/spec/commands/raider_commands_spec.rb +0 -61
- data/spec/integration/commands/browser_update_after_creation_spec.rb +123 -0
- data/spec/integration/commands/scaffolding_commands_spec.rb +0 -20
- data/spec/integration/commands/utility_commands_spec.rb +5 -5
- data/spec/integration/content/ci_content_spec.rb +6 -61
- data/spec/integration/content/common_content_spec.rb +0 -64
- data/spec/integration/content/config_content_spec.rb +0 -86
- data/spec/integration/content/content_helper.rb +2 -2
- data/spec/integration/content/gemfile_content_spec.rb +0 -71
- data/spec/integration/content/helper_content_spec.rb +2 -284
- data/spec/integration/content/page_content_spec.rb +0 -89
- data/spec/integration/content/syntax_validation_spec.rb +2 -2
- data/spec/integration/content/test_content_spec.rb +0 -119
- data/spec/integration/end_to_end_features_spec.rb +13 -435
- data/spec/integration/end_to_end_spec.rb +0 -96
- data/spec/integration/generators/axe_addon_spec.rb +2 -52
- data/spec/integration/generators/common_generator_spec.rb +1 -13
- data/spec/integration/generators/config_features_spec.rb +3 -81
- data/spec/integration/generators/github_generator_spec.rb +5 -15
- data/spec/integration/generators/helpers_generator_spec.rb +0 -37
- data/spec/integration/scaffolding_e2e_spec.rb +2 -237
- data/spec/integration/settings_helper.rb +1 -3
- data/spec/integration/spec_helper.rb +6 -11
- data/spec/menus/menu_generator_spec.rb +4 -107
- data/spec/scaffolding/scaffold_project_detector_spec.rb +4 -26
- data/spec/scaffolding/scaffolding_features_spec.rb +0 -183
- data/spec/system/selenium_spec.rb +1 -4
- data/spec/system/support/system_test_helper.rb +0 -1
- data/spec/system/watir_spec.rb +1 -4
- data/spec/utilities/headless_config_spec.rb +0 -7
- metadata +3 -102
- data/lib/adopter/adopt_menu.rb +0 -146
- data/lib/adopter/converters/base_converter.rb +0 -84
- data/lib/adopter/converters/identity_converter.rb +0 -53
- data/lib/adopter/migration_plan.rb +0 -74
- data/lib/adopter/migrator.rb +0 -96
- data/lib/adopter/plan_builder.rb +0 -275
- data/lib/adopter/project_analyzer.rb +0 -252
- data/lib/adopter/project_detector.rb +0 -157
- data/lib/generators/cucumber/templates/partials/capybara_env.tt +0 -38
- data/lib/generators/cucumber/templates/partials/capybara_world.tt +0 -6
- data/lib/generators/cucumber/templates/performance_feature.tt +0 -5
- data/lib/generators/cucumber/templates/performance_steps.tt +0 -17
- data/lib/generators/cucumber/templates/visual_feature.tt +0 -5
- data/lib/generators/cucumber/templates/visual_steps.tt +0 -19
- data/lib/generators/infrastructure/gitlab_generator.rb +0 -11
- data/lib/generators/infrastructure/templates/gitlab.tt +0 -46
- data/lib/generators/minitest/minitest_generator.rb +0 -35
- data/lib/generators/minitest/templates/accessibility_test.tt +0 -26
- data/lib/generators/minitest/templates/performance_test.tt +0 -18
- data/lib/generators/minitest/templates/test.tt +0 -64
- data/lib/generators/minitest/templates/visual_test.tt +0 -23
- data/lib/generators/rspec/templates/performance_spec.tt +0 -18
- data/lib/generators/rspec/templates/visual_spec.tt +0 -20
- data/lib/generators/templates/common/ruby_version.tt +0 -1
- data/lib/generators/templates/helpers/capybara_helper.tt +0 -32
- data/lib/generators/templates/helpers/debug_helper.tt +0 -190
- data/lib/generators/templates/helpers/partials/debug_diagnostics.tt +0 -7
- data/lib/generators/templates/helpers/partials/debug_start.tt +0 -7
- data/lib/generators/templates/helpers/performance_helper.tt +0 -57
- data/lib/generators/templates/helpers/visual_helper.tt +0 -58
- data/lib/llm/client.rb +0 -79
- data/lib/llm/config.rb +0 -57
- data/lib/llm/prompts.rb +0 -84
- data/lib/llm/provider.rb +0 -27
- data/lib/llm/providers/anthropic_provider.rb +0 -43
- data/lib/llm/providers/ollama_provider.rb +0 -56
- data/lib/llm/providers/openai_provider.rb +0 -42
- data/lib/llm/response_parser.rb +0 -67
- data/lib/plugin/plugin.rb +0 -111
- data/lib/plugin/plugin_exposer.rb +0 -55
- data/lib/scaffolding/crud_generator.rb +0 -94
- data/lib/scaffolding/dry_run_presenter.rb +0 -16
- data/lib/scaffolding/page_introspector.rb +0 -45
- data/lib/scaffolding/scaffold_menu.rb +0 -103
- data/lib/scaffolding/templates/page_from_url.tt +0 -75
- data/lib/scaffolding/templates/spec_from_page.tt +0 -31
- data/lib/scaffolding/templates/spec_from_url.tt +0 -46
- data/lib/scaffolding/url_analyzer.rb +0 -179
- data/sig/adopter/adopt_menu.rbs +0 -25
- data/sig/adopter/converters/base_converter.rbs +0 -23
- data/sig/adopter/converters/identity_converter.rbs +0 -16
- data/sig/adopter/migration_plan.rbs +0 -34
- data/sig/adopter/migrator.rbs +0 -21
- data/sig/adopter/plan_builder.rbs +0 -38
- data/sig/adopter/project_analyzer.rbs +0 -39
- data/sig/adopter/project_detector.rbs +0 -26
- data/sig/generators/infrastructure/gitlab_generator.rbs +0 -4
- data/sig/generators/minitest/minitest_generator.rbs +0 -8
- data/sig/llm/client.rbs +0 -15
- data/sig/llm/config.rbs +0 -20
- data/sig/llm/prompts.rbs +0 -8
- data/sig/llm/provider.rbs +0 -12
- data/sig/llm/providers/anthropic_provider.rbs +0 -16
- data/sig/llm/providers/ollama_provider.rbs +0 -18
- data/sig/llm/providers/openai_provider.rbs +0 -16
- data/sig/llm/response_parser.rbs +0 -13
- data/sig/plugin/plugin.rbs +0 -24
- data/sig/plugin/plugin_exposer.rbs +0 -20
- data/sig/scaffolding/crud_generator.rbs +0 -16
- data/sig/scaffolding/dry_run_presenter.rbs +0 -4
- data/sig/scaffolding/page_introspector.rbs +0 -14
- data/sig/scaffolding/scaffold_menu.rbs +0 -18
- data/sig/scaffolding/url_analyzer.rbs +0 -28
- data/spec/adopter/adopt_menu_spec.rb +0 -176
- data/spec/adopter/converters/identity_converter_spec.rb +0 -145
- data/spec/adopter/migration_plan_spec.rb +0 -113
- data/spec/adopter/migrator_spec.rb +0 -277
- data/spec/adopter/plan_builder_spec.rb +0 -298
- data/spec/adopter/project_analyzer_spec.rb +0 -337
- data/spec/adopter/project_detector_spec.rb +0 -295
- data/spec/generators/generator_spec.rb +0 -23
- data/spec/integration/content/reporter_content_spec.rb +0 -236
- data/spec/integration/content/skip_flags_content_spec.rb +0 -206
- data/spec/integration/generators/debug_helper_spec.rb +0 -68
- data/spec/integration/generators/gitlab_generator_spec.rb +0 -38
- data/spec/integration/generators/lighthouse_addon_spec.rb +0 -132
- data/spec/integration/generators/minitest_generator_spec.rb +0 -64
- data/spec/integration/generators/reporter_spec.rb +0 -159
- data/spec/integration/generators/skip_flags_spec.rb +0 -134
- data/spec/integration/generators/visual_addon_spec.rb +0 -148
- data/spec/llm/client_spec.rb +0 -79
- data/spec/llm/config_spec.rb +0 -92
- data/spec/llm/prompts_spec.rb +0 -49
- data/spec/llm/response_parser_spec.rb +0 -92
- data/spec/menus/adopter_adopt_menu_spec.rb +0 -97
- data/spec/scaffolding/page_introspector_spec.rb +0 -82
- data/spec/scaffolding/url_analyzer_spec.rb +0 -110
- data/spec/system/adopt_matrix_spec.rb +0 -537
- data/spec/system/adopt_spec.rb +0 -225
- data/spec/system/capybara_spec.rb +0 -42
|
@@ -4,10 +4,8 @@ require 'yaml'
|
|
|
4
4
|
require_relative 'content_helper'
|
|
5
5
|
|
|
6
6
|
describe 'CI pipeline content' do
|
|
7
|
-
# --- GitHub Actions ---
|
|
8
|
-
|
|
9
7
|
shared_examples 'valid github pipeline' do |project_name|
|
|
10
|
-
subject(:pipeline) { read_generated(
|
|
8
|
+
subject(:pipeline) { read_generated(project_name, '.github/workflows/test_pipeline.yml') }
|
|
11
9
|
|
|
12
10
|
it 'is valid YAML' do
|
|
13
11
|
expect { YAML.safe_load(pipeline) }.not_to raise_error
|
|
@@ -31,7 +29,7 @@ describe 'CI pipeline content' do
|
|
|
31
29
|
end
|
|
32
30
|
|
|
33
31
|
shared_examples 'github rspec pipeline' do |project_name|
|
|
34
|
-
subject(:pipeline) { read_generated(
|
|
32
|
+
subject(:pipeline) { read_generated(project_name, '.github/workflows/test_pipeline.yml') }
|
|
35
33
|
|
|
36
34
|
it 'runs rspec' do
|
|
37
35
|
expect(pipeline).to include('rspec')
|
|
@@ -39,81 +37,28 @@ describe 'CI pipeline content' do
|
|
|
39
37
|
end
|
|
40
38
|
|
|
41
39
|
shared_examples 'github cucumber pipeline' do |project_name|
|
|
42
|
-
subject(:pipeline) { read_generated(
|
|
40
|
+
subject(:pipeline) { read_generated(project_name, '.github/workflows/test_pipeline.yml') }
|
|
43
41
|
|
|
44
42
|
it 'runs cucumber' do
|
|
45
43
|
expect(pipeline).to include('cucumber')
|
|
46
44
|
end
|
|
47
45
|
end
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
subject(:pipeline) { read_generated("#{project_name}_github", '.github/workflows/test_pipeline.yml') }
|
|
51
|
-
|
|
52
|
-
it 'runs minitest' do
|
|
53
|
-
expect(pipeline).to match(/minitest|ruby.*test/)
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
context 'with rspec and selenium on github' do
|
|
47
|
+
context 'with rspec and selenium' do
|
|
58
48
|
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::SELENIUM}"
|
|
59
49
|
include_examples 'valid github pipeline', name
|
|
60
50
|
include_examples 'github rspec pipeline', name
|
|
61
51
|
end
|
|
62
52
|
|
|
63
|
-
context 'with cucumber and selenium
|
|
53
|
+
context 'with cucumber and selenium' do
|
|
64
54
|
name = "#{FrameworkIndex::CUCUMBER}_#{AutomationIndex::SELENIUM}"
|
|
65
55
|
include_examples 'valid github pipeline', name
|
|
66
56
|
include_examples 'github cucumber pipeline', name
|
|
67
57
|
end
|
|
68
58
|
|
|
69
|
-
context 'with
|
|
70
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::SELENIUM}"
|
|
71
|
-
include_examples 'valid github pipeline', name
|
|
72
|
-
include_examples 'github minitest pipeline', name
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
context 'with rspec and capybara on github' do
|
|
76
|
-
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::CAPYBARA}"
|
|
77
|
-
include_examples 'valid github pipeline', name
|
|
78
|
-
include_examples 'github rspec pipeline', name
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
context 'with rspec and watir on github' do
|
|
59
|
+
context 'with rspec and watir' do
|
|
82
60
|
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::WATIR}"
|
|
83
61
|
include_examples 'valid github pipeline', name
|
|
84
62
|
include_examples 'github rspec pipeline', name
|
|
85
63
|
end
|
|
86
|
-
|
|
87
|
-
# --- GitLab CI ---
|
|
88
|
-
|
|
89
|
-
shared_examples 'valid gitlab pipeline' do |project_name|
|
|
90
|
-
subject(:pipeline) { read_generated("#{project_name}_gitlab", 'gitlab-ci.yml') }
|
|
91
|
-
|
|
92
|
-
it 'is valid YAML' do
|
|
93
|
-
expect { YAML.safe_load(pipeline) }.not_to raise_error
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
it 'has stages' do
|
|
97
|
-
expect(pipeline).to include('stages:')
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
it 'has script section' do
|
|
101
|
-
expect(pipeline).to include('script:')
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
context 'with rspec and selenium on gitlab' do
|
|
106
|
-
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::SELENIUM}"
|
|
107
|
-
include_examples 'valid gitlab pipeline', name
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
context 'with cucumber and selenium on gitlab' do
|
|
111
|
-
name = "#{FrameworkIndex::CUCUMBER}_#{AutomationIndex::SELENIUM}"
|
|
112
|
-
include_examples 'valid gitlab pipeline', name
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
context 'with minitest and selenium on gitlab' do
|
|
116
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::SELENIUM}"
|
|
117
|
-
include_examples 'valid gitlab pipeline', name
|
|
118
|
-
end
|
|
119
64
|
end
|
|
@@ -73,22 +73,6 @@ describe 'Common file content' do
|
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
shared_examples 'minitest rakefile with default task' do |project_name|
|
|
77
|
-
subject(:rakefile) { read_generated(project_name, 'Rakefile') }
|
|
78
|
-
|
|
79
|
-
it 'requires rake/testtask' do
|
|
80
|
-
expect(rakefile).to include("require 'rake/testtask'")
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
it 'defines test task' do
|
|
84
|
-
expect(rakefile).to include('Rake::TestTask.new(:test)')
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
it 'sets default task to test' do
|
|
88
|
-
expect(rakefile).to include('task default: :test')
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
|
|
92
76
|
# --- .rspec file ---
|
|
93
77
|
|
|
94
78
|
shared_examples 'has rspec dotfile' do |project_name|
|
|
@@ -215,16 +199,6 @@ describe 'Common file content' do
|
|
|
215
199
|
it_behaves_like 'gemfile with rspec-retry', name
|
|
216
200
|
end
|
|
217
201
|
|
|
218
|
-
context 'with rspec and capybara' do
|
|
219
|
-
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::CAPYBARA}"
|
|
220
|
-
it_behaves_like 'valid rakefile', name
|
|
221
|
-
it_behaves_like 'rspec rakefile with tag tasks', name
|
|
222
|
-
it_behaves_like 'has rspec dotfile', name
|
|
223
|
-
it_behaves_like 'rspec gitignore', name
|
|
224
|
-
it_behaves_like 'spec helper with retry config', name
|
|
225
|
-
it_behaves_like 'gemfile with rspec-retry', name
|
|
226
|
-
end
|
|
227
|
-
|
|
228
202
|
# --- Cucumber contexts ---
|
|
229
203
|
|
|
230
204
|
context 'with cucumber and selenium' do
|
|
@@ -247,42 +221,4 @@ describe 'Common file content' do
|
|
|
247
221
|
it_behaves_like 'cucumber config with retry', name
|
|
248
222
|
end
|
|
249
223
|
|
|
250
|
-
context 'with cucumber and capybara' do
|
|
251
|
-
name = "#{FrameworkIndex::CUCUMBER}_#{AutomationIndex::CAPYBARA}"
|
|
252
|
-
it_behaves_like 'valid rakefile', name
|
|
253
|
-
it_behaves_like 'cucumber rakefile with tag tasks', name
|
|
254
|
-
it_behaves_like 'no rspec dotfile', name
|
|
255
|
-
it_behaves_like 'non-rspec gitignore', name
|
|
256
|
-
it_behaves_like 'gemfile without rspec-retry', name
|
|
257
|
-
it_behaves_like 'cucumber config with retry', name
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
# --- Minitest contexts ---
|
|
261
|
-
|
|
262
|
-
context 'with minitest and selenium' do
|
|
263
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::SELENIUM}"
|
|
264
|
-
it_behaves_like 'valid rakefile', name
|
|
265
|
-
it_behaves_like 'minitest rakefile with default task', name
|
|
266
|
-
it_behaves_like 'no rspec dotfile', name
|
|
267
|
-
it_behaves_like 'non-rspec gitignore', name
|
|
268
|
-
it_behaves_like 'gemfile without rspec-retry', name
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
context 'with minitest and watir' do
|
|
272
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::WATIR}"
|
|
273
|
-
it_behaves_like 'valid rakefile', name
|
|
274
|
-
it_behaves_like 'minitest rakefile with default task', name
|
|
275
|
-
it_behaves_like 'no rspec dotfile', name
|
|
276
|
-
it_behaves_like 'non-rspec gitignore', name
|
|
277
|
-
it_behaves_like 'gemfile without rspec-retry', name
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
context 'with minitest and capybara' do
|
|
281
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::CAPYBARA}"
|
|
282
|
-
it_behaves_like 'valid rakefile', name
|
|
283
|
-
it_behaves_like 'minitest rakefile with default task', name
|
|
284
|
-
it_behaves_like 'no rspec dotfile', name
|
|
285
|
-
it_behaves_like 'non-rspec gitignore', name
|
|
286
|
-
it_behaves_like 'gemfile without rspec-retry', name
|
|
287
|
-
end
|
|
288
224
|
end
|
|
@@ -51,110 +51,24 @@ describe 'Config file content' do
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
shared_examples 'config with video section' do |project_name|
|
|
55
|
-
subject(:config_content) { read_generated(project_name, 'config/config.yml') }
|
|
56
|
-
|
|
57
|
-
let(:config) { YAML.safe_load(config_content, permitted_classes: [Symbol]) }
|
|
58
|
-
|
|
59
|
-
it 'has video section' do
|
|
60
|
-
expect(config).to have_key('video')
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
it 'has video enabled key defaulting to false' do
|
|
64
|
-
expect(config['video']['enabled']).to be false
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
it 'has video strategy key' do
|
|
68
|
-
expect(config['video']['strategy']).to eq('auto')
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
shared_examples 'config with debug section' do |project_name|
|
|
73
|
-
subject(:config_content) { read_generated(project_name, 'config/config.yml') }
|
|
74
|
-
|
|
75
|
-
let(:config) { YAML.safe_load(config_content, permitted_classes: [Symbol]) }
|
|
76
|
-
|
|
77
|
-
it 'has debug section' do
|
|
78
|
-
expect(config).to have_key('debug')
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
it 'has debug enabled key defaulting to false' do
|
|
82
|
-
expect(config['debug']['enabled']).to be false
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
it 'has debug console_logs key' do
|
|
86
|
-
expect(config['debug']['console_logs']).to be true
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
it 'has debug action_logging key' do
|
|
90
|
-
expect(config['debug']['action_logging']).to be true
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
it 'has debug network_logging key' do
|
|
94
|
-
expect(config['debug']['network_logging']).to be true
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
it 'has debug log_dir key' do
|
|
98
|
-
expect(config['debug']['log_dir']).to eq('debug_logs')
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
|
|
102
54
|
# --- Web config per automation ---
|
|
103
55
|
|
|
104
56
|
context 'with rspec and selenium' do
|
|
105
57
|
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::SELENIUM}"
|
|
106
58
|
include_examples 'valid web config', name
|
|
107
59
|
include_examples 'selenium config with timeout', name
|
|
108
|
-
include_examples 'config with video section', name
|
|
109
|
-
include_examples 'config with debug section', name
|
|
110
60
|
end
|
|
111
61
|
|
|
112
62
|
context 'with rspec and watir' do
|
|
113
63
|
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::WATIR}"
|
|
114
64
|
include_examples 'valid web config', name
|
|
115
65
|
include_examples 'config without driver_options', name
|
|
116
|
-
include_examples 'config with video section', name
|
|
117
|
-
include_examples 'config with debug section', name
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
context 'with rspec and capybara' do
|
|
121
|
-
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::CAPYBARA}"
|
|
122
|
-
include_examples 'valid web config', name
|
|
123
|
-
include_examples 'config without driver_options', name
|
|
124
|
-
include_examples 'config with video section', name
|
|
125
|
-
include_examples 'config with debug section', name
|
|
126
66
|
end
|
|
127
67
|
|
|
128
68
|
context 'with cucumber and selenium' do
|
|
129
69
|
name = "#{FrameworkIndex::CUCUMBER}_#{AutomationIndex::SELENIUM}"
|
|
130
70
|
include_examples 'valid web config', name
|
|
131
71
|
include_examples 'selenium config with timeout', name
|
|
132
|
-
include_examples 'config with video section', name
|
|
133
|
-
include_examples 'config with debug section', name
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
context 'with minitest and selenium' do
|
|
137
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::SELENIUM}"
|
|
138
|
-
include_examples 'valid web config', name
|
|
139
|
-
include_examples 'selenium config with timeout', name
|
|
140
|
-
include_examples 'config with video section', name
|
|
141
|
-
include_examples 'config with debug section', name
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
context 'with minitest and watir' do
|
|
145
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::WATIR}"
|
|
146
|
-
include_examples 'valid web config', name
|
|
147
|
-
include_examples 'config without driver_options', name
|
|
148
|
-
include_examples 'config with video section', name
|
|
149
|
-
include_examples 'config with debug section', name
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
context 'with minitest and capybara' do
|
|
153
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::CAPYBARA}"
|
|
154
|
-
include_examples 'valid web config', name
|
|
155
|
-
include_examples 'config without driver_options', name
|
|
156
|
-
include_examples 'config with video section', name
|
|
157
|
-
include_examples 'config with debug section', name
|
|
158
72
|
end
|
|
159
73
|
|
|
160
74
|
# --- Mobile config ---
|
|
@@ -7,8 +7,8 @@ module ContentHelper
|
|
|
7
7
|
File.read(File.join(project, relative_path))
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def project(framework, automation
|
|
11
|
-
|
|
10
|
+
def project(framework, automation)
|
|
11
|
+
"#{framework}_#{automation}"
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
@@ -67,22 +67,6 @@ describe 'Gemfile content' do
|
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
shared_examples 'contains minitest gems' do |project_name|
|
|
71
|
-
subject(:gemfile) { read_generated(project_name, 'Gemfile') }
|
|
72
|
-
|
|
73
|
-
it 'includes minitest' do
|
|
74
|
-
expect(gemfile).to include("gem 'minitest'")
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
it 'includes minitest-reporters' do
|
|
78
|
-
expect(gemfile).to include("gem 'minitest-reporters'")
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
it 'includes rubocop-minitest' do
|
|
82
|
-
expect(gemfile).to include("gem 'rubocop-minitest'")
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
|
|
86
70
|
shared_examples 'contains selenium gems' do |project_name|
|
|
87
71
|
subject(:gemfile) { read_generated(project_name, 'Gemfile') }
|
|
88
72
|
|
|
@@ -107,22 +91,6 @@ describe 'Gemfile content' do
|
|
|
107
91
|
end
|
|
108
92
|
end
|
|
109
93
|
|
|
110
|
-
shared_examples 'contains capybara gems' do |project_name|
|
|
111
|
-
subject(:gemfile) { read_generated(project_name, 'Gemfile') }
|
|
112
|
-
|
|
113
|
-
it 'includes capybara' do
|
|
114
|
-
expect(gemfile).to include("gem 'capybara'")
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
it 'includes selenium-webdriver as capybara driver' do
|
|
118
|
-
expect(gemfile).to include("gem 'selenium-webdriver'")
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
it 'does not include watir' do
|
|
122
|
-
expect(gemfile).not_to include("gem 'watir'")
|
|
123
|
-
end
|
|
124
|
-
end
|
|
125
|
-
|
|
126
94
|
shared_examples 'contains debug gems' do |project_name|
|
|
127
95
|
subject(:gemfile) { read_generated(project_name, 'Gemfile') }
|
|
128
96
|
|
|
@@ -151,14 +119,6 @@ describe 'Gemfile content' do
|
|
|
151
119
|
include_examples 'contains debug gems', name
|
|
152
120
|
end
|
|
153
121
|
|
|
154
|
-
context 'with rspec and capybara' do
|
|
155
|
-
name = "#{FrameworkIndex::RSPEC}_#{AutomationIndex::CAPYBARA}"
|
|
156
|
-
include_examples 'contains common gems', name
|
|
157
|
-
include_examples 'contains rspec gems', name
|
|
158
|
-
include_examples 'contains capybara gems', name
|
|
159
|
-
include_examples 'contains debug gems', name
|
|
160
|
-
end
|
|
161
|
-
|
|
162
122
|
context 'with cucumber and selenium' do
|
|
163
123
|
name = "#{FrameworkIndex::CUCUMBER}_#{AutomationIndex::SELENIUM}"
|
|
164
124
|
include_examples 'contains common gems', name
|
|
@@ -175,35 +135,4 @@ describe 'Gemfile content' do
|
|
|
175
135
|
include_examples 'contains debug gems', name
|
|
176
136
|
end
|
|
177
137
|
|
|
178
|
-
context 'with cucumber and capybara' do
|
|
179
|
-
name = "#{FrameworkIndex::CUCUMBER}_#{AutomationIndex::CAPYBARA}"
|
|
180
|
-
include_examples 'contains common gems', name
|
|
181
|
-
include_examples 'contains cucumber gems', name
|
|
182
|
-
include_examples 'contains capybara gems', name
|
|
183
|
-
include_examples 'contains debug gems', name
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
context 'with minitest and selenium' do
|
|
187
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::SELENIUM}"
|
|
188
|
-
include_examples 'contains common gems', name
|
|
189
|
-
include_examples 'contains minitest gems', name
|
|
190
|
-
include_examples 'contains selenium gems', name
|
|
191
|
-
include_examples 'contains debug gems', name
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
context 'with minitest and watir' do
|
|
195
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::WATIR}"
|
|
196
|
-
include_examples 'contains common gems', name
|
|
197
|
-
include_examples 'contains minitest gems', name
|
|
198
|
-
include_examples 'contains watir gems', name
|
|
199
|
-
include_examples 'contains debug gems', name
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
context 'with minitest and capybara' do
|
|
203
|
-
name = "#{FrameworkIndex::MINITEST}_#{AutomationIndex::CAPYBARA}"
|
|
204
|
-
include_examples 'contains common gems', name
|
|
205
|
-
include_examples 'contains minitest gems', name
|
|
206
|
-
include_examples 'contains capybara gems', name
|
|
207
|
-
include_examples 'contains debug gems', name
|
|
208
|
-
end
|
|
209
138
|
end
|