diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-07 22:49:22 +0200 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-07 22:49:22 +0200 |
commit | bf601f0775d0138f30721f350f9ed3535c7e701f (patch) | |
tree | a75ee4695440871c1868b80f8b182e262ea10979 /spec | |
parent | c7bf2bfdaaa2f1aaff0cb1118260db744abb5633 (diff) | |
download | gitlab-ce-bf601f0775d0138f30721f350f9ed3535c7e701f.tar.gz |
Fixed spec test syntax errors
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/explore/new_menu_spec.rb | 62 |
1 files changed, 58 insertions, 4 deletions
diff --git a/spec/features/explore/new_menu_spec.rb b/spec/features/explore/new_menu_spec.rb index 8fc8d0e8975..eaf431f82b1 100644 --- a/spec/features/explore/new_menu_spec.rb +++ b/spec/features/explore/new_menu_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'Top Plus Menu', :js, :feature do +feature 'Top Plus Menu', feature: true, js: true do let!(:user) { create :user } let!(:group) { create(:group) } let!(:public_group) { create(:group, :public) } @@ -20,7 +20,7 @@ describe 'Top Plus Menu', :js, :feature do login_as :user end - scenario 'click on New project shows new project page' + scenario 'click on New project shows new project page' do visit root_dashboard_path click_topmenuitem("New project") @@ -29,7 +29,7 @@ describe 'Top Plus Menu', :js, :feature do expect(page).to have_content('Project name') end - scenario 'click on New group shows new group page' + scenario 'click on New group shows new group page' do visit root_dashboard_path click_topmenuitem("New group") @@ -38,7 +38,7 @@ describe 'Top Plus Menu', :js, :feature do expect(page).to have_content('Group name') end - scenario 'click on New group shows new group page' + scenario 'click on New snippet shows new snippet page' do visit root_dashboard_path click_topmenuitem("New snippet") @@ -46,6 +46,60 @@ describe 'Top Plus Menu', :js, :feature do expect(page).to have_content('New Snippet') expect(page).to have_content('Title') end + + scenario 'click on New issue shows new issue page' do + visit namespace_project_path(empty_project.namespace, empty_project) + + click_topmenuitem("New issue") + + expect(page).to have_content('New Issue') + expect(page).to have_content('Title') + end + + scenario 'click on New merge request shows new merge request page' do + visit namespace_project_path(empty_project.namespace, empty_project) + + click_topmenuitem("New merge request") + + expect(page).to have_content('New Merge Request') + expect(page).to have_content('Source branch') + expect(page).to have_content('Target branch') + end + + scenario 'click on New project snippet shows new snippet page' do + visit namespace_project_path(empty_project.namespace, empty_project) + + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + find('.header-new-project-snippet a').trigger('click') + end + + expect(page).to have_content('New Snippet') + expect(page).to have_content('Title') + end + + scenario 'Click on New subgroup shows new group page' do + visit group_path(group) + + click_topmenuitem("New subgroup") + + expect(page).to have_content('Group path') + expect(page).to have_content('Group name') + end + + scenario 'Click on New project in group shows new project page' do + visit group_path(group) + + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + find('.header-new-group-project a').trigger('click') + end + + expect(page).to have_content('Project path') + expect(page).to have_content('Project name') + end end def click_topmenuitem(item_name) |