diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-09 15:09:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-09 15:09:42 +0300 |
commit | 1361891b0a87187364d1586395df176a8984e914 (patch) | |
tree | 4f47ddf2cd0d06cd0eb98a7bf1b7001504e6416b /spec/features | |
parent | 109562e64e1e1c51fe32a7443df86ee63b856115 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
4 files changed, 32 insertions, 14 deletions
diff --git a/spec/features/admin/users/user_spec.rb b/spec/features/admin/users/user_spec.rb index 46380218e91..e7dd50ed514 100644 --- a/spec/features/admin/users/user_spec.rb +++ b/spec/features/admin/users/user_spec.rb @@ -9,6 +9,7 @@ RSpec.describe 'Admin::Users::User' do before do sign_in(current_user) gitlab_enable_admin_mode_sign_in(current_user) + stub_feature_flags(vue_admin_users: false) end describe 'GET /admin/users/:id' do diff --git a/spec/features/admin/users/users_spec.rb b/spec/features/admin/users/users_spec.rb index afabdcf4fb7..9482b4f8603 100644 --- a/spec/features/admin/users/users_spec.rb +++ b/spec/features/admin/users/users_spec.rb @@ -15,6 +15,7 @@ RSpec.describe 'Admin::Users' do describe 'GET /admin/users' do before do + stub_feature_flags(vue_admin_users: false) visit admin_users_path end @@ -418,6 +419,7 @@ RSpec.describe 'Admin::Users' do describe 'GET /admin/users/:id/edit' do before do + stub_feature_flags(vue_admin_users: false) visit admin_users_path click_link "edit_user_#{user.id}" end diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index f341709b73d..239bc04a9cb 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -228,7 +228,7 @@ RSpec.describe 'User edit profile' do end def open_edit_status_modal - open_modal 'Edit status' + open_modal 'Edit status' end def set_user_status_in_modal @@ -291,6 +291,10 @@ RSpec.describe 'User edit profile' do toggle_busy_status set_user_status_in_modal + + wait_for_requests + visit root_path(user) + open_edit_status_modal expect(busy_status.checked?).to eq(true) @@ -368,26 +372,37 @@ RSpec.describe 'User edit profile' do expect(page).not_to have_selector '.cover-status' end - it 'clears the user status with the "Remove status" button' do - user_status = create(:user_status, user: user, message: 'Eating bread', emoji: 'stuffed_flatbread') + context 'Remove status button' do + before do + user.status = UserStatus.new(message: 'Eating bread', emoji: 'stuffed_flatbread') - visit_user - wait_for_requests + visit_user + wait_for_requests - within('.cover-status') do - expect(page).to have_emoji(user_status.emoji) - expect(page).to have_content user_status.message + open_edit_status_modal + + page.within "#set-user-status-modal" do + click_button 'Remove status' + end + + wait_for_requests end - open_edit_status_modal + it 'clears the user status with the "Remove status" button' do + visit_user - page.within "#set-user-status-modal" do - click_button 'Remove status' + expect(page).not_to have_selector '.cover-status' end - visit_user + it 'shows the "Set status" menu item in the user menu' do + visit root_path(user) - expect(page).not_to have_selector '.cover-status' + find('.header-user-dropdown-toggle').click + + page.within ".header-user" do + expect(page).to have_content('Set status') + end + end end it 'displays a default emoji if only message is entered' do diff --git a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb index 189aa45ff75..ca8e4fdac57 100644 --- a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb +++ b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb @@ -165,7 +165,7 @@ RSpec.describe 'Projects > Show > User sees setup shortcut buttons' do context 'when the project does not have a README' do it 'shows the single file editor "Add README" button' do - allow(project.repository).to receive(:readme).and_return(nil) + allow(project.repository).to receive(:readme_path).and_return(nil) visit project_path(project) |