From 77d636cc164eebeb119943f62b7ca1b837f878a8 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Thu, 12 Oct 2017 21:29:32 +0000 Subject: [PATCH] Add debugging section to testing_guide/best_practices.md. --- doc/development/testing_guide/best_practices.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 613423dbd9a..b3ce2133161 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -267,6 +267,20 @@ RSpec.configure do |config| end ``` +### Debugging + +If you need to debug Capybara tests, using the following lines, +you can get the current URL of Capybara server, logged in user email. Then you +can add some arbitrary sleep to halt the test and go check out the page. + +Default user password is `12345678`. + +``` +puts current_url +puts user.email +sleep(200) +``` + --- [Return to Testing documentation](index.md) -- GitLab