summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-10-12 21:29:32 +0000
committerFatih Acet <acetfatih@gmail.com>2017-10-12 21:29:32 +0000
commit77d636cc164eebeb119943f62b7ca1b837f878a8 (patch)
tree5ecb662652385817a528f811d81250535020c7c0
parent34fd07f64b4fc10196e461d2e65c6af52bb47015 (diff)
downloadgitlab-ce-77d636cc164eebeb119943f62b7ca1b837f878a8.tar.gz
Add debugging section to testing_guide/best_practices.md.
-rw-r--r--doc/development/testing_guide/best_practices.md14
1 files changed, 14 insertions, 0 deletions
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)