Commit f17875eb authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

CE-port of 6571-single-codebase

Adds conditional to close assignee menu when visible in EE
parent 00e5d66d
......@@ -497,12 +497,21 @@ describe 'Issues' do
it 'allows user to unselect themselves', :js do
issue2 = create(:issue, project: project, author: user)
visit project_issue_path(project, issue2)
def close_dropdown_menu_if_visible
find('.dropdown-menu-toggle', visible: :all).tap do |toggle|
toggle.click if toggle.visible?
end
end
page.within '.assignee' do
click_link 'Edit'
click_link user.name
close_dropdown_menu_if_visible
page.within '.value .author' do
expect(page).to have_content user.name
end
......@@ -510,6 +519,8 @@ describe 'Issues' do
click_link 'Edit'
click_link user.name
close_dropdown_menu_if_visible
page.within '.value .assign-yourself' do
expect(page).to have_content "No assignee"
end
......
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