diff options
-rw-r--r-- | spec/features/issues/form_spec.rb | 16 | ||||
-rw-r--r-- | spec/features/issues/issue_sidebar_spec.rb | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/issues/form_spec.rb b/spec/features/issues/form_spec.rb index 87adce3cddd..7d13690f284 100644 --- a/spec/features/issues/form_spec.rb +++ b/spec/features/issues/form_spec.rb @@ -23,6 +23,22 @@ describe 'New/edit issue', feature: true, js: true do visit new_namespace_project_issue_path(project.namespace, project) end + describe 'single assignee' do + it 'hides assignee after selection' do + click_button 'Unassigned' + + page.within('.dropdown-menu-user') do + click_link user.name + end + + # TODO: Figure out a better way to wait for dropdown CSS hide + # animation to complete + sleep 0.3 + + expect(page.find('.dropdown-menu-user', visible: false)).not_to be_visible + end + end + describe 'multiple assignees' do before do click_button 'Unassigned' diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb index 0de0f93089a..dd8c46f1044 100644 --- a/spec/features/issues/issue_sidebar_spec.rb +++ b/spec/features/issues/issue_sidebar_spec.rb @@ -57,6 +57,16 @@ feature 'Issue Sidebar', feature: true do expect(page.find('.dropdown-menu-user-link.is-active')).to have_content(user.name) end end + + context 'single assignee' do + it 'hides assignee after selection' do + page.within('.dropdown-menu-user') do + click_link user.name + end + + expect(page.find('.block.assignee .selectbox', visible: false)).not_to be_visible + end + end end context 'as a allowed user' do |