Commit b03d4c32d31cddc2664940da69dd8e4ad2b73ab2

Authored by Braulio Bhavamitra
1 parent 5386b39f

travis: upload snapshots of failing selenium scenarios

Showing 2 changed files with 12 additions and 0 deletions   Show diff stats
@@ -24,6 +24,9 @@ addons: @@ -24,6 +24,9 @@ addons:
24 - libreadline-dev 24 - libreadline-dev
25 - libsqlite3-dev 25 - libsqlite3-dev
26 - libxslt1-dev 26 - libxslt1-dev
  27 + artifacts:
  28 + paths:
  29 + - $(ls tmp/artifact* | tr "\n" ":")
27 30
28 # workaround for https://github.com/travis-ci/travis-ci/issues/4536 31 # workaround for https://github.com/travis-ci/travis-ci/issues/4536
29 before_install: 32 before_install:
features/support/snapshot.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -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