diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-07 15:39:39 +0200 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-06-07 15:39:39 +0200 |
commit | 4871cb7aeed1939fb54563633ffee60e4c1eb46b (patch) | |
tree | c7940fff227333c56d2d820c91b695167f10e232 /features/steps | |
parent | ebd0767fc76c820088efce236a57e36619f08b6d (diff) | |
download | gitlab-ce-4871cb7aeed1939fb54563633ffee60e4c1eb46b.tar.gz |
New ... Menu Feature Tests
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/dashboard/new_project_top_menu.rb | 17 | ||||
-rw-r--r-- | features/steps/explore/new_menu.rb | 71 |
2 files changed, 71 insertions, 17 deletions
diff --git a/features/steps/dashboard/new_project_top_menu.rb b/features/steps/dashboard/new_project_top_menu.rb deleted file mode 100644 index 364be964efd..00000000000 --- a/features/steps/dashboard/new_project_top_menu.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Spinach::Features::NewProjectTopMenu < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedProject - - step 'I click "New project" in top right menu' do - page.within '.header-content' do - click_link "New project" - end - end - - step 'I see "New Project" page' do - expect(page).to have_content('Project path') - expect(page).to have_content('Project name') - end - -end diff --git a/features/steps/explore/new_menu.rb b/features/steps/explore/new_menu.rb new file mode 100644 index 00000000000..a480a4705e0 --- /dev/null +++ b/features/steps/explore/new_menu.rb @@ -0,0 +1,71 @@ +class Spinach::Features::NewMenu < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedProject + + step 'I click "New project" in top right menu' do + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + click_link "New project" + end + end + + step 'I click "New group" in top right menu' do + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + click_link "New group" + end + end + + step 'I click "New snippet" in top right menu' do + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + click_link "New snippet" + end + end + + step 'I click "New issue" in top right menu' do + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + click_link "New issue" + end + end + + step 'I click "New merge request" in top right menu' do + page.within '.header-content' do + find('.header-new-dropdown-toggle').trigger('click') + expect(page).to have_selector('.header-new.dropdown.open', count: 1) + click_link "New merge request" + end + end + + step 'I see "New Project" page' do + expect(page).to have_content('Project path') + expect(page).to have_content('Project name') + end + + step 'I see "New Group" page' do + expect(page).to have_content('Group path') + expect(page).to have_content('Group name') + end + + step 'I see "New Snippet" page' do + expect(page).to have_content('New Snippet') + expect(page).to have_content('Title') + end + + step 'I see "New Issue" page' do + expect(page).to have_content('New Issue') + expect(page).to have_content('Title') + end + + step 'I see "New Merge Request" page' do + expect(page).to have_content('New Merge Request') + expect(page).to have_content('Source branch') + expect(page).to have_content('Target branch') + end +end |