ruby_raider 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -6
- data/README.md +6 -0
- data/lib/commands/scaffolding_commands.rb +2 -2
- data/lib/commands/utility_commands.rb +8 -0
- data/lib/generators/automation_generator.rb +7 -7
- data/lib/generators/common_generator.rb +2 -0
- data/lib/generators/cucumber_generator.rb +1 -1
- data/lib/generators/helper_generator.rb +6 -0
- data/lib/generators/menu_generator.rb +9 -5
- data/lib/generators/rspec_generator.rb +2 -2
- data/lib/generators/templates/automation/abstract_page.tt +4 -0
- data/lib/generators/templates/automation/appium_caps.tt +7 -0
- data/lib/generators/templates/automation/home_page.tt +1 -5
- data/lib/generators/templates/automation/partials/android_caps.tt +5 -0
- data/lib/generators/templates/automation/partials/cross_platform_caps.tt +14 -0
- data/lib/generators/templates/automation/partials/home_page_selector.tt +8 -0
- data/lib/generators/templates/automation/partials/ios_caps.tt +6 -0
- data/lib/generators/templates/automation/partials/pdp_page_selector.tt +8 -0
- data/lib/generators/templates/automation/pdp_page.tt +1 -5
- data/lib/generators/templates/common/config.tt +5 -2
- data/lib/generators/templates/common/partials/mobile_config.tt +1 -0
- data/lib/generators/templates/common/partials/web_config.tt +2 -0
- data/lib/generators/templates/common/read_me.tt +4 -0
- data/lib/generators/templates/helpers/appium_helper.tt +29 -0
- data/lib/generators/templates/helpers/driver_helper.tt +15 -2
- data/lib/generators/templates/helpers/partials/driver_and_options.tt +8 -5
- data/lib/generators/templates/helpers/raider_helper.tt +3 -0
- data/lib/utilities/utilities.rb +5 -0
- data/ruby_raider.gemspec +2 -1
- data/spec/automation_generator_spec.rb +33 -150
- data/spec/common_generator_spec.rb +58 -105
- data/spec/cucumber_generator_spec.rb +18 -53
- data/spec/helpers_generator_spec.rb +73 -90
- data/spec/rspec_generator_spec.rb +15 -61
- data/spec/scaffolding_commands_spec.rb +162 -0
- data/spec/spec_helper.rb +20 -0
- metadata +26 -6
- data/lib/generators/templates/automation/appium_settings.tt +0 -5
- data/lib/generators/templates/automation/partials/android_settings.tt +0 -8
- data/lib/generators/templates/automation/partials/ios_settings.tt +0 -8
- data/spec/scaffolding_spec.rb +0 -234
@@ -4,192 +4,75 @@ require_relative '../lib/generators/automation_generator'
|
|
4
4
|
require_relative 'spec_helper'
|
5
5
|
|
6
6
|
describe AutomationGenerator do
|
7
|
-
|
8
|
-
before(:all) do
|
9
|
-
@name = 'rspec-selenium'
|
10
|
-
AutomationGenerator.new(['selenium', 'rspec', @name]).invoke_all
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'creates a login page file' do
|
14
|
-
expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'creates an abstract page file' do
|
18
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'creates an abstract component file' do
|
22
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'creates a component file' do
|
26
|
-
expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
|
27
|
-
end
|
28
|
-
|
29
|
-
after(:all) do
|
30
|
-
FileUtils.rm_rf(@name)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
context 'with watir' do
|
35
|
-
before(:all) do
|
36
|
-
@name = 'rspec-watir'
|
37
|
-
AutomationGenerator.new(['watir', 'rspec', @name]).invoke_all
|
38
|
-
end
|
39
|
-
|
7
|
+
shared_examples 'creates web automation files' do |name|
|
40
8
|
it 'creates a login page file' do
|
41
|
-
expect(File.exist
|
9
|
+
expect(File).to exist("#{name}/page_objects/pages/login_page.rb")
|
42
10
|
end
|
43
11
|
|
44
12
|
it 'creates an abstract page file' do
|
45
|
-
expect(File.exist
|
13
|
+
expect(File).to exist("#{name}/page_objects/abstract/abstract_page.rb")
|
46
14
|
end
|
47
15
|
|
48
16
|
it 'creates an abstract component file' do
|
49
|
-
expect(File.exist
|
17
|
+
expect(File).to exist("#{name}/page_objects/abstract/abstract_component.rb")
|
50
18
|
end
|
51
19
|
|
52
20
|
it 'creates a component file' do
|
53
|
-
expect(File.exist
|
54
|
-
end
|
55
|
-
|
56
|
-
after(:all) do
|
57
|
-
FileUtils.rm_rf(@name)
|
21
|
+
expect(File).to exist("#{name}/page_objects/components/header_component.rb")
|
58
22
|
end
|
59
23
|
end
|
60
24
|
|
61
|
-
|
62
|
-
before(:all) do
|
63
|
-
@name = 'rspec-appium-ios'
|
64
|
-
AutomationGenerator.new(['ios', 'rspec', @name]).invoke_all
|
65
|
-
end
|
66
|
-
|
25
|
+
shared_examples 'creates mobile automation files' do |name|
|
67
26
|
it 'creates a home page file' do
|
68
|
-
expect(File.exist
|
27
|
+
expect(File).to exist("#{name}/page_objects/pages/home_page.rb")
|
69
28
|
end
|
70
29
|
|
71
30
|
it 'creates an abstract page file' do
|
72
|
-
expect(File.exist
|
31
|
+
expect(File).to exist("#{name}/page_objects/abstract/abstract_page.rb")
|
73
32
|
end
|
74
33
|
|
75
34
|
it 'creates a pdp page file' do
|
76
|
-
expect(File.exist
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'creates an appium config file' do
|
80
|
-
expect(File.exist?("#{@name}/appium.txt")).to be_truthy
|
81
|
-
end
|
82
|
-
|
83
|
-
after(:all) do
|
84
|
-
FileUtils.rm_rf(@name)
|
35
|
+
expect(File).to exist("#{name}/page_objects/pages/pdp_page.rb")
|
85
36
|
end
|
86
37
|
end
|
87
38
|
|
88
|
-
context 'with rspec and
|
89
|
-
|
90
|
-
|
91
|
-
AutomationGenerator.new(['android', 'rspec', @name]).invoke_all
|
92
|
-
end
|
93
|
-
|
94
|
-
it 'creates a home page file' do
|
95
|
-
expect(File.exist?("#{@name}/page_objects/pages/home_page.rb")).to be_truthy
|
96
|
-
end
|
97
|
-
|
98
|
-
it 'creates an abstract page file' do
|
99
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
|
100
|
-
end
|
101
|
-
|
102
|
-
it 'creates a pdp page file' do
|
103
|
-
expect(File.exist?("#{@name}/page_objects/pages/pdp_page.rb")).to be_truthy
|
104
|
-
end
|
105
|
-
|
106
|
-
it 'creates an appium config file' do
|
107
|
-
expect(File.exist?("#{@name}/appium.txt")).to be_truthy
|
108
|
-
end
|
39
|
+
context 'with rspec and selenium' do
|
40
|
+
include_examples 'creates web automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
|
41
|
+
end
|
109
42
|
|
110
|
-
|
111
|
-
|
112
|
-
end
|
43
|
+
context 'with rspec and watir' do
|
44
|
+
include_examples 'creates web automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
|
113
45
|
end
|
114
46
|
|
115
47
|
context 'with cucumber and selenium' do
|
116
|
-
|
117
|
-
@name = 'cucumber-selenium'
|
118
|
-
AutomationGenerator.new(['selenium', 'cucumber', @name]).invoke_all
|
119
|
-
end
|
120
|
-
|
121
|
-
it 'creates a login page file' do
|
122
|
-
expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
|
123
|
-
end
|
124
|
-
|
125
|
-
it 'creates an abstract page file' do
|
126
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
|
127
|
-
end
|
128
|
-
|
129
|
-
it 'creates an abstract component file' do
|
130
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
|
131
|
-
end
|
132
|
-
|
133
|
-
it 'creates a component file' do
|
134
|
-
expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
|
135
|
-
end
|
136
|
-
|
137
|
-
after(:all) do
|
138
|
-
FileUtils.rm_rf(@name)
|
139
|
-
end
|
48
|
+
include_examples 'creates web automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
|
140
49
|
end
|
141
50
|
|
142
51
|
context 'with cucumber and watir' do
|
143
|
-
|
144
|
-
@name = 'cucumber-watir'
|
145
|
-
AutomationGenerator.new(['watir', 'cucumber', @name]).invoke_all
|
146
|
-
end
|
147
|
-
|
148
|
-
it 'creates a login page file' do
|
149
|
-
expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
|
150
|
-
end
|
151
|
-
|
152
|
-
it 'creates an abstract page file' do
|
153
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
|
154
|
-
end
|
155
|
-
|
156
|
-
it 'creates an abstract component file' do
|
157
|
-
expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
|
158
|
-
end
|
159
|
-
|
160
|
-
it 'creates a component file' do
|
161
|
-
expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
|
162
|
-
end
|
163
|
-
|
164
|
-
after(:all) do
|
165
|
-
FileUtils.rm_rf(@name)
|
166
|
-
end
|
52
|
+
include_examples 'creates web automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
|
167
53
|
end
|
168
54
|
|
169
|
-
context 'with
|
170
|
-
|
171
|
-
|
172
|
-
AutomationGenerator.new(['ios', 'cucumber', @name]).invoke_all
|
173
|
-
end
|
55
|
+
context 'with rspec and appium android' do
|
56
|
+
include_examples 'creates mobile automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
|
57
|
+
end
|
174
58
|
|
175
|
-
|
176
|
-
|
177
|
-
|
59
|
+
context 'with rspec and appium ios' do
|
60
|
+
include_examples 'creates mobile automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
|
61
|
+
end
|
178
62
|
|
179
|
-
|
180
|
-
|
181
|
-
|
63
|
+
context 'with cucumber and appium android' do
|
64
|
+
include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
|
65
|
+
end
|
182
66
|
|
183
|
-
|
184
|
-
|
185
|
-
|
67
|
+
context 'with cucumber and appium ios' do
|
68
|
+
include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
|
69
|
+
end
|
186
70
|
|
187
|
-
|
188
|
-
|
189
|
-
|
71
|
+
context 'with cucumber and appium cross platform' do
|
72
|
+
include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
|
73
|
+
end
|
190
74
|
|
191
|
-
|
192
|
-
|
193
|
-
end
|
75
|
+
context 'with cucumber and appium cross platform' do
|
76
|
+
include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
|
194
77
|
end
|
195
78
|
end
|
@@ -4,138 +4,91 @@ require_relative '../lib/generators/common_generator'
|
|
4
4
|
require_relative 'spec_helper'
|
5
5
|
|
6
6
|
describe CommonGenerator do
|
7
|
-
|
8
|
-
before(:all) do
|
9
|
-
@name = 'rspec-selenium'
|
10
|
-
CommonGenerator.new(['selenium', 'rspec', @name]).invoke_all
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'creates a config file' do
|
14
|
-
expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
|
15
|
-
end
|
16
|
-
|
7
|
+
shared_examples 'creates common files' do |name|
|
17
8
|
it 'creates a rake file' do
|
18
|
-
expect(File.exist
|
9
|
+
expect(File).to exist("#{name}/Rakefile")
|
19
10
|
end
|
20
11
|
|
21
12
|
it 'creates a readMe file' do
|
22
|
-
expect(File.exist
|
13
|
+
expect(File).to exist("#{name}/Readme.md")
|
23
14
|
end
|
24
15
|
|
25
16
|
it 'creates a gemfile file' do
|
26
|
-
expect(File.exist
|
27
|
-
end
|
28
|
-
|
29
|
-
after(:all) do
|
30
|
-
FileUtils.rm_rf(@name)
|
17
|
+
expect(File).to exist("#{name}/Gemfile")
|
31
18
|
end
|
32
19
|
end
|
33
20
|
|
34
|
-
|
35
|
-
before(:all) do
|
36
|
-
@name = 'rspec-watir'
|
37
|
-
CommonGenerator.new(['watir', 'rspec', @name]).invoke_all
|
38
|
-
end
|
39
|
-
|
21
|
+
shared_examples 'creates a config file' do |name|
|
40
22
|
it 'creates a config file' do
|
41
|
-
expect(File.exist
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'creates a rake file' do
|
45
|
-
expect(File.exist?("#{@name}/Rakefile")).to be_truthy
|
46
|
-
end
|
47
|
-
|
48
|
-
it 'creates a readMe file' do
|
49
|
-
expect(File.exist?("#{@name}/Readme.md")).to be_truthy
|
50
|
-
end
|
51
|
-
|
52
|
-
it 'creates a gemfile file' do
|
53
|
-
expect(File.exist?("#{@name}/Gemfile")).to be_truthy
|
54
|
-
end
|
55
|
-
|
56
|
-
after(:all) do
|
57
|
-
FileUtils.rm_rf(@name)
|
23
|
+
expect(File).to exist("#{name}/config/config.yml")
|
58
24
|
end
|
59
25
|
end
|
60
26
|
|
61
|
-
|
62
|
-
before(:all) do
|
63
|
-
@name = 'rspec-appium'
|
64
|
-
CommonGenerator.new(['appium_ios', 'rspec', @name]).invoke_all
|
65
|
-
end
|
66
|
-
|
27
|
+
shared_examples 'creates a capabilities file' do |name|
|
67
28
|
it 'creates a config file' do
|
68
|
-
expect(File.exist
|
69
|
-
end
|
70
|
-
|
71
|
-
it 'creates a rake file' do
|
72
|
-
expect(File.exist?("#{@name}/Rakefile")).to be_truthy
|
73
|
-
end
|
74
|
-
|
75
|
-
it 'creates a readMe file' do
|
76
|
-
expect(File.exist?("#{@name}/Readme.md")).to be_truthy
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'creates a gemfile file' do
|
80
|
-
expect(File.exist?("#{@name}/Gemfile")).to be_truthy
|
29
|
+
expect(File).to exist("#{name}/config/capabilities.yml")
|
81
30
|
end
|
31
|
+
end
|
82
32
|
|
83
|
-
|
84
|
-
|
33
|
+
shared_examples "doesn't create a config file" do |name|
|
34
|
+
it "doesn't create a config file" do
|
35
|
+
expect(File).to_not exist("#{name}/config/config.yml")
|
85
36
|
end
|
37
|
+
end
|
86
38
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
end
|
92
|
-
|
93
|
-
it 'creates a config file' do
|
94
|
-
expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
|
95
|
-
end
|
96
|
-
|
97
|
-
it 'creates a rake file' do
|
98
|
-
expect(File.exist?("#{@name}/Rakefile")).to be_truthy
|
99
|
-
end
|
39
|
+
context 'with rspec and selenium' do
|
40
|
+
include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
|
41
|
+
include_examples 'creates a config file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
|
42
|
+
end
|
100
43
|
|
101
|
-
|
102
|
-
|
103
|
-
|
44
|
+
context 'with rspec and watir' do
|
45
|
+
include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
|
46
|
+
include_examples 'creates a config file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
|
47
|
+
end
|
104
48
|
|
105
|
-
|
106
|
-
|
107
|
-
|
49
|
+
context 'with cucumber and selenium' do
|
50
|
+
include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
|
51
|
+
include_examples 'creates a config file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
|
52
|
+
end
|
108
53
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
54
|
+
context 'with cucumber and watir' do
|
55
|
+
include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
|
56
|
+
include_examples 'creates a config file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
|
57
|
+
end
|
113
58
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
59
|
+
context 'with rspec and appium android' do
|
60
|
+
include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
|
61
|
+
include_examples 'creates a capabilities file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
|
62
|
+
include_examples "doesn't create a config file", "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
|
63
|
+
end
|
119
64
|
|
120
|
-
|
121
|
-
|
122
|
-
|
65
|
+
context 'with rspec and appium ios' do
|
66
|
+
include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
|
67
|
+
include_examples 'creates a capabilities file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
|
68
|
+
include_examples "doesn't create a config file", "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
|
69
|
+
end
|
123
70
|
|
124
|
-
|
125
|
-
|
126
|
-
|
71
|
+
context 'with cucumber and appium android' do
|
72
|
+
include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
|
73
|
+
include_examples 'creates a capabilities file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
|
74
|
+
include_examples "doesn't create a config file", "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
|
75
|
+
end
|
127
76
|
|
128
|
-
|
129
|
-
|
130
|
-
|
77
|
+
context 'with cucumber and appium ios' do
|
78
|
+
include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
|
79
|
+
include_examples 'creates a capabilities file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
|
80
|
+
include_examples "doesn't create a config file", "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
|
81
|
+
end
|
131
82
|
|
132
|
-
|
133
|
-
|
134
|
-
|
83
|
+
context 'with cucumber and appium cross platform' do
|
84
|
+
include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
|
85
|
+
include_examples 'creates a capabilities file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
|
86
|
+
include_examples 'creates a config file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
|
87
|
+
end
|
135
88
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
89
|
+
context 'with rspec and appium cross platform' do
|
90
|
+
include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}"
|
91
|
+
include_examples 'creates a capabilities file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}"
|
92
|
+
include_examples 'creates a config file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}"
|
140
93
|
end
|
141
94
|
end
|
@@ -4,76 +4,41 @@ require_relative '../lib/generators/cucumber_generator'
|
|
4
4
|
require_relative 'spec_helper'
|
5
5
|
|
6
6
|
describe CucumberGenerator do
|
7
|
-
|
8
|
-
before(:all) do
|
9
|
-
@name = 'cucumber-selenium'
|
10
|
-
CucumberGenerator.new(['selenium', 'cucumber', @name]).invoke_all
|
11
|
-
end
|
12
|
-
|
7
|
+
shared_examples 'creates cucumber files' do |project_name, file_name|
|
13
8
|
it 'creates a feature file' do
|
14
|
-
expect(File.exist
|
9
|
+
expect(File).to exist("#{project_name}/features/#{file_name}.feature")
|
15
10
|
end
|
16
11
|
|
17
12
|
it 'creates a step definitions file' do
|
18
|
-
expect(File.exist
|
13
|
+
expect(File).to exist("#{project_name}/features/step_definitions/#{file_name}_steps.rb")
|
19
14
|
end
|
20
15
|
|
21
16
|
it 'creates an env file' do
|
22
|
-
expect(File.exist
|
17
|
+
expect(File).to exist("#{project_name}/features/support/env.rb")
|
23
18
|
end
|
24
19
|
|
25
20
|
it 'does not create a spec file' do
|
26
|
-
expect(File.exist
|
27
|
-
end
|
28
|
-
|
29
|
-
after(:all) do
|
30
|
-
FileUtils.rm_rf(@name)
|
21
|
+
expect(File).not_to exist("#{project_name}/spec/home_spec.rb")
|
31
22
|
end
|
32
23
|
end
|
33
24
|
|
34
|
-
context 'with
|
35
|
-
|
36
|
-
@name = 'cucumber-watir'
|
37
|
-
CucumberGenerator.new(['watir', 'cucumber', @name]).invoke_all
|
38
|
-
end
|
39
|
-
|
40
|
-
it 'creates a feature file' do
|
41
|
-
expect(File.exist?("#{@name}/features/login.feature")).to be_truthy
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'creates a step definitions file' do
|
45
|
-
expect(File.exist?("#{@name}/features/step_definitions/login_steps.rb")).to be_truthy
|
46
|
-
end
|
47
|
-
|
48
|
-
it 'creates an env file' do
|
49
|
-
expect(File.exist?("#{@name}/features/support/env.rb")).to be_truthy
|
50
|
-
end
|
51
|
-
|
52
|
-
after(:all) do
|
53
|
-
FileUtils.rm_rf(@name)
|
54
|
-
end
|
25
|
+
context 'with cucumber and appium android' do
|
26
|
+
include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}", 'home'
|
55
27
|
end
|
56
28
|
|
57
|
-
context 'with appium' do
|
58
|
-
|
59
|
-
|
60
|
-
CucumberGenerator.new(['appium_ios', 'cucumber', @name]).invoke_all
|
61
|
-
end
|
62
|
-
|
63
|
-
it 'creates a feature file' do
|
64
|
-
expect(File.exist?("#{@name}/features/login.feature")).to be_truthy
|
65
|
-
end
|
29
|
+
context 'with cucumber and appium ios' do
|
30
|
+
include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}", 'home'
|
31
|
+
end
|
66
32
|
|
67
|
-
|
68
|
-
|
69
|
-
|
33
|
+
context 'with cucumber and appium cross platform' do
|
34
|
+
include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}", 'home'
|
35
|
+
end
|
70
36
|
|
71
|
-
|
72
|
-
|
73
|
-
|
37
|
+
context 'with cucumber and selenium' do
|
38
|
+
include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}", 'login'
|
39
|
+
end
|
74
40
|
|
75
|
-
|
76
|
-
|
77
|
-
end
|
41
|
+
context 'with cucumber and watir' do
|
42
|
+
include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}", 'login'
|
78
43
|
end
|
79
44
|
end
|