diff options
Diffstat (limited to 'spec/features/dashboard/active_tab_spec.rb')
-rw-r--r-- | spec/features/dashboard/active_tab_spec.rb | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb index f4d0f82d248..8bab501134b 100644 --- a/spec/features/dashboard/active_tab_spec.rb +++ b/spec/features/dashboard/active_tab_spec.rb @@ -7,38 +7,32 @@ RSpec.describe 'Dashboard Active Tab', :js do shared_examples 'page has active tab' do |title| it "#{title} tab" do - subject - expect(page).to have_selector('.navbar-sub-nav li.active', count: 1) expect(find('.navbar-sub-nav li.active')).to have_content(title) end end context 'on dashboard projects' do - it_behaves_like 'page has active tab', 'Projects' do - subject { visit dashboard_projects_path } + before do + visit dashboard_projects_path end + + it_behaves_like 'page has active tab', 'Projects' end context 'on dashboard groups' do - it_behaves_like 'page has active tab', 'Groups' do - subject { visit dashboard_groups_path } + before do + visit dashboard_groups_path end + + it_behaves_like 'page has active tab', 'Groups' end context 'on activity projects' do - it_behaves_like 'page has active tab', 'Activity' do - subject { visit activity_dashboard_path } + before do + visit activity_dashboard_path end - end - context 'on instance statistics' do - subject { visit instance_statistics_root_path } - - it 'shows Instance Statistics` as active' do - subject - - expect(find('.navbar-sub-nav li.active')).to have_link('Instance Statistics') - end + it_behaves_like 'page has active tab', 'Activity' end end |