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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
bb2f4d66
Commit
bb2f4d66
authored
Jul 31, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix browse code spinach tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
830eaa7f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
44 deletions
+53
-44
features/project/source/browse_files.feature
features/project/source/browse_files.feature
+6
-6
features/project/source/git_blame.feature
features/project/source/git_blame.feature
+1
-1
features/project/source/multiselect_blob.feature
features/project/source/multiselect_blob.feature
+1
-1
features/project/source/search_code.feature
features/project/source/search_code.feature
+3
-3
features/steps/project/browse_files.rb
features/steps/project/browse_files.rb
+12
-13
features/steps/project/browse_git_repo.rb
features/steps/project/browse_git_repo.rb
+4
-4
features/steps/project/multiselect_blob.rb
features/steps/project/multiselect_blob.rb
+2
-2
features/steps/project/search_code.rb
features/steps/project/search_code.rb
+5
-6
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-4
spec/support/valid_commit.rb
spec/support/valid_commit.rb
+15
-4
No files found.
features/project/source/browse_files.feature
View file @
bb2f4d66
...
...
@@ -8,11 +8,11 @@ Feature: Project Browse files
Then
I should see files from repository
Scenario
:
I
browse files for specific ref
Given
I visit project source page for
"
8470d70
"
Then
I should see files from repository for
"
8470d70
"
Given
I visit project source page for
"
6d39438
"
Then
I should see files from repository for
"
6d39438
"
Scenario
:
I
browse file content
Given
I click on
"
Gemfile.lock
"
file in repo
Given
I click on
"
.gitignore
"
file in repo
Then
I should see it content
Scenario
:
I
browse raw file
...
...
@@ -26,20 +26,20 @@ Feature: Project Browse files
@javascript
Scenario
:
I
can edit file
Given
I click on
"
Gemfile.lock
"
file in repo
Given
I click on
"
.gitignore
"
file in repo
And
I click button
"edit"
Then
I can edit code
@javascript
Scenario
:
I
can see editing preview
Given
I click on
"
Gemfile.lock
"
file in repo
Given
I click on
"
.gitignore
"
file in repo
And
I click button
"edit"
And
I edit code
And
I click link
"Diff"
Then
I see diff
Scenario
:
I
can browse directory with Browse Dir
Given
I click on
app
directory
Given
I click on
files
directory
And
I click on history link
Then
I see Browse dir link
...
...
features/project/source/git_blame.feature
View file @
bb2f4d66
...
...
@@ -5,6 +5,6 @@ Feature: Project Browse git repo
Given
I visit project source page
Scenario
:
I
blame file
Given
I click on
"
Gemfile.lock
"
file in repo
Given
I click on
"
.gitignore
"
file in repo
And
I click blame button
Then
I should see git file blame
features/project/source/multiselect_blob.feature
View file @
bb2f4d66
...
...
@@ -2,7 +2,7 @@ Feature: Project Multiselect Blob
Background
:
Given
I sign in as a user
And
I own project
"Shop"
And
I visit
"
Gemfile.lock
"
file in repo
And
I visit
"
.gitignore
"
file in repo
@javascript
Scenario
:
I
click line 1 in file
...
...
features/project/source/search_code.feature
View file @
bb2f4d66
...
...
@@ -4,6 +4,6 @@ Feature: Project Search code
And
I own project
"Shop"
Given
I visit project source page
Scenario
:
Search for term "
Welcome to GitLab
"
When
I search for term
"
Welcome to GitLab
"
Then
I should see files from repository containing
"
Welcome to GitLab"
Scenario
:
Search for term "
coffee
"
When
I search for term
"
coffee
"
Then
I should see files from repository containing
"
coffee"
features/steps/project/browse_files.rb
View file @
bb2f4d66
...
...
@@ -4,24 +4,23 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
include
SharedPaths
step
'I should see files from repository'
do
page
.
should
have_content
"
app
"
page
.
should
have_content
"
history
"
page
.
should
have_content
"
Gemfile
"
page
.
should
have_content
"
VERSION
"
page
.
should
have_content
"
.gitignore
"
page
.
should
have_content
"
LICENSE
"
end
step
'I should see files from repository for "8470d70"'
do
current_path
.
should
==
project_tree_path
(
@project
,
"8470d70"
)
page
.
should
have_content
"app"
page
.
should
have_content
"history"
page
.
should
have_content
"Gemfile"
step
'I should see files from repository for "6d39438"'
do
current_path
.
should
==
project_tree_path
(
@project
,
"6d39438"
)
page
.
should
have_content
".gitignore"
page
.
should
have_content
"LICENSE"
end
step
'I click on "
Gemfile.lock
" file in repo'
do
click_link
"
Gemfile.lock
"
step
'I click on "
.gitignore
" file in repo'
do
click_link
"
.gitignore
"
end
step
'I should see it content'
do
page
.
should
have_content
"
DEPENDENCIES
"
page
.
should
have_content
"
*.rbc
"
end
step
'I click link "raw"'
do
...
...
@@ -63,8 +62,8 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page
.
should
have_content
"Commit message"
end
step
'I click on
app
directory'
do
click_link
'
app
'
step
'I click on
files
directory'
do
click_link
'
files
'
end
step
'I click on history link'
do
...
...
features/steps/project/browse_git_repo.rb
View file @
bb2f4d66
...
...
@@ -3,8 +3,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps
include
SharedProject
include
SharedPaths
Given
'I click on "
Gemfile.lock
" file in repo'
do
click_link
"
Gemfile.lock
"
Given
'I click on "
.gitignore
" file in repo'
do
click_link
"
.gitignore
"
end
And
'I click blame button'
do
...
...
@@ -12,8 +12,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps
end
Then
'I should see git file blame'
do
page
.
should
have_content
"
DEPENDENCIES
"
page
.
should
have_content
"
*.rb
"
page
.
should
have_content
"Dmitriy Zaporozhets"
page
.
should
have_content
"
Moving to rails 3.2
"
page
.
should
have_content
"
Initial commit
"
end
end
features/steps/project/multiselect_blob.rb
View file @
bb2f4d66
...
...
@@ -52,7 +52,7 @@ class ProjectMultiselectBlob < Spinach::FeatureSteps
page
.
evaluate_script
(
"window.history.forward()"
)
end
step
'I click on "
Gemfile.lock
" file in repo'
do
click_link
"
Gemfile.lock
"
step
'I click on "
.gitignore
" file in repo'
do
click_link
"
.gitignore
"
end
end
features/steps/project/search_code.rb
View file @
bb2f4d66
...
...
@@ -3,15 +3,14 @@ class ProjectSearchCode < Spinach::FeatureSteps
include
SharedProject
include
SharedPaths
When
'I search for term "
Welcome to GitLab
"'
do
fill_in
"search"
,
with:
"
Welcome to GitLab
"
When
'I search for term "
coffee
"'
do
fill_in
"search"
,
with:
"
coffee
"
click_button
"Go"
click_link
'Repository Code'
end
Then
'I should see files from repository containing "
Welcome to GitLab
"'
do
page
.
should
have_content
"
Welcome to GitLab
"
page
.
should
have_content
"
GitLab is a free project and repository management application
"
Then
'I should see files from repository containing "
coffee
"'
do
page
.
should
have_content
"
coffee
"
page
.
should
have_content
"
CONTRIBUTING.md
"
end
end
features/steps/shared/paths.rb
View file @
bb2f4d66
...
...
@@ -260,12 +260,12 @@ module SharedPaths
visit
project_blob_path
(
@project
,
File
.
join
(
ValidCommit
::
ID
,
ValidCommit
::
BLOB_FILE_PATH
))
end
step
'I visit "
Gemfile.lock
" file in repo'
do
visit
project_blob_path
(
@project
,
File
.
join
(
root_ref
,
'
Gemfile.lock
'
))
step
'I visit "
.gitignore
" file in repo'
do
visit
project_blob_path
(
@project
,
File
.
join
(
root_ref
,
'
.gitignore
'
))
end
step
'I visit project source page for "
8470d70
"'
do
visit
project_tree_path
(
@project
,
"
8470d70
"
)
step
'I visit project source page for "
6d39438
"'
do
visit
project_tree_path
(
@project
,
"
6d39438
"
)
end
step
'I visit project tags page'
do
...
...
spec/support/valid_commit.rb
View file @
bb2f4d66
module
ValidCommit
ID
=
"8470d70da67355c9c009e4401746b1d5410af2e3"
MESSAGE
=
"notes controller refactored"
ID
=
"570e7b2abdd848b95f2f578043fc23bd6f6fd24d"
MESSAGE
=
<<
eos
Change some files
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
eos
AUTHOR_FULL_NAME
=
"Dmitriy Zaporozhets"
AUTHOR_EMAIL
=
"dmitriy.zaporozhets@gmail.com"
...
...
@@ -10,7 +13,15 @@ module ValidCommit
C_FILE_PATH
=
"app/models"
C_FILES
=
[
".gitkeep"
,
"ability.rb"
,
"commit.rb"
,
"issue.rb"
,
"key.rb"
,
"mailer_observer.rb"
,
"merge_request.rb"
,
"note.rb"
,
"project.rb"
,
"protected_branch.rb"
,
"repository.rb"
,
"snippet.rb"
,
"tree.rb"
,
"user.rb"
,
"users_project.rb"
,
"web_hook.rb"
,
"wiki.rb"
]
BLOB_FILE
=
%{%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => \"btn danger delete-key\"\n\n\n}
BLOB_FILE_PATH
=
"app/views/keys/show.html.haml"
BLOB_FILE
=
<<
eos
class Commit
constructor: ->
$('.files .diff-file').each ->
new CommitFile(this)
@Commit = Commit
eos
BLOB_FILE_PATH
=
"files/js/commit.js.coffee"
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