Skip to content

automatically take screenshots when integration specs fail

Vincent Agnano requested to merge refactor/spec-failures-screenshots into master

Created by: adipasquale

linked to https://trello.com/c/yibIcLXq/601-fix-randomly-failing-feature-specs

this PR makes integration specs take a screenshot (HTML + png) upon each failure.

Locally:

Screenshot 2020-04-14 at 15 59 50

On CircleCI :

Screenshot 2020-04-14 at 15 54 59

cf https://github.com/mattheworiordan/capybara-screenshot/ and https://github.com/mattheworiordan/capybara-screenshot/issues/211#issuecomment-321857907 and https://circleci.com/docs/2.0/artifacts/

I also fixed the store_test_results directive that was pointing to the wrong directory. It lets us see a formatted view of failing tests on CircleCI:

Screenshot 2020-04-14 at 15 56 18

Merge request reports