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
0100d3f8
Commit
0100d3f8
authored
Jan 11, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests
parent
0ec3e8c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
features/project/ff_merge_requests.feature
features/project/ff_merge_requests.feature
+15
-6
features/steps/project/ff_merge_requests.rb
features/steps/project/ff_merge_requests.rb
+6
-9
No files found.
features/project/ff_merge_requests.feature
View file @
0100d3f8
...
...
@@ -3,23 +3,32 @@ Feature: Project Ff Merge Requests
Given
I sign in as a user
And
I own project
"Shop"
And
project
"Shop"
have
"Bug NS-05"
open merge request with diffs inside
And
ff merge enabled
And
merge request
"Bug NS-05"
is mergeable
@javascript
Scenario
:
I
do ff-only merge
Given
merge request
"Bug NS-05"
is rebased
Given
ff merge enabled
And
merge request
"Bug NS-05"
is rebased
When
I visit merge request page
"Bug NS-05"
Then
I should see ff-only merge button
When
I accept this merge request
Then
I should see merged request
@javascript
Scenario
:
I
do rebase before ff-only merge
Given
rebase before merge enabled
Given
ff merge enabled
And
rebase before merge enabled
When
I visit merge request page
"Bug NS-05"
Then
I should see rebase button
When
I press rebase button
Then
I should see rebase in progress message
And
I should see ff-only merge button
Scenario
:
I
should do rebase before ff-only merge
@javascript
Scenario
:
I
do rebase before regular merge
Given
rebase before merge enabled
When
I visit merge request page
"Bug NS-05"
Then
I should not see rebase button
And
I should see rebase message
Then
I should see rebase button
When
I press rebase button
Then
I should see rebase in progress message
And
I should see regular merge button
features/steps/project/ff_merge_requests.rb
View file @
0100d3f8
...
...
@@ -21,7 +21,12 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps
end
step
'I should see ff-only merge button'
do
expect
(
page
).
to
have_content
"Fast-forward merge without creating merge commit"
expect
(
page
).
to
have_content
"Fast-forward merge without a merge commit"
expect
(
page
).
to
have_button
'Accept Merge Request'
end
step
'I should see regular merge button'
do
expect
(
page
).
to
have_content
"Modify commit message"
expect
(
page
).
to
have_button
'Accept Merge Request'
end
...
...
@@ -47,18 +52,10 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps
project
.
save!
end
step
'I should not see rebase button'
do
expect
(
page
).
to_not
have_button
"Rebase"
end
step
'I should see rebase button'
do
expect
(
page
).
to
have_button
"Rebase"
end
step
'I should see rebase message'
do
expect
(
page
).
to
have_content
"Fast-forward merge is not possible. Branch must be rebased first"
end
step
'merge request "Bug NS-05" is rebased'
do
merge_request
.
source_branch
=
'flatten-dir'
merge_request
.
target_branch
=
'improve/awesome'
...
...
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