Revision 384c8080
Added by Sebastian Gräßl over 7 years ago
test/integration/host_js_test.rb | ||
---|---|---|
end
|
||
end
|
||
|
||
describe 'Puppet Classes tab' do
|
||
context 'has inherited Puppetclasses' do
|
||
setup do
|
||
@hostgroup = FactoryGirl.create(:hostgroup, :with_puppetclass)
|
||
@host = FactoryGirl.create(:host, hostgroup: @hostgroup, environment: @hostgroup.environment)
|
||
|
||
visit edit_host_path(@host)
|
||
page.find(:link, 'Puppet Classes', href: '#puppet_klasses').click
|
||
end
|
||
|
||
test 'it mentions the hostgroup by name in the tooltip' do
|
||
page.find('#puppet_klasses .panel h3 a').click
|
||
class_element = page.find('#inherited_ids>li')
|
||
|
||
assert_equal @hostgroup.puppetclasses.first.name, class_element.text
|
||
end
|
||
|
||
test 'it shows a header mentioning the hostgroup inherited from' do
|
||
header_element = page.find('#puppet_klasses .panel h3 a')
|
||
|
||
assert header_element.text =~ /#{@hostgroup.name}$/
|
||
end
|
||
end
|
||
end
|
||
|
||
private
|
||
|
||
def subnet_and_domain_are_selected(modal, domain)
|
Also available in: Unified diff
Fixes #14714 - Make inherited Puppet Classes more apparent
To better recognize which Puppet Classes are inherited for Host
or Hostgroup they are under a sub-heading as a seperated list.