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
f2eb6683
Commit
f2eb6683
authored
Nov 05, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature test for New file feature
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
bd2b6f59
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
9 deletions
+22
-9
app/views/projects/tree/_tree.html.haml
app/views/projects/tree/_tree.html.haml
+1
-1
features/project/source/browse_files.feature
features/project/source/browse_files.feature
+4
-0
features/steps/project/project_browse_files.rb
features/steps/project/project_browse_files.rb
+17
-8
No files found.
app/views/projects/tree/_tree.html.haml
View file @
f2eb6683
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
=
link_to
title
,
'#'
=
link_to
title
,
'#'
\/
\/
%li
%li
=
link_to
project_new_tree_path
(
@project
,
@id
)
do
=
link_to
project_new_tree_path
(
@project
,
@id
)
,
title:
'New file'
,
id:
'new-file-link'
do
%small
%small
%i
.icon-plus.light
%i
.icon-plus.light
...
...
features/project/source/browse_files.feature
View file @
f2eb6683
...
@@ -20,6 +20,10 @@ Feature: Project Browse files
...
@@ -20,6 +20,10 @@ Feature: Project Browse files
And
I click link
"raw"
And
I click link
"raw"
Then
I should see raw file content
Then
I should see raw file content
Scenario
:
I
can create file
Given
I click on
"new file"
link in repo
Then
I can see new file page
@javascript
@javascript
Scenario
:
I
can edit file
Scenario
:
I
can edit file
Given
I click on
"Gemfile.lock"
file in repo
Given
I click on
"Gemfile.lock"
file in repo
...
...
features/steps/project/project_browse_files.rb
View file @
f2eb6683
...
@@ -3,42 +3,51 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
...
@@ -3,42 +3,51 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
include
SharedProject
include
SharedProject
include
SharedPaths
include
SharedPaths
Then
'I should see files from repository'
do
step
'I should see files from repository'
do
page
.
should
have_content
"app"
page
.
should
have_content
"app"
page
.
should
have_content
"history"
page
.
should
have_content
"history"
page
.
should
have_content
"Gemfile"
page
.
should
have_content
"Gemfile"
end
end
Then
'I should see files from repository for "8470d70"'
do
step
'I should see files from repository for "8470d70"'
do
current_path
.
should
==
project_tree_path
(
@project
,
"8470d70"
)
current_path
.
should
==
project_tree_path
(
@project
,
"8470d70"
)
page
.
should
have_content
"app"
page
.
should
have_content
"app"
page
.
should
have_content
"history"
page
.
should
have_content
"history"
page
.
should
have_content
"Gemfile"
page
.
should
have_content
"Gemfile"
end
end
Given
'I click on "Gemfile.lock" file in repo'
do
step
'I click on "Gemfile.lock" file in repo'
do
click_link
"Gemfile.lock"
click_link
"Gemfile.lock"
end
end
Then
'I should see it content'
do
step
'I should see it content'
do
page
.
should
have_content
"DEPENDENCIES"
page
.
should
have_content
"DEPENDENCIES"
end
end
And
'I click link "raw"'
do
step
'I click link "raw"'
do
click_link
"raw"
click_link
"raw"
end
end
Then
'I should see raw file content'
do
step
'I should see raw file content'
do
page
.
source
.
should
==
ValidCommit
::
BLOB_FILE
page
.
source
.
should
==
ValidCommit
::
BLOB_FILE
end
end
Given
'I click button "edit"'
do
step
'I click button "edit"'
do
click_link
'edit'
click_link
'edit'
end
end
Then
'I can edit code'
do
step
'I can edit code'
do
page
.
execute_script
(
'editor.setValue("GitlabFileEditor")'
)
page
.
execute_script
(
'editor.setValue("GitlabFileEditor")'
)
page
.
evaluate_script
(
'editor.getValue()'
).
should
==
"GitlabFileEditor"
page
.
evaluate_script
(
'editor.getValue()'
).
should
==
"GitlabFileEditor"
end
end
step
'I click on "new file" link in repo'
do
click_link
'new-file-link'
end
step
'I can see new file page'
do
page
.
should
have_content
"New file"
page
.
should
have_content
"File name"
page
.
should
have_content
"Commit message"
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