Spianch test for group dashboard
This commit is contained in:
parent
224fb5770c
commit
8b76e30656
6 changed files with 68 additions and 13 deletions
|
@ -10,6 +10,11 @@ Feature: Dashboard
|
|||
Then I should see "Shop" project link
|
||||
Then I should see project "Shop" activity feed
|
||||
|
||||
Scenario: I should see groups list
|
||||
Given I have group with projects
|
||||
And I visit dashboard page
|
||||
Then I should see groups list
|
||||
|
||||
Scenario: I should see last push widget
|
||||
Then I should see last push widget
|
||||
And I click "Create Merge Request" link
|
||||
|
|
9
features/group/group.feature
Normal file
9
features/group/group.feature
Normal file
|
@ -0,0 +1,9 @@
|
|||
Feature: Groups
|
||||
Background:
|
||||
Given I sign in as a user
|
||||
And I have group with projects
|
||||
|
||||
Scenario: I should see group dashboard list
|
||||
When I visit group page
|
||||
Then I should see projects list
|
||||
And I should see projects activity feed
|
32
features/steps/group/group.rb
Normal file
32
features/steps/group/group.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
class Groups < Spinach::FeatureSteps
|
||||
include SharedAuthentication
|
||||
include SharedPaths
|
||||
|
||||
When 'I visit group page' do
|
||||
visit group_path(current_group)
|
||||
end
|
||||
|
||||
Then 'I should see projects list' do
|
||||
current_user.projects.each do |project|
|
||||
page.should have_link project.name
|
||||
end
|
||||
end
|
||||
|
||||
And 'I have group with projects' do
|
||||
@group = Factory :group
|
||||
@project = Factory :project, group: @group
|
||||
@event = Factory :closed_issue_event, project: @project
|
||||
|
||||
@project.add_access current_user, :admin
|
||||
end
|
||||
|
||||
And 'I should see projects activity feed' do
|
||||
page.should have_content 'closed issue'
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def current_group
|
||||
@group ||= Group.first
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue