diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-15 14:40:22 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-15 14:40:22 +0300 |
commit | 342434c886a680bea5a4e37dbfbd8d96882ae780 (patch) | |
tree | 8e531467f96201597afdc7a50fb8ce8fdfdd4ce0 /spec/features | |
parent | bf4455d14659f1fde6391164b38310d361bf407d (diff) |
Fixed issue with de-selecting dropdown option in issue sidebar
Closes #18641
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues_spec.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index f6fb6a72d22..65fe918e2e8 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -396,6 +396,27 @@ describe 'Issues', feature: true do expect(page).to have_content @user.name end end + + it 'allows user to unselect themselves', js: true do + issue2 = create(:issue, project: project, author: @user) + visit namespace_project_issue_path(project.namespace, project, issue2) + + page.within '.assignee' do + click_link 'Edit' + click_link @user.name + + page.within '.value' do + expect(page).to have_content @user.name + end + + click_link 'Edit' + click_link @user.name + + page.within '.value' do + expect(page).to have_content "No assignee" + end + end + end end context 'by unauthorized user' do @@ -440,6 +461,26 @@ describe 'Issues', feature: true do expect(issue.reload.milestone).to be_nil end + + it 'allows user to de-select milestone', js: true do + visit namespace_project_issue_path(project.namespace, project, issue) + + page.within('.milestone') do + click_link 'Edit' + click_link milestone.title + + page.within '.value' do + expect(page).to have_content milestone.title + end + + click_link 'Edit' + click_link milestone.title + + page.within '.value' do + expect(page).to have_content 'None' + end + end + end end context 'by unauthorized user' do |