Class: Percy::Capybara::Loaders::NativeLoader
- Inherits:
-
BaseLoader
- Object
- BaseLoader
- Percy::Capybara::Loaders::NativeLoader
- Defined in:
- lib/percy/capybara/loaders/native_loader.rb
Overview
Resource loader that uses the native Capybara browser interface to discover resources. This loader uses JavaScript to discover page resources, so specs must be tagged with “js: true” because the default Rack::Test driver does not support executing JavaScript.
Constant Summary collapse
- PATH_REGEX =
/\A\/[^\\s\"']*/
- DATA_URL_REGEX =
/\Adata:/
- LOCAL_HOSTNAMES =
[ 'localhost', '127.0.0.1', '0.0.0.0', ].freeze
Constants inherited from BaseLoader
Instance Attribute Summary
Attributes inherited from BaseLoader
Instance Method Summary collapse
Methods inherited from BaseLoader
Constructor Details
This class inherits a constructor from Percy::Capybara::Loaders::BaseLoader
Instance Method Details
#build_resources ⇒ Object
29 30 31 |
# File 'lib/percy/capybara/loaders/native_loader.rb', line 29 def build_resources [] end |
#snapshot_resources ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/percy/capybara/loaders/native_loader.rb', line 20 def snapshot_resources resources = [] resources << root_html_resource resources += _get_css_resources resources += _get_image_resources resources += iframes_resources resources end |