Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9ff69c4c
Commit
9ff69c4c
authored
May 08, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for template mr description.
parent
7478ece8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
1 deletion
+26
-1
features/project/merge_requests.feature
features/project/merge_requests.feature
+4
-0
features/project/project.feature
features/project/project.feature
+7
-0
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+4
-0
features/steps/project/project.rb
features/steps/project/project.rb
+10
-0
features/steps/shared/project.rb
features/steps/shared/project.rb
+1
-1
No files found.
features/project/merge_requests.feature
View file @
9ff69c4c
...
...
@@ -139,3 +139,7 @@ Feature: Project Merge Requests
And
I click link
"Show inline discussion"
of the second file
Then
I should see a comment like
"Line is wrong"
in the second file
And
I should still see a comment like
"Line is correct"
in the first file
Scenario
:
I
submit new unassigned merge request with template description
Given
I click link
"New Merge Request"
Then
I should see description field pre-filled
features/project/project.feature
View file @
9ff69c4c
...
...
@@ -24,3 +24,10 @@ Feature: Project Feature
When
I visit edit project
"Shop"
page
And
change project path settings
Then
I should see project with new path settings
Scenario
:
I
visit edit project and fill in merge request template
When
I visit edit project
"Shop"
page
Then
I should see project settings
And
I fill in merge request template
And
I save project
Then
I should see project with merge request template saved
features/steps/project/merge_requests.rb
View file @
9ff69c4c
...
...
@@ -239,6 +239,10 @@ class ProjectMergeRequests < Spinach::FeatureSteps
end
end
step
'I should see description field pre-filled'
do
find_field
(
'merge_request_description'
).
value
.
should
==
'This merge request should contain the following.'
end
def
project
@project
||=
Project
.
find_by!
(
name:
"Shop"
)
end
...
...
features/steps/project/project.rb
View file @
9ff69c4c
...
...
@@ -14,6 +14,8 @@ class ProjectFeature < Spinach::FeatureSteps
step
'I should see project with new settings'
do
find_field
(
'project_name'
).
value
.
should
==
'NewName'
find
(
'#project_issues_enabled'
).
should_not
be_checked
find
(
'#project_merge_requests_enabled'
).
should
be_checked
end
step
'change project path settings'
do
...
...
@@ -24,4 +26,12 @@ class ProjectFeature < Spinach::FeatureSteps
step
'I should see project with new path settings'
do
project
.
path
.
should
==
"new-path"
end
step
'I fill in merge request template'
do
fill_in
'project_merge_requests_template'
,
with:
"This merge request should contain the following."
end
step
'I should see project with merge request template saved'
do
find_field
(
'project_merge_requests_template'
).
value
.
should
==
'This merge request should contain the following.'
end
end
features/steps/shared/project.rb
View file @
9ff69c4c
...
...
@@ -10,7 +10,7 @@ module SharedProject
# Create a specific project called "Shop"
And
'I own project "Shop"'
do
@project
=
Project
.
find_by
(
name:
"Shop"
)
@project
||=
create
(
:project
,
name:
"Shop"
,
namespace:
@user
.
namespace
)
@project
||=
create
(
:project
,
name:
"Shop"
,
namespace:
@user
.
namespace
,
merge_requests_template:
"This merge request should contain the following."
)
@project
.
team
<<
[
@user
,
:master
]
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment