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
b2370fef
Commit
b2370fef
authored
Apr 13, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
2f18c77e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
19 deletions
+9
-19
features/project/source/browse_files.feature
features/project/source/browse_files.feature
+0
-13
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+2
-2
spec/features/projects/files/project_owner_creates_license_file_spec.rb
...projects/files/project_owner_creates_license_file_spec.rb
+1
-1
spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
...sees_link_to_create_license_file_in_empty_project_spec.rb
+6
-3
No files found.
features/project/source/browse_files.feature
View file @
b2370fef
...
@@ -123,19 +123,6 @@ Feature: Project Source Browse Files
...
@@ -123,19 +123,6 @@ Feature: Project Source Browse Files
And
I am redirected to the fork's new merge request page
And
I am redirected to the fork's new merge request page
And
I can see the replacement commit message
And
I can see the replacement commit message
@javascript
Scenario
:
I
can create file in empty repo
Given
I own an empty project
And
I visit my empty project page
And
I create bare repo
When
I click on
"add a file"
link
And
I edit code
And
I fill the new file name
And
I fill the commit message
And
I click on
"Commit Changes"
Then
I am redirected to the new file
And
I should see its new content
@javascript
@javascript
Scenario
:
If I enter an illegal file name I see an error message
Scenario
:
If I enter an illegal file name I see an error message
Given
I click on
"New file"
link in repo
Given
I click on
"New file"
link in repo
...
...
features/steps/project/source/browse_files.rb
View file @
b2370fef
...
@@ -282,8 +282,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -282,8 +282,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_link
'Create empty bare repository'
click_link
'Create empty bare repository'
end
end
step
'I click on "
add a file
" link'
do
step
'I click on "
README
" link'
do
click_link
'
adding a
README'
click_link
'README'
# Remove pre-receive hook so we can push without auth
# Remove pre-receive hook so we can push without auth
FileUtils
.
rm_f
(
File
.
join
(
@project
.
repository
.
path
,
'hooks'
,
'pre-receive'
))
FileUtils
.
rm_f
(
File
.
join
(
@project
.
repository
.
path
,
'hooks'
,
'pre-receive'
))
...
...
spec/features/projects/files/project_owner_creates_license_file_spec.rb
View file @
b2370fef
require
'spec_helper'
require
'spec_helper'
feature
'creates a license file'
,
feature:
true
,
js:
true
do
feature
'
project owner
creates a license file'
,
feature:
true
,
js:
true
do
include
Select2Helper
include
Select2Helper
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project_master
)
{
create
(
:user
)
}
...
...
spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
View file @
b2370fef
require
'spec_helper'
require
'spec_helper'
feature
'
creates
a license file in empty project'
,
feature:
true
,
js:
true
do
feature
'
project owner sees a link to create
a license file in empty project'
,
feature:
true
,
js:
true
do
include
Select2Helper
include
Select2Helper
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:
project_empty_repo
)
}
let
(
:project
)
{
create
(
:
empty_project
)
}
background
do
background
do
project
.
team
<<
[
project_master
,
:master
]
project
.
team
<<
[
project_master
,
:master
]
login_as
(
project_master
)
login_as
(
project_master
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
end
end
scenario
'project master creates a license file from a template'
do
scenario
'project master creates a license file from a template'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
click_link
'Create empty bare repository'
click_on
'LICENSE'
click_on
'LICENSE'
expect
(
current_path
).
to
eq
(
expect
(
current_path
).
to
eq
(
...
@@ -26,6 +27,8 @@ feature 'creates a license file in empty project', feature: true, js: true do
...
@@ -26,6 +27,8 @@ feature 'creates a license file in empty project', feature: true, js: true do
expect
(
file_content
).
to
have_content
(
"Copyright (c) 2016
#{
project
.
namespace
.
human_name
}
"
)
expect
(
file_content
).
to
have_content
(
"Copyright (c) 2016
#{
project
.
namespace
.
human_name
}
"
)
fill_in
:commit_message
,
with:
'Add a LICENSE file'
,
visible:
true
fill_in
:commit_message
,
with:
'Add a LICENSE file'
,
visible:
true
# Remove pre-receive hook so we can push without auth
FileUtils
.
rm_f
(
File
.
join
(
project
.
repository
.
path
,
'hooks'
,
'pre-receive'
))
click_button
'Commit Changes'
click_button
'Commit Changes'
expect
(
current_path
).
to
eq
(
expect
(
current_path
).
to
eq
(
...
...
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