Project

General

Profile

Download (440 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman-docker / test / test_plugin_helper.rb @ ef3feba4

1
# This calls the main test_helper in Foreman-core
2
require 'test_helper'
3

    
4
def assert_row_button(index_path, link_text, button_text, dropdown = false)
5
  visit index_path
6
  within(:xpath, "//tr[contains(.,'#{link_text}')]") do
7
    find("i.caret").click if dropdown
8
    click_link(button_text)
9
  end
10
end
11

    
12
# Add plugin to FactoryGirl's paths
13
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
14
FactoryGirl.reload