1. 09 3月, 2017 1 次提交
    • E
      Refactor system test driver/browser · 4dbebe48
      eileencodes 提交于
      Since using a browser is only for selenium it doesn't really make sense
      to have a separate class for handling it there. This brings a lot of the
      if/else out of the main SystemTestCase class and into the Driver class
      so we can abstract away all that extra work.
      4dbebe48
  2. 04 3月, 2017 1 次提交
    • Y
      Do not take screenshot if driver does not support screenshot · 2ee4058c
      yuuji.yaginuma 提交于
      `Capybara::RackTest::Driver` does not support taking screenshots. If call
      `#save_screenshot` on `Capybara::RackTest::Driver` will raise the error.
      
      ```ruby
      Error:
      UsersTest#test_visiting_the_index:
      Capybara::NotSupportedByDriverError: Capybara::Driver::Base#save_screenshot
      ```
      
      To prevent errors, if driver does not support screenshot, do not call it.
      2ee4058c
  3. 25 2月, 2017 1 次提交
  4. 23 2月, 2017 1 次提交
  5. 21 2月, 2017 3 次提交
    • E
      Fix default host in setup, move teardown to helper file · 161cf89e
      eileencodes 提交于
      * Override integration test default host
      
      Integration tests automatically set the default host to
      'http://example.com'. This works fine for integration tests because they
      are not real browser sessions, but doesn't work fine for system tests
      because they are real browser sessions.
      
      We can override this by setting the `host!` in `before_setup. The
      `Capybara.always_include_port` will allow the test to look at
      `127.0.0.1:port capybara picks` and properly redirect the test.
      
      Any application can override this by setting the `host!` in
      their system test helper. Generally though, applications are going to be
      using localhost.
      
      In this commit I also moved the setup and teardown into their own module
      for tidiness.
      
      * Move teardown settings into system test case
      
      These configuration options can be put into the system test case file
      instead of the generated system tests helper file. This is an
      implementation detail and therefore shouldn't be generated with the
      template.
      161cf89e
    • E
      Fix screenshot helper to provide correct file name · 983275eb
      eileencodes 提交于
      We only want the file name to include the word `failures` if it failed,
      not any time the user wants to take a screenshot during a test run.
      983275eb
    • E
      Move and rename system tests · 1a0ca84a
      eileencodes 提交于
      * Move system tests back into Action Pack
      * Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase`
      * Remove private base module and only make file for public
      `SystemTestCase` class, name private module `SystemTesting`
      * Rename `ActionSystemTestCase` to `ApplicationSystemTestCase`
      * Update corresponding documentation and guides
      * Delete old `ActionSystemTest` files
      1a0ca84a