Sha256: b17cb6d4c440b074101955fd350285e7f40198e8024428a07e180763b4a946cb

Contents?: true

Size: 511 Bytes

Versions: 19

Compression:

Stored size: 511 Bytes

Contents

module Screengem
  #
  # Base class for all screen elements.
  #
  # Calling visit does nothing when currently navigated to the target.
  #
  class ScreenElement
    include Capybara::DSL
    include Screengem::RailsRoutes

    def visit(visit_uri = visit_path)
      return if visit_uri == page.current_path

      page.visit(visit_uri)
    end

    #
    # Subclasses override the visit_path method to participate in auto visit.
    # See Screengem::AutomaticVisit.
    #
    def visit_path
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
screengem-0.20.1 lib/screengem/screen_element.rb
screengem-0.20.0 lib/screengem/screen_element.rb
screengem-0.19.0 lib/screengem/screen_element.rb
screengem-0.18.1 lib/screengem/screen_element.rb
screengem-0.18.0 lib/screengem/screen_element.rb
screengem-0.17.0 lib/screengem/screen_element.rb
screengem-0.16.0 lib/screengem/screen_element.rb
screengem-0.15.0 lib/screengem/screen_element.rb
screengem-0.14.0 lib/screengem/screen_element.rb
screengem-0.13.0 lib/screengem/screen_element.rb
screengem-0.12.0 lib/screengem/screen_element.rb
screengem-0.11.0 lib/screengem/screen_element.rb
screengem-0.10.1 lib/screengem/screen_element.rb
screengem-0.10.0 lib/screengem/screen_element.rb
screengem-0.9.1 lib/screengem/screen_element.rb
screengem-0.9.0 lib/screengem/screen_element.rb
screengem-0.8.1 lib/screengem/screen_element.rb
screengem-0.8.0 lib/screengem/screen_element.rb
screengem-0.7.3 lib/screengem/screen_element.rb