mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 01:26:08 +10:00
Scenarios for checking if MR are shown for internal and public projects.
This commit is contained in:
@@ -79,3 +79,20 @@ Feature: Public Projects Feature
|
||||
Given I visit project "Internal" page
|
||||
And I visit "Internal" issues page
|
||||
Then I should see list of issues for "Internal" project
|
||||
|
||||
Scenario: I visit public project merge requests page as an authorized user
|
||||
Given I sign in as a user
|
||||
Given I visit project "Community" page
|
||||
And I visit "Community" merge requests page
|
||||
Then I should see list of merge requests for "Community" project
|
||||
|
||||
Scenario: I visit public project merge requests page as a non authorized user
|
||||
Given I visit project "Community" page
|
||||
And I visit "Community" merge requests page
|
||||
Then I should see list of merge requests for "Community" project
|
||||
|
||||
Scenario: I visit internal project merge requests page as an authorized user
|
||||
Given I sign in as a user
|
||||
Given I visit project "Internal" page
|
||||
And I visit "Internal" merge requests page
|
||||
Then I should see list of merge requests for "Internal" project
|
||||
|
||||
@@ -151,5 +151,59 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
|
||||
page.should have_content project.name
|
||||
page.should have_content "New internal feature"
|
||||
end
|
||||
|
||||
step 'I visit "Community" merge requests page' do
|
||||
project = Project.find_by(name: 'Community')
|
||||
create(:merge_request,
|
||||
title: "Bug fix",
|
||||
source_project: project,
|
||||
target_project: project,
|
||||
source_branch: 'stable',
|
||||
target_branch: 'master',
|
||||
)
|
||||
create(:merge_request,
|
||||
title: "Feature created",
|
||||
source_project: project,
|
||||
target_project: project,
|
||||
source_branch: 'stable',
|
||||
target_branch: 'master',
|
||||
)
|
||||
visit project_merge_requests_path(project)
|
||||
end
|
||||
|
||||
step 'I should see list of merge requests for "Community" project' do
|
||||
project = Project.find_by(name: 'Community')
|
||||
|
||||
page.should have_content "Bug fix"
|
||||
page.should have_content project.name
|
||||
page.should have_content "Feature created"
|
||||
end
|
||||
|
||||
step 'I visit "Internal" merge requests page' do
|
||||
project = Project.find_by(name: 'Internal')
|
||||
create(:merge_request,
|
||||
title: "Bug fix internal",
|
||||
source_project: project,
|
||||
target_project: project,
|
||||
source_branch: 'stable',
|
||||
target_branch: 'master',
|
||||
)
|
||||
create(:merge_request,
|
||||
title: "Feature created for internal",
|
||||
source_project: project,
|
||||
target_project: project,
|
||||
source_branch: 'stable',
|
||||
target_branch: 'master',
|
||||
)
|
||||
visit project_merge_requests_path(project)
|
||||
end
|
||||
|
||||
step 'I should see list of merge requests for "Internal" project' do
|
||||
project = Project.find_by(name: 'Internal')
|
||||
|
||||
page.should have_content "Bug fix internal"
|
||||
page.should have_content project.name
|
||||
page.should have_content "Feature created for internal"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user