1. 21 2月, 2017 9 次提交
    • E
      Cleanup Rails provided helpers · 3f414c22
      eileencodes 提交于
      1. Clean up screenshot helper
      
      Updates documentation to be clearer and separates the concerns of saving
      the image, setting the image path, and displaying the image.
      
      2. Remove Rails provided assertions for selectors
      
      This was moved upstream to Capybara and is no longer necessary to be
      included in Rails
      
      3. Remove form helper
      
      The form helper is pretty specific to Basecamp's needs and may not be
      helpful outside of Rails.
      3f414c22
    • E
      Remove teardown code · 970ece24
      eileencodes 提交于
      Since I've moved the teardown code that contains the screenshot handling
      to be generated when the application is generated this code was
      interfering with the screenshot taking.
      
      Because this runs before any app teardown code we would be resetting
      sessions before taking the screenshot, resulting in a blank browser
      window. The code to reset the sessions must come AFTER a screenshot has
      been taken.
      970ece24
    • E
      4f98b633
    • E
      Set Webrick logger for system testing · 7ebd072d
      eileencodes 提交于
      If this is not set Webrick will log **everything** to STDOUT and
      distract from the running tests. This will instead log to the log file.
      This example was extracted from the Capybara source code.
      7ebd072d
    • E
      Rename call to run · 47491dda
      eileencodes 提交于
      Call doesn't make as much sense here, we're really starting to run the
      driver.
      47491dda
    • E
      Amend documentation · 4540cebf
      eileencodes 提交于
      Many changes have been made since the beginning so documentation needed
      a refresher.
      4540cebf
    • E
      Refactor config settings to use generated file · 84f82f0a
      eileencodes 提交于
      Originally I had set up system testing to have one configuration option
      to be set in the test environment. After thinking it over I think a
      generated class on app creation would be best. The reason for this is
      Capybara has a ton of configuration options that I'm sure some folks
      want to use.
      
      Thinking about how we handle screenshots, database transactions, and a
      whole bunch of other settings it would be better for users to be able to
      turn all of that on and off.
      
      When an app or scaffold is generated a `test/system_test_helper.rb` test
      helper will be generated as well. This will contain the class for tests
      to inherit from `ActionSystemTestCase` which will inherit from
      `ActionSystemTest::Base`. Here is where users can change the test
      driver, remove the screenshot helper, and add their additional Capybara
      configuration.
      84f82f0a
    • E
      Don't load ActionSystemTest in production · 1db7a5c2
      eileencodes 提交于
      By moving to the TestUnit Railtie, and doing the file requirement
      inside the onload call we can avoid loading ActionSystemTest in
      production and load it in the test env.
      
      This is important for performance reasons - loading up unnecessary files
      and object is expensive, especially when they should never be used in
      production.
      1db7a5c2
    • E
      Turn system testing into it's own gem and rename · 5bf0aa67
      eileencodes 提交于
      Renames `Rails::SystemTestCase` to `ActionSystemTest` and moves it to a
      gem under the Rails name.
      
      We need to name the class `ActionSystemTestCase` because the gem expects
      a module but tests themselves expect a class.
      
      Adds MIT-LICENSE, CHANGELOG, and README for the future.
      5bf0aa67