summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-06-07 23:59:25 +0200
committerTim Zallmann <tzallmann@gitlab.com>2017-06-07 23:59:25 +0200
commit9647d2e76d05e8720bfe695918e292e57307900e (patch)
treed4ae28867ba7ad500b34d62c2a4a83c1444a6ddf /features
parentbf601f0775d0138f30721f350f9ed3535c7e701f (diff)
downloadgitlab-ce-9647d2e76d05e8720bfe695918e292e57307900e.tar.gz
Enhancing Spec's with negative cases
Diffstat (limited to 'features')
-rw-r--r--features/explore/new_menu.feature55
-rw-r--r--features/steps/explore/new_menu.rb81
2 files changed, 0 insertions, 136 deletions
diff --git a/features/explore/new_menu.feature b/features/explore/new_menu.feature
deleted file mode 100644
index b920a319b80..00000000000
--- a/features/explore/new_menu.feature
+++ /dev/null
@@ -1,55 +0,0 @@
-@explore
-Feature: New Menu
-Background:
- Given I sign in as "John Doe"
- And "John Doe" is owner of group "Owned"
- And I own project "Shop"
- And I visit dashboard page
-
- @javascript
- Scenario: I should see New Projects page
- When I visit dashboard page
- And I click "New project" in top right menu
- Then I see "New Project" page
-
- @javascript
- Scenario: I should see New Group page
- When I visit dashboard page
- And I click "New group" in top right menu
- Then I see "New Group" page
-
- @javascript
- Scenario: I should see New Snippet page
- When I visit dashboard page
- And I click "New snippet" in top right menu
- Then I see "New Snippet" page
-
- @javascript
- Scenario: I should see New Issue page
- When I visit project "Shop" page
- And I click "New issue" in top right menu
- Then I see "New Issue" page
-
- @javascript
- Scenario: I should see New Merge Request page
- When I visit project "Shop" page
- And I click "New merge request" in top right menu
- Then I see "New Merge Request" page
-
- @javascript
- Scenario: I should see New Project Snippet page
- When I visit project "Shop" page
- And I click "New project snippet" in top right menu
- Then I see "New Snippet" page
-
- @javascript
- Scenario: I should see New Group Project page
- When I visit group "Owned" page
- And I click "New group project" in top right menu
- Then I see "New Project" page
-
- @javascript
- Scenario: I should see New Subgroup page
- When I visit group "Owned" page
- And I click "New subgroup" in top right menu
- Then I see "New Group" page
diff --git a/features/steps/explore/new_menu.rb b/features/steps/explore/new_menu.rb
deleted file mode 100644
index 17fd3a9a8ce..00000000000
--- a/features/steps/explore/new_menu.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-class Spinach::Features::NewMenu < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedPaths
- include SharedProject
- include SharedGroup
- include SharedUser
-
- step 'I click "New project" in top right menu' do
- click_topmenuitem("New project")
- end
-
- step 'I click "New group" in top right menu' do
- click_topmenuitem("New group")
- end
-
- step 'I click "New snippet" in top right menu' do
- click_topmenuitem("New snippet")
- end
-
- step 'I click "New project 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)
- find('.header-new-project-snippet a').trigger('click')
- end
- end
-
- step 'I click "New issue" in top right menu' do
- click_topmenuitem("New issue")
- end
-
- step 'I click "New merge request" in top right menu' do
- click_topmenuitem("New merge request")
- end
-
- step 'I click "New subgroup" in top right menu' do
- click_topmenuitem("New subgroup")
- end
-
- step 'I click "New group 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)
- find('.header-new-group-project a').trigger('click')
- 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
-
- def click_topmenuitem(item_name)
- 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 item_name
- end
- end
-end