Project

General

Profile

« Previous | Next » 

Revision e0c9ad0a

Added by Shimon Shtein over 8 years ago

Fixes #12793 - reverted field filtration to enabled fields only

(cherry picked from commit 77b36c947ac954393dd2e7a09abfcaf4bc959bc9)

View differences:

test/integration/hostgroup_test.rb
click_link 'Parameters'
assert page.has_no_selector?('#params tr.has-error')
end
describe 'JS enabled tests' do
setup do
@old_driver = Capybara.current_driver
Capybara.current_driver = Capybara.javascript_driver
login_admin
end
teardown do
Capybara.current_driver = @old_driver
end
test 'submit updates taxonomy' do
group = FactoryGirl.create(:hostgroup, :with_puppetclass)
new_location = FactoryGirl.create(:location)
visit edit_hostgroup_path(group)
page.find(:css, "a[href='#locations']").click()
select_from_list 'hostgroup_location_ids', new_location
click_button "Submit"
#wait for submit to finish
page.find('#search-form')
group.locations.reload
assert_not_nil group.locations.first{ |l| l.name == new_location.name }
end
end
private
def select_from_list(list_id, item)
span = page.all(:css, "#ms-#{list_id} .ms-selectable ul li span").first{ |i| i.text == item.name }
span.click
end
end

Also available in: Unified diff