Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-10-13 00:38:52 +0300
committerClement Ho <clemmakesapps@gmail.com>2017-10-13 00:38:52 +0300
commit88bd5fa274d0b9d9ccd8be26f83d422517880fe3 (patch)
treebf87f53b4d689cdb1c9c6e700cdea9771d452e61 /doc/development/testing_guide
parent77d636cc164eebeb119943f62b7ca1b837f878a8 (diff)
Update best_practices.md
Diffstat (limited to 'doc/development/testing_guide')
-rw-r--r--doc/development/testing_guide/best_practices.md17
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md
index b3ce2133161..386fe2a35eb 100644
--- a/doc/development/testing_guide/best_practices.md
+++ b/doc/development/testing_guide/best_practices.md
@@ -267,15 +267,20 @@ RSpec.configure do |config|
end
```
-### Debugging
+### Debugging Capybara
-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.
+Sometimes you may need to debug Capybara tests by observing browser behavior.
-Default user password is `12345678`.
+You can stall capybara and view the website on the browser by adding a long sleep command in your spec and then opening your browser
+to the capybara url.
-```
+You can get the capybara url by doing `puts current_url`.
+You can also get the user's email by doing `puts user.email`.
+
+The default password for the user is `12345678`.
+
+Example:
+```ruby
puts current_url
puts user.email
sleep(200)