summaryrefslogtreecommitdiff
path: root/spec/features/issues_spec.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-15 12:40:22 +0100
committerPhil Hughes <me@iamphill.com>2016-06-15 12:40:22 +0100
commit342434c886a680bea5a4e37dbfbd8d96882ae780 (patch)
tree8e531467f96201597afdc7a50fb8ce8fdfdd4ce0 /spec/features/issues_spec.rb
parentbf4455d14659f1fde6391164b38310d361bf407d (diff)
downloadgitlab-ce-342434c886a680bea5a4e37dbfbd8d96882ae780.tar.gz
Fixed issue with de-selecting dropdown option in issue sidebarissuable-sidebar-dropdown-deselect-fix
Closes #18641
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r--spec/features/issues_spec.rb41
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