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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
5d5f2cf3
Commit
5d5f2cf3
authored
Jul 27, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature test for merge request version
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
09fa0139
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
spec/features/merge_requests/merge_request_versions_spec.rb
spec/features/merge_requests/merge_request_versions_spec.rb
+38
-0
No files found.
spec/features/merge_requests/merge_request_versions_spec.rb
0 → 100644
View file @
5d5f2cf3
require
'spec_helper'
feature
'Merge Request versions'
,
js:
true
,
feature:
true
do
before
do
login_as
:admin
merge_request
=
create
(
:merge_request
,
importing:
true
)
merge_request
.
merge_request_diffs
.
create
(
head_commit_sha:
'6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9'
)
merge_request
.
merge_request_diffs
.
create
(
head_commit_sha:
'5937ac0a7beb003549fc5fd26fc247adbce4a52e'
)
project
=
merge_request
.
source_project
visit
diffs_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
end
it
'show the latest version of the diff'
do
page
.
within
'.mr-version-switch'
do
expect
(
page
).
to
have_content
'Version: latest'
end
expect
(
page
).
to
have_content
'8 changed files'
end
describe
'switch between versions'
do
before
do
page
.
within
'.mr-version-switch'
do
find
(
'.btn-link'
).
click
#find('a', text: '6f6d7e7e').click
click_link
'6f6d7e7e'
end
end
it
'should show older version'
do
page
.
within
'.mr-version-switch'
do
expect
(
page
).
to
have_content
'Version: 6f6d7e7e'
end
expect
(
page
).
to
have_content
'5 changed files'
end
end
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