Sha256: 62724359c1f007491b7b322903650278c55a65356020b23f1d94b3ca70e79a67

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

module SideToCapybara

  class Minitest < Base
    def open
      "visit('#{target}')"
    end

    def double_click
      case selector_type
      when 'css'
        "find('#{selector}').double_click"
      when 'id'
        "find('##{selector}').double_click"
      end
    end

    def click
      case selector_type
      when 'css'
        "find('#{selector}').click"
      when 'id'
        "find('##{selector}').click"
      when 'linkText'
        "click_on('#{selector}')"
      end
    end

    def assert_text
      "assert_selector('#{selector}', text: '#{value}')"
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
side_to_capybara-0.1.0 lib/side_to_capybara/minitest.rb