diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-04-27 17:28:48 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-04-27 17:28:48 +0000 |
commit | 90c966500ab7177d80c96aebf42f95b9c814f7b6 (patch) | |
tree | 5f4417eedfab2eaacafad1f6d0e8f9def4dc0b96 | |
parent | 1b35955e0b368c48bcc01279aad4824e6a979d21 (diff) | |
parent | 3e40b88547b97dc7937b93882d2f959c39ef5f31 (diff) | |
download | gitlab-ce-90c966500ab7177d80c96aebf42f95b9c814f7b6.tar.gz |
Merge branch 'project-dropdown-tests' into 'master'
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
See merge request !3921
-rw-r--r-- | spec/features/projects_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 782c0bfe666..9dd0378d165 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -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 |