diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-17 09:09:36 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-17 09:09:36 +0000 |
| commit | 839e879bcf197a283da8481ddcb15b177172784d (patch) | |
| tree | bf2b1e0b27c98340d194469a4b3a5e02d4a2acb8 /spec/features/profiles/user_edit_profile_spec.rb | |
| parent | 3c97422b098235bca250f738922dab9c861f0ee7 (diff) | |
| download | gitlab-ce-839e879bcf197a283da8481ddcb15b177172784d.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/profiles/user_edit_profile_spec.rb')
| -rw-r--r-- | spec/features/profiles/user_edit_profile_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb index 239bc04a9cb..bd4917824d1 100644 --- a/spec/features/profiles/user_edit_profile_spec.rb +++ b/spec/features/profiles/user_edit_profile_spec.rb @@ -199,6 +199,38 @@ RSpec.describe 'User edit profile' do expect(busy_status.checked?).to eq(true) end + context 'with user status set to busy' do + let(:project) { create(:project, :public) } + let(:issue) { create(:issue, project: project, author: user) } + + before do + toggle_busy_status + submit_settings + + project.add_developer(user) + visit project_issue_path(project, issue) + end + + it 'shows author as busy in the assignee dropdown' do + find('.block.assignee .edit-link').click + wait_for_requests + + page.within '.dropdown-menu-user' do + expect(page).to have_content("#{user.name} (Busy)") + end + end + + it 'displays the assignee busy status' do + click_button 'assign yourself' + wait_for_requests + + visit project_issue_path(project, issue) + wait_for_requests + + expect(page.find('[data-testid="expanded-assignee"]')).to have_text("#{user.name} (Busy)") + end + end + context 'with set_user_availability_status feature flag disabled' do before do stub_feature_flags(set_user_availability_status: false) |
