acceptance_test 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.idea/acceptance_test.iml +74 -8
- data/CHANGES +4 -0
- data/lib/acceptance_test/acceptance_test.rb +19 -14
- data/lib/acceptance_test/version.rb +1 -1
- data/spec/features/google_search_spec.rb +3 -0
- data/spec/features/with_selenium_conf_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzMyZTg4YzliMjI3MjhkZTk4NzkyODRhNjYwZDQwMDkyMGY2ODM2MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2UwYzJmYjkzNTNmNTY3MTcwZDAwNjcwNWJhNGQ1MzY5NmNiODcxMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODAxYjNmYjE4N2U2NTVhZWFjZWE0NmZmN2YyOGIyYjI3YjU1NjBhNzNmYWUz
|
10
|
+
YjE3YTg4M2ZlZWZlZDJiNWM3ZDAxOTNhZjdkYjI2ZDM1YjBhZmI2ZDk2MDJm
|
11
|
+
ZjA3Yjc5NTU0ZjU2N2IwZDI4ODgyZTk5YmRjNWNhZGY2NzczNmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmQ1NzJkNmUyMmQyMzk5Y2EzYWQxMjE3NTY3ZmY5MGZjYzFkM2NlZTFiYTJm
|
14
|
+
MDc4YjZlOGVhOWIzM2UwMDJjZDlhZTA3ZWM0M2EzOTA4OWFhZWFjMDg3NWMy
|
15
|
+
MTFhNGJkZmY0ZjhkMjIxYzJlNTI0YjI0NjJhMWUzODE0OGNlYWU=
|
data/.idea/acceptance_test.iml
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
</facet>
|
11
11
|
</component>
|
12
12
|
<component name="ModuleRunConfigurationManager">
|
13
|
-
<configuration default="false" name="
|
13
|
+
<configuration default="false" name="google_search_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
14
14
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
15
15
|
<module name="acceptance_test" />
|
16
16
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/features/google_search_spec.rb" />
|
34
34
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
35
35
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
36
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="
|
36
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
37
37
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
38
38
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
39
39
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -41,13 +41,11 @@
|
|
41
41
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
42
42
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
43
43
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
44
|
-
<RunnerSettings RunnerId="RubyDebugRunner" />
|
45
44
|
<RunnerSettings RunnerId="RubyRunner" />
|
46
|
-
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
47
45
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
48
46
|
<method />
|
49
47
|
</configuration>
|
50
|
-
<configuration default="false" name="Google Search" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
48
|
+
<configuration default="false" name="Google Search uses webkit driver" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
51
49
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
52
50
|
<module name="acceptance_test" />
|
53
51
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -70,7 +68,7 @@
|
|
70
68
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/features/google_search_spec.rb" />
|
71
69
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
72
70
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
73
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Google Search" />
|
71
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Google Search uses webkit driver" />
|
74
72
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
75
73
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
76
74
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
@@ -82,7 +80,7 @@
|
|
82
80
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
83
81
|
<method />
|
84
82
|
</configuration>
|
85
|
-
<configuration default="false" name="
|
83
|
+
<configuration default="false" name="Google Search uses selenium driver" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
86
84
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
87
85
|
<module name="acceptance_test" />
|
88
86
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -105,7 +103,75 @@
|
|
105
103
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/features/google_search_spec.rb" />
|
106
104
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
107
105
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
108
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
106
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Google Search uses selenium driver" />
|
107
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
108
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
109
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
110
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
111
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
112
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
113
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
114
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
115
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
116
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
117
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
118
|
+
<method />
|
119
|
+
</configuration>
|
120
|
+
<configuration default="false" name="acceptance_test: acceptance_test" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
121
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
122
|
+
<module name="acceptance_test" />
|
123
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
124
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$/lib/acceptance_test" />
|
125
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
126
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
127
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
128
|
+
<envs>
|
129
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
130
|
+
</envs>
|
131
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
132
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
133
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
134
|
+
<COVERAGE_PATTERN ENABLED="true">
|
135
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
136
|
+
</COVERAGE_PATTERN>
|
137
|
+
</EXTENSION>
|
138
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
139
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
140
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/acceptance_test/acceptance_test.rb" />
|
141
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
142
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
143
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
144
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
145
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
146
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
147
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
148
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
149
|
+
<method />
|
150
|
+
</configuration>
|
151
|
+
<configuration default="false" name="Google Search: acceptance_test" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
152
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
153
|
+
<module name="acceptance_test" />
|
154
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
155
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
156
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
157
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
158
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
159
|
+
<envs>
|
160
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
161
|
+
</envs>
|
162
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
163
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
164
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
165
|
+
<COVERAGE_PATTERN ENABLED="true">
|
166
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
167
|
+
</COVERAGE_PATTERN>
|
168
|
+
</EXTENSION>
|
169
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
170
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
171
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/features/with_selenium_conf_spec.rb" />
|
172
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
173
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
174
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="Google Search" />
|
109
175
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
110
176
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
111
177
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
data/CHANGES
CHANGED
@@ -25,7 +25,7 @@ class AcceptanceTest
|
|
25
25
|
|
26
26
|
select_driver driver
|
27
27
|
|
28
|
-
if driver
|
28
|
+
if selenium_driver?(driver) and selenium_config_exist?
|
29
29
|
puts "\nSelenium Configuration: #{@selenium_config[:name]}"
|
30
30
|
puts "Environment: #{@selenium_config[:env]}"
|
31
31
|
puts "Application: #{@selenium_config[:webapp_url]}"
|
@@ -64,7 +64,7 @@ class AcceptanceTest
|
|
64
64
|
|
65
65
|
def set_defaults
|
66
66
|
ENV['APP_HOST'] ||= app_host
|
67
|
-
ENV['WAIT_TIME'] ||=
|
67
|
+
ENV['WAIT_TIME'] ||= Capybara.default_wait_time.to_s
|
68
68
|
end
|
69
69
|
|
70
70
|
def configure
|
@@ -158,23 +158,24 @@ class AcceptanceTest
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def select_driver driver
|
161
|
-
if
|
162
|
-
|
163
|
-
elsif [:webkit, :poltergeist].include? driver
|
164
|
-
Capybara.current_driver = driver
|
165
|
-
Capybara.javascript_driver = driver
|
166
|
-
elsif [:selenium, :selenium, :selenium_with_firebug, :selenium_chrome].include? driver
|
167
|
-
if selenium_config_exist?
|
161
|
+
if selenium_driver?(driver)
|
162
|
+
if driver == :selenium_remote
|
168
163
|
setup_driver_from_config driver
|
169
164
|
else
|
165
|
+
if selenium_config_exist?
|
166
|
+
setup_driver_from_config driver
|
167
|
+
else
|
168
|
+
if Capybara.drivers[driver]
|
169
|
+
Capybara.current_driver = driver
|
170
|
+
Capybara.javascript_driver = driver
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else
|
175
|
+
if Capybara.drivers[driver]
|
170
176
|
Capybara.current_driver = driver
|
171
177
|
Capybara.javascript_driver = driver
|
172
178
|
end
|
173
|
-
|
174
|
-
elsif [:selenium_remote].include? driver
|
175
|
-
setup_driver_from_config driver
|
176
|
-
else
|
177
|
-
Capybara.current_driver = Capybara.default_driver
|
178
179
|
end
|
179
180
|
end
|
180
181
|
|
@@ -231,5 +232,9 @@ class AcceptanceTest
|
|
231
232
|
Capybara.current_driver = driver
|
232
233
|
Capybara.javascript_driver = driver
|
233
234
|
end
|
235
|
+
|
236
|
+
def selenium_driver? driver
|
237
|
+
driver.to_s =~ /selenium/
|
238
|
+
end
|
234
239
|
end
|
235
240
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/features_spec_helper')
|
2
2
|
|
3
|
+
Capybara.default_wait_time = 5
|
4
|
+
|
3
5
|
describe 'Google Search' do
|
4
6
|
include_context "AcceptanceTest"
|
5
7
|
|
@@ -9,6 +11,7 @@ describe 'Google Search' do
|
|
9
11
|
|
10
12
|
before do
|
11
13
|
puts "Using driver: #{Capybara.current_driver}."
|
14
|
+
puts "Default wait time: #{Capybara.default_wait_time}."
|
12
15
|
end
|
13
16
|
|
14
17
|
it "uses selenium driver", driver: :selenium, exclude: false do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acceptance_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gemspec_deps_gen
|