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
Boxiang Sun
gitlab-ce
Commits
aef34502
Commit
aef34502
authored
Mar 28, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `:empty_project` where possible in top-level feature specs
parent
b8b6ab6b
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
56 additions
and
44 deletions
+56
-44
spec/features/auto_deploy_spec.rb
spec/features/auto_deploy_spec.rb
+1
-1
spec/features/calendar_spec.rb
spec/features/calendar_spec.rb
+1
-1
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+1
-1
spec/features/copy_as_gfm_spec.rb
spec/features/copy_as_gfm_spec.rb
+1
-1
spec/features/cycle_analytics_spec.rb
spec/features/cycle_analytics_spec.rb
+1
-1
spec/features/dashboard_issues_spec.rb
spec/features/dashboard_issues_spec.rb
+1
-1
spec/features/expand_collapse_diffs_spec.rb
spec/features/expand_collapse_diffs_spec.rb
+1
-1
spec/features/gitlab_flavored_markdown_spec.rb
spec/features/gitlab_flavored_markdown_spec.rb
+15
-13
spec/features/global_search_spec.rb
spec/features/global_search_spec.rb
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+11
-9
spec/features/participants_autocomplete_spec.rb
spec/features/participants_autocomplete_spec.rb
+3
-1
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+6
-6
spec/features/protected_branches_spec.rb
spec/features/protected_branches_spec.rb
+1
-1
spec/features/protected_tags_spec.rb
spec/features/protected_tags_spec.rb
+1
-1
spec/features/search_spec.rb
spec/features/search_spec.rb
+6
-1
spec/features/task_lists_spec.rb
spec/features/task_lists_spec.rb
+2
-1
spec/features/variables_spec.rb
spec/features/variables_spec.rb
+1
-1
spec/support/markdown_feature.rb
spec/support/markdown_feature.rb
+2
-2
No files found.
spec/features/auto_deploy_spec.rb
View file @
aef34502
...
...
@@ -4,7 +4,7 @@ describe 'Auto deploy' do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
project
.
create_kubernetes_service
(
...
...
spec/features/calendar_spec.rb
View file @
aef34502
...
...
@@ -4,7 +4,7 @@ feature 'Contributions Calendar', :feature, :js do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:contributed_project
)
{
create
(
:project
,
:public
)
}
let
(
:contributed_project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:issue_note
)
{
create
(
:note
,
project:
contributed_project
)
}
# Ex/ Sunday Jan 1, 2016
...
...
spec/features/commits_spec.rb
View file @
aef34502
...
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
'Commits'
do
include
CiStatusHelper
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
describe
'CI'
do
before
do
...
...
spec/features/copy_as_gfm_spec.rb
View file @
aef34502
...
...
@@ -433,7 +433,7 @@ describe 'Copy as GFM', feature: true, js: true do
end
describe
'Copying code'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
context
'from a diff'
do
before
do
...
...
spec/features/cycle_analytics_spec.rb
View file @
aef34502
...
...
@@ -5,7 +5,7 @@ feature 'Cycle Analytics', feature: true, js: true do
let
(
:user
)
{
create
(
:user
)
}
let
(
:guest
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
created_at:
2
.
days
.
ago
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
(
:mr
)
{
create_merge_request_closing_issue
(
issue
)
}
...
...
spec/features/dashboard_issues_spec.rb
View file @
aef34502
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
"Dashboard Issues filtering"
,
feature:
true
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
context
'filtering by milestone'
do
...
...
spec/features/expand_collapse_diffs_spec.rb
View file @
aef34502
...
...
@@ -4,7 +4,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
include
WaitForAjax
let
(
:branch
)
{
'expand-collapse-diffs'
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
login_as
:admin
...
...
spec/features/gitlab_flavored_markdown_spec.rb
View file @
aef34502
require
'spec_helper'
describe
"GitLab Flavored Markdown"
,
feature:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
,
target_project:
project
)
}
let
(
:fred
)
do
u
=
create
(
:user
,
name:
"fred"
)
project
.
team
<<
[
u
,
:master
]
u
create
(
:user
,
name:
'fred'
)
do
|
user
|
project
.
add_master
(
user
)
end
end
before
do
allow_any_instance_of
(
Commit
).
to
receive
(
:title
).
and_return
(
"fix
#{
issue
.
to_reference
}
\n\n
ask
#{
fred
.
to_reference
}
for details"
)
login_as
(
:user
)
project
.
add_developer
(
@user
)
end
let
(
:commit
)
{
project
.
commit
}
describe
"for commits"
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:commit
)
{
project
.
commit
}
before
do
login_as
:user
project
.
team
<<
[
@user
,
:developer
]
end
before
do
allow_any_instance_of
(
Commit
).
to
receive
(
:title
).
and_return
(
"fix
#{
issue
.
to_reference
}
\n\n
ask
#{
fred
.
to_reference
}
for details"
)
end
describe
"for commits"
do
it
"renders title in commits#index"
do
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
'master'
,
limit:
1
)
...
...
@@ -92,6 +92,8 @@ describe "GitLab Flavored Markdown", feature: true do
end
describe
"for merge requests"
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
@merge_request
=
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
title:
"fix
#{
issue
.
to_reference
}
"
)
end
...
...
spec/features/global_search_spec.rb
View file @
aef34502
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Global search'
,
feature:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
before
do
project
.
team
<<
[
user
,
:master
]
...
...
spec/features/issues_spec.rb
View file @
aef34502
...
...
@@ -6,20 +6,13 @@ describe 'Issues', feature: true do
include
SortingHelper
include
WaitForAjax
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
before
do
login_as
:user
user2
=
create
(
:user
)
project
.
team
<<
[[
@user
,
user2
],
:developer
]
project
.
repository
.
create_file
(
@user
,
'.gitlab/issue_templates/bug.md'
,
'this is a test "bug" template'
,
message:
'added issue template'
,
branch_name:
'master'
)
end
describe
'Edit issue'
do
...
...
@@ -378,7 +371,7 @@ describe 'Issues', feature: true do
end
describe
'when I want to reset my incoming email token'
do
let
(
:project1
)
{
create
(
:project
,
namespace:
@user
.
namespace
)
}
let
(
:project1
)
{
create
(
:
empty_
project
,
namespace:
@user
.
namespace
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project1
)
}
before
do
...
...
@@ -609,7 +602,16 @@ describe 'Issues', feature: true do
end
context
'form filled by URL parameters'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
before
do
project
.
repository
.
create_file
(
@user
,
'.gitlab/issue_templates/bug.md'
,
'this is a test "bug" template'
,
message:
'added issue template'
,
branch_name:
'master'
)
visit
new_namespace_project_issue_path
(
project
.
namespace
,
project
,
issuable_template:
'bug'
)
end
...
...
spec/features/participants_autocomplete_spec.rb
View file @
aef34502
require
'spec_helper'
feature
'Member autocomplete'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:author
)
{
create
(
:user
)
}
let
(
:note
)
{
create
(
:note
,
noteable:
noteable
,
project:
noteable
.
project
)
}
...
...
@@ -36,6 +36,7 @@ feature 'Member autocomplete', :js do
end
context
'adding a new note on a Merge Request'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:noteable
)
do
create
(
:merge_request
,
source_project:
project
,
target_project:
project
,
author:
author
)
...
...
@@ -48,6 +49,7 @@ feature 'Member autocomplete', :js do
end
context
'adding a new note on a Commit'
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:noteable
)
{
project
.
commit
}
let
(
:note
)
{
create
(
:note_on_commit
,
project:
project
,
commit_id:
project
.
commit
.
id
)
}
...
...
spec/features/projects_spec.rb
View file @
aef34502
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Project'
,
feature:
true
do
describe
'description'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:path
)
{
namespace_project_path
(
project
.
namespace
,
project
)
}
before
do
...
...
@@ -36,7 +36,7 @@ feature 'Project', feature: true do
describe
'remove forked relationship'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
before
do
login_with
user
...
...
@@ -57,7 +57,7 @@ feature 'Project', feature: true do
describe
'removal'
,
js:
true
do
let
(
:user
)
{
create
(
:user
,
username:
'test'
,
name:
'test'
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
,
name:
'project1'
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
,
name:
'project1'
)
}
before
do
login_with
(
user
)
...
...
@@ -78,7 +78,7 @@ feature 'Project', feature: true do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
before
do
login_with
(
user
)
...
...
@@ -94,8 +94,8 @@ feature 'Project', feature: true do
describe
'project title'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project2
)
{
create
(
:project
,
namespace:
user
.
namespace
,
path:
'test'
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
let
(
:project2
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
,
path:
'test'
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
context
'on issues page'
,
js:
true
do
...
...
spec/features/protected_branches_spec.rb
View file @
aef34502
...
...
@@ -5,7 +5,7 @@ feature 'Projected Branches', feature: true, js: true do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
,
:admin
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
{
login_as
(
user
)
}
...
...
spec/features/protected_tags_spec.rb
View file @
aef34502
...
...
@@ -5,7 +5,7 @@ feature 'Projected Tags', feature: true, js: true do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
,
:admin
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
{
login_as
(
user
)
}
...
...
spec/features/search_spec.rb
View file @
aef34502
...
...
@@ -5,7 +5,7 @@ describe "Search", feature: true do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
assignee:
user
)
}
let!
(
:issue2
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
...
...
@@ -62,6 +62,7 @@ describe "Search", feature: true do
context
'search for comments'
do
context
'when comment belongs to a invalid commit'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:note
)
{
create
(
:note_on_commit
,
author:
user
,
project:
project
,
commit_id:
project
.
repository
.
commit
.
id
,
note:
'Bug here'
)
}
before
{
note
.
update_attributes
(
commit_id:
12345678
)
}
...
...
@@ -103,6 +104,7 @@ describe "Search", feature: true do
end
it
'finds a commit'
do
project
=
create
(
:project
,
:repository
)
{
|
p
|
p
.
add_reporter
(
user
)
}
visit
namespace_project_path
(
project
.
namespace
,
project
)
page
.
within
'.search'
do
...
...
@@ -116,6 +118,7 @@ describe "Search", feature: true do
end
it
'finds a code'
do
project
=
create
(
:project
,
:repository
)
{
|
p
|
p
.
add_reporter
(
user
)
}
visit
namespace_project_path
(
project
.
namespace
,
project
)
page
.
within
'.search'
do
...
...
@@ -222,6 +225,8 @@ describe "Search", feature: true do
end
describe
'search for commits'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
visit
search_path
(
project_id:
project
.
id
)
end
...
...
spec/features/task_lists_spec.rb
View file @
aef34502
...
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'Task Lists'
,
feature:
true
do
include
Warden
::
Test
::
Helpers
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
...
...
@@ -240,6 +240,7 @@ feature 'Task Lists', feature: true do
end
describe
'multiple tasks'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let!
(
:merge
)
{
create
(
:merge_request
,
:simple
,
description:
markdown
,
author:
user
,
source_project:
project
)
}
it
'renders for description'
do
...
...
spec/features/variables_spec.rb
View file @
aef34502
...
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Project variables'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:variable
)
{
create
(
:ci_variable
,
key:
'test_key'
,
value:
'test value'
)
}
before
do
...
...
spec/support/markdown_feature.rb
View file @
aef34502
...
...
@@ -23,7 +23,7 @@ class MarkdownFeature
# Direct references ----------------------------------------------------------
def
project
@project
||=
create
(
:project
).
tap
do
|
project
|
@project
||=
create
(
:project
,
:repository
).
tap
do
|
project
|
project
.
team
<<
[
user
,
:master
]
end
end
...
...
@@ -80,7 +80,7 @@ class MarkdownFeature
def
xproject
@xproject
||=
begin
group
=
create
(
:group
,
:nested
)
create
(
:project
,
namespace:
group
)
do
|
project
|
create
(
:project
,
:repository
,
namespace:
group
)
do
|
project
|
project
.
team
<<
[
user
,
:developer
]
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