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
Léo-Paul Géneau
gitlab-ce
Commits
4d1d4151
Commit
4d1d4151
authored
Oct 14, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'security-9-5' into 3435-backport-9-5
parents
9d42830f
099928ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
spec/features/projects/user_edits_files_spec.rb
spec/features/projects/user_edits_files_spec.rb
+13
-1
No files found.
spec/features/projects/user_edits_files_spec.rb
View file @
4d1d4151
...
...
@@ -24,6 +24,8 @@ describe 'User edits files' do
it
'inserts a content of a file'
,
js:
true
do
click_link
(
'.gitignore'
)
find
(
'.js-edit-blob'
).
click
find
(
'.file-editor'
,
match: :first
)
execute_script
(
"ace.edit('editor').setValue('*.rbca')"
)
expect
(
evaluate_script
(
'ace.edit("editor").getValue()'
)).
to
eq
(
'*.rbca'
)
...
...
@@ -39,6 +41,8 @@ describe 'User edits files' do
it
'commits an edited file'
,
js:
true
do
click_link
(
'.gitignore'
)
find
(
'.js-edit-blob'
).
click
find
(
'.file-editor'
,
match: :first
)
execute_script
(
"ace.edit('editor').setValue('*.rbca')"
)
fill_in
(
:commit_message
,
with:
'New commit message'
,
visible:
true
)
click_button
(
'Commit changes'
)
...
...
@@ -53,6 +57,8 @@ describe 'User edits files' do
it
'commits an edited file to a new branch'
,
js:
true
do
click_link
(
'.gitignore'
)
find
(
'.js-edit-blob'
).
click
find
(
'.file-editor'
,
match: :first
)
execute_script
(
"ace.edit('editor').setValue('*.rbca')"
)
fill_in
(
:commit_message
,
with:
'New commit message'
,
visible:
true
)
fill_in
(
:branch_name
,
with:
'new_branch_name'
,
visible:
true
)
...
...
@@ -62,13 +68,14 @@ describe 'User edits files' do
click_link
(
'Changes'
)
wait_for_requests
expect
(
page
).
to
have_content
(
'*.rbca'
)
end
it
'shows the diff of an edited file'
,
js:
true
do
click_link
(
'.gitignore'
)
find
(
'.js-edit-blob'
).
click
find
(
'.file-editor'
,
match: :first
)
execute_script
(
"ace.edit('editor').setValue('*.rbca')"
)
click_link
(
'Preview changes'
)
...
...
@@ -93,6 +100,8 @@ describe 'User edits files' do
expect
(
page
).
to
have_content
(
fork_message
)
find
(
'.file-editor'
,
match: :first
)
execute_script
(
"ace.edit('editor').setValue('*.rbca')"
)
expect
(
evaluate_script
(
'ace.edit("editor").getValue()'
)).
to
eq
(
'*.rbca'
)
...
...
@@ -106,6 +115,9 @@ describe 'User edits files' do
expect
(
page
).
to
have_button
(
'Cancel'
)
click_link
(
'Fork'
)
find
(
'.file-editor'
,
match: :first
)
execute_script
(
"ace.edit('editor').setValue('*.rbca')"
)
fill_in
(
:commit_message
,
with:
'New commit message'
,
visible:
true
)
click_button
(
'Commit changes'
)
...
...
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