From 0fbd948b8d43023338264a599ff7b60dbf248fcd Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Thu, 31 May 2018 14:03:46 +0000 Subject: Add link to hack for styling Capybara HTML dumps --- doc/development/testing_guide/best_practices.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index a76a5096b69..1a926a660f1 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -120,6 +120,10 @@ Add `screenshot_and_save_page` in a `:js` spec to screenshot what Capybara Add `screenshot_and_open_image` in a `:js` spec to screenshot what Capybara "sees", and automatically open the image. +The HTML dumps created by this are missing CSS. +This results in them looking very different from the actual application. +There is a [small hack](https://gitlab.com/gitlab-org/gitlab-ce/snippets/1718469) to add CSS which makes debugging easier. + ### Fast unit tests Some classes are well-isolated from Rails and you should be able to test them -- cgit v1.2.1