diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-08-01 15:17:47 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-08-01 15:17:47 +0000 |
commit | ea6fc714bb0306ac8ca56b5dafe4b6777aafe5fc (patch) | |
tree | 5d9673f0e526acbdb3285147024064f89d45dc23 /spec/features/dashboard/active_tab_spec.rb | |
parent | 47244ad5ea4e887ecb6dffa9f7b96846adbf4b6f (diff) | |
parent | 29dd1c14db6899c3858ca906e076c7b7fbbaa0e2 (diff) | |
download | gitlab-ce-ea6fc714bb0306ac8ca56b5dafe4b6777aafe5fc.tar.gz |
Merge branch '41416-making-instance-wide-data-tools-more-accessible' into 'master'
Resolve "Making instance-wide data tools more accessible"
Closes #41416 and #48507
See merge request gitlab-org/gitlab-ce!20874
Diffstat (limited to 'spec/features/dashboard/active_tab_spec.rb')
-rw-r--r-- | spec/features/dashboard/active_tab_spec.rb | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb index 8bab501134b..f4d0f82d248 100644 --- a/spec/features/dashboard/active_tab_spec.rb +++ b/spec/features/dashboard/active_tab_spec.rb @@ -7,32 +7,38 @@ 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 - before do - visit dashboard_projects_path + it_behaves_like 'page has active tab', 'Projects' do + subject { visit dashboard_projects_path } end - - it_behaves_like 'page has active tab', 'Projects' end context 'on dashboard groups' do - before do - visit dashboard_groups_path + it_behaves_like 'page has active tab', 'Groups' do + subject { visit dashboard_groups_path } end - - it_behaves_like 'page has active tab', 'Groups' end context 'on activity projects' do - before do - visit activity_dashboard_path + it_behaves_like 'page has active tab', 'Activity' do + subject { visit activity_dashboard_path } end + end - it_behaves_like 'page has active tab', 'Activity' + 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 end end |