BigW Consortium Gitlab

Commit 4871cb7a by Tim Zallmann

New ... Menu Feature Tests

parent ebd0767f
@dashboard
Feature: New Project top menu
Background:
Given I sign in as a user
And I own project "Shop"
And I visit dashboard page
And I click "New project" in top right menu
@javascript
Scenario: I should see New Projects page
Then I see "New Project" page
@explore
Feature: New Menu
Background:
Given I sign in as a user
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 snippet" in top right menu
Then I see "New Snippet" page
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
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
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