Commit 3e40b885 authored by Phil Hughes's avatar Phil Hughes

Project title dropdown tests

Added a test for when on an issue page to check whether the project
dropdown links will still work

See !3870
parent 6ff740ff
......@@ -104,6 +104,33 @@ feature 'Project', feature: true do
end
end
describe 'project title' do
let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) }
let(:project2) { create(:project, namespace: user.namespace, path: 'test') }
let(:issue) { create(:issue, project: project) }
context 'on issues page', js: true do
before do
login_with(user)
project.team.add_user(user, Gitlab::Access::MASTER)
project2.team.add_user(user, Gitlab::Access::MASTER)
visit namespace_project_issue_path(project.namespace, project, issue)
end
it 'click toggle and show dropdown' do
find('.js-projects-dropdown-toggle').click
expect(page).to have_css('.dropdown-menu-projects .dropdown-content li', count: 2)
page.within '.dropdown-menu-projects' do
click_link project.name_with_namespace
end
expect(page).to have_content project.name
end
end
end
def remove_with_confirm(button_text, confirm_with)
click_button button_text
fill_in 'confirm_name_input', with: confirm_with
......
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