Commit a72bc103 authored by Clement Ho's avatar Clement Ho

Add spec

parent dbbe15e6
......@@ -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'
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment