gitlab-org--gitlab-foss/features/steps/shared/active_tab.rb
Dmitriy Zaporozhets ba7b4630a2
Replace home icon with tab names
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 10:39:35 +03:00

27 lines
802 B
Ruby

module SharedActiveTab
include Spinach::DSL
def ensure_active_main_tab(content)
page.find('.main-nav li.active').should have_content(content)
end
def ensure_active_sub_tab(content)
page.find('div.content ul.nav-tabs li.active').should have_content(content)
end
def ensure_active_sub_nav(content)
page.find('div.content ul.nav-stacked-menu li.active').should have_content(content)
end
And 'no other main tabs should be active' do
page.should have_selector('.main-nav li.active', count: 1)
end
And 'no other sub tabs should be active' do
page.should have_selector('div.content ul.nav-tabs li.active', count: 1)
end
And 'no other sub navs should be active' do
page.should have_selector('div.content ul.nav-stacked-menu li.active', count: 1)
end
end