Skip to content

Commit

Permalink
Set resolution for xvfb-run
Browse files Browse the repository at this point in the history
This avoid unexpected failures with different environments defaults
  • Loading branch information
brauliobo committed Mar 12, 2016
1 parent b03d4c3 commit 85f6dcc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/tasks/ci.rake
Expand Up @@ -57,7 +57,8 @@ namespace :ci do

sh 'ruby', '-Itest', *tests unless tests.empty?
sh 'cucumber', *features unless features.empty?
sh 'xvfb-run', '-a', 'cucumber', '-p', 'selenium', *features unless features.empty?
sh 'xvfb-run', '-a', '--server-args="-screen 0, 1280x1024x24"',
'cucumber', '-p', 'selenium', *features unless features.empty?

changed_plugins.each do |plugin|
if $broken_plugins.include?(plugin)
Expand Down
3 changes: 2 additions & 1 deletion lib/tasks/plugins_tests.rake
Expand Up @@ -116,7 +116,8 @@ def run_minitest files
end

def run_cucumber(profile, files)
sh 'xvfb-run', '-a', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
sh 'xvfb-run', '-a', '--server-args="-screen 0, 1280x1024x24"',
'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
end

def custom_run(name, files, run=:all)
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/selenium.rake
@@ -1,5 +1,5 @@
desc 'Runs Seleniun acceptance tests'
task :selenium do
puts "Firefox version = #{`firefox --version`}"
sh "xvfb-run -a cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
sh "xvfb-run -a --server-args=\"-screen 0, 1280x1024x24\" cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
end

0 comments on commit 85f6dcc

Please sign in to comment.