diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-09-18 21:05:34 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-09-18 21:05:34 +0300 |
commit | 27a28d9970c28142aa4482b6f474b79ccaec2bec (patch) | |
tree | 715cd65e1e7847bf91d525c800435de96f255ef6 /spec/features/profiles | |
parent | 4c0beb6c024b25ff24c7c2ea966bacab0ee860d5 (diff) | |
parent | 9b13753302df7a3e8ef86c6af3f84066bde31a21 (diff) |
Merge branch 'master' into sh-headless-chrome-support
* master: (97 commits)
Eliminate N+1 queries in loading discussions.json endpoint
Clean up read_registry scope changes
Add missing import statements
Improve “New project“ page description
Fix notification message when admin label was modified
Remove gaps under nav on build page
Replace the 'project/snippets.feature' spinach test with an rspec analog
Use correct group members path for members flyout link
Fix docs for lightweight tag creation via API
Replace the 'project/commits/revert.feature' spinach test with an rspec analog
Merge branch 'rs-incoming-email-domain-docs' into 'security-10-0'
Replace the 'project/archived.feature' spinach test with an rspec analog
Fix broken link in docs/api/wiki.md
Fixed the new sidebars width when browser has scrollbars
Improve 'spec/features/profiles/*' specs
Replace the 'search.feature' spinach test with an rspec analog
dedupe yarn packages
add dependency approvals (all MIT license)
update build image to latest with node 8.x, yarn 1.0.2, and chrome 61
Ensure we use `Entities::User` for non-admin `users/:id` API requests
...
Diffstat (limited to 'spec/features/profiles')
7 files changed, 33 insertions, 38 deletions
diff --git a/spec/features/profiles/user_visits_profile_account_page_spec.rb b/spec/features/profiles/user_visits_profile_account_page_spec.rb index 8c7233c77ad..a8c08a680d7 100644 --- a/spec/features/profiles/user_visits_profile_account_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_account_page_spec.rb @@ -10,7 +10,6 @@ describe 'User visits the profile account page' do end it 'shows correct menu item' do - expect(find('.sidebar-top-level-items > li.active')).to have_content('Account') - expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1) + expect(page).to have_active_navigation('Account') end end diff --git a/spec/features/profiles/user_visits_profile_authentication_log_page_spec.rb b/spec/features/profiles/user_visits_profile_authentication_log_page_spec.rb deleted file mode 100644 index ffb504cc573..00000000000 --- a/spec/features/profiles/user_visits_profile_authentication_log_page_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'spec_helper' - -describe 'User visits the authentication log page' do - let(:user) { create(:user) } - - before do - sign_in(user) - - visit(audit_log_profile_path) - end - - it 'shows correct menu item' do - expect(find('.sidebar-top-level-items > li.active')).to have_content('Authentication log') - expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1) - end -end diff --git a/spec/features/profiles/user_visits_profile_authentication_log_spec.rb b/spec/features/profiles/user_visits_profile_authentication_log_spec.rb new file mode 100644 index 00000000000..a50ebb29e01 --- /dev/null +++ b/spec/features/profiles/user_visits_profile_authentication_log_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'User visits the authentication log' do + let(:user) { create(:user) } + + before do + sign_in(user) + + visit(audit_log_profile_path) + end + + it 'shows correct menu item' do + expect(page).to have_active_navigation('Authentication log') + end +end diff --git a/spec/features/profiles/user_visits_profile_page_spec.rb b/spec/features/profiles/user_visits_profile_page_spec.rb deleted file mode 100644 index 3bf6d718bc7..00000000000 --- a/spec/features/profiles/user_visits_profile_page_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'spec_helper' - -describe 'User visits the profile page' do - let(:user) { create(:user) } - - before do - sign_in(user) - - visit(profile_path) - end - - it 'shows correct menu item' do - expect(find('.sidebar-top-level-items > li.active')).to have_content('Profile') - expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1) - end -end diff --git a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb index fbc18d30e32..90d6841af0e 100644 --- a/spec/features/profiles/user_visits_profile_preferences_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_preferences_page_spec.rb @@ -10,8 +10,7 @@ describe 'User visits the profile preferences page' do end it 'shows correct menu item' do - expect(find('.sidebar-top-level-items > li.active')).to have_content('Preferences') - expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1) + expect(page).to have_active_navigation('Preferences') end describe 'User changes their syntax highlighting theme', :js do diff --git a/spec/features/profiles/user_visits_profile_spec.rb b/spec/features/profiles/user_visits_profile_spec.rb new file mode 100644 index 00000000000..6601d3039ed --- /dev/null +++ b/spec/features/profiles/user_visits_profile_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'User visits their profile' do + let(:user) { create(:user) } + + before do + sign_in(user) + + visit(profile_path) + end + + it 'shows correct menu item' do + expect(page).to have_active_navigation('Profile') + end +end diff --git a/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb b/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb index 0b7a63b54b4..685bf44619d 100644 --- a/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb +++ b/spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb @@ -10,7 +10,6 @@ describe 'User visits the profile SSH keys page' do end it 'shows correct menu item' do - expect(find('.sidebar-top-level-items > li.active')).to have_content('SSH Keys') - expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1) + expect(page).to have_active_navigation('SSH Keys') end end |