diff options
author | eileencodes <eileencodes@gmail.com> | 2017-02-20 16:08:20 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2017-02-20 16:08:20 -0500 |
commit | 42a6dbdf8480b96c4a0ac6e1dab215ae9dd77d1d (patch) | |
tree | 8a7c5f7aadf430ffa8b7d2118e23d8e297df1b7d /guides | |
parent | 2d61c5d846f8dd3a02080fedce7ab63b8d314db6 (diff) | |
download | rails-42a6dbdf8480b96c4a0ac6e1dab215ae9dd77d1d.tar.gz rails-42a6dbdf8480b96c4a0ac6e1dab215ae9dd77d1d.tar.bz2 rails-42a6dbdf8480b96c4a0ac6e1dab215ae9dd77d1d.zip |
Clean up documentation
There were some grammar issues and incorrect information in the system
tests documentation.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/testing.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/testing.md b/guides/source/testing.md index fe0dbf6c50..c7897a42a1 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -628,8 +628,8 @@ end ``` By default, system tests are run with the Selenium driver, using the Chrome -browser, on port 21800 with Puma, and a screen size of 1400x1400. The next -section explains how to change the default settings. +browser, and a screen size of 1400x1400. The next section explains how to +change the default settings. ### Changing the default settings @@ -654,7 +654,7 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase end ``` -If you want to keep the Selenium driver but change the browser or port you +If you want to keep the Selenium driver but change the browser you can pass Firefox and the port to driven by. The driver is a required argument, all other arguments are optional. @@ -662,7 +662,7 @@ argument, all other arguments are optional. require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :firefox, on: 3000 + driven_by :selenium, using: :firefox end ``` @@ -680,13 +680,13 @@ for additional settings. ### Screenshot Helper -The `ScreenshotHelper` is a helper designed to capture screenshots of your test. +The `ScreenshotHelper` is a helper designed to capture screenshots of your tests. This can be helpful for viewing the browser at the point a test failed, or to view screenshots later for debugging. Two methods are provided: `take_screenshot` and `take_failed_screenshot`. -`take_failed_screenshot` is automatically included in the `application_system_test_case.rb` -file and will take a screenshot only if the test fails. +`take_failed_screenshot` is automatically included in `after_teardown` inside +Rails. The `take_screenshot` helper method can be included anywhere in your tests to take a screenshot of the browser. |