Commit 9d45a16112a66466d8c008dbb3cc02d0949d3106

Authored by Leandro Santos
2 parents 964c92d6 8ff27f82
Exists in staging

Merge branch 'master' into pre-staging

.travis.yml
... ... @@ -23,6 +23,9 @@ addons:
23 23 - libreadline-dev
24 24 - libsqlite3-dev
25 25 - libxslt1-dev
  26 + artifacts:
  27 + paths:
  28 + - $(ls tmp/artifact* | tr "\n" ":")
26 29  
27 30 git:
28 31 submodules: false
... ...
features/support/snapshot.rb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +
  2 +After do |scenario|
  3 + if scenario.failed?
  4 + if ENV['TRAVIS']
  5 + build = ENV['TRAVIS_BUILD_NUMBER']
  6 + page.driver.save_screenshot "./tmp/artifact-travis-#{build}-#{scenario.name.parameterize}.png"
  7 + end
  8 + end
  9 +end
... ...
lib/tasks/ci.rake
... ... @@ -57,7 +57,8 @@ namespace :ci do
57 57  
58 58 sh 'ruby', '-Itest', *tests unless tests.empty?
59 59 sh 'cucumber', *features unless features.empty?
60   - sh 'xvfb-run', '-a', 'cucumber', '-p', 'selenium', *features unless features.empty?
  60 + sh 'xvfb-run', '-a', '--server-args="-screen 0, 1280x1024x24"',
  61 + 'cucumber', '-p', 'selenium', *features unless features.empty?
61 62  
62 63 changed_plugins.each do |plugin|
63 64 if $broken_plugins.include?(plugin)
... ...
lib/tasks/selenium.rake
1 1 desc 'Runs Seleniun acceptance tests'
2 2 task :selenium do
3 3 puts "Firefox version = #{`firefox --version`}"
4   - sh "xvfb-run -a cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
  4 + sh "xvfb-run -a --server-args=\"-screen 0, 1280x1024x24\" cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
5 5 end
... ...
test/functional/mailconf_controller_test.rb
... ... @@ -71,8 +71,10 @@ class MailconfControllerTest < ActionController::TestCase
71 71 env = Environment.default
72 72 env.force_www = true
73 73 env.save!
  74 + env.domains.delete_all
  75 + env.domains.create! name: 'example.com'
74 76 get :index, :profile => 'ze'
75   - assert_tag :tag => 'li', :content => /ze@colivre.net/
  77 + assert_tag :tag => 'li', :content => /ze@example.com/
76 78 end
77 79  
78 80 should 'not display www in email address when force_www=false' do
... ... @@ -80,8 +82,10 @@ class MailconfControllerTest < ActionController::TestCase
80 82 env = Environment.default
81 83 env.force_www = false
82 84 env.save!
  85 + env.domains.delete_all
  86 + env.domains.create! name: 'example.com'
83 87 get :index, :profile => 'ze'
84   - assert_tag :tag => 'li', :content => /ze@colivre.net/
  88 + assert_tag :tag => 'li', :content => /ze@example.com/
85 89 end
86 90  
87 91 should 'create task to environment admin when enable email' do
... ...