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
1a0064dc
Commit
1a0064dc
authored
Jul 24, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `empty_project` where possible in spec/features/projects
parent
bc0d8112
Changes
73
Show whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
95 additions
and
97 deletions
+95
-97
spec/features/projects/artifacts/browse_spec.rb
spec/features/projects/artifacts/browse_spec.rb
+2
-2
spec/features/projects/artifacts/download_spec.rb
spec/features/projects/artifacts/download_spec.rb
+2
-2
spec/features/projects/artifacts/file_spec.rb
spec/features/projects/artifacts/file_spec.rb
+2
-2
spec/features/projects/artifacts/raw_spec.rb
spec/features/projects/artifacts/raw_spec.rb
+2
-2
spec/features/projects/badges/coverage_spec.rb
spec/features/projects/badges/coverage_spec.rb
+2
-2
spec/features/projects/badges/list_spec.rb
spec/features/projects/badges/list_spec.rb
+1
-1
spec/features/projects/blobs/blob_show_spec.rb
spec/features/projects/blobs/blob_show_spec.rb
+1
-1
spec/features/projects/branches/download_buttons_spec.rb
spec/features/projects/branches/download_buttons_spec.rb
+1
-1
spec/features/projects/branches/new_branch_ref_dropdown_spec.rb
...eatures/projects/branches/new_branch_ref_dropdown_spec.rb
+1
-1
spec/features/projects/branches_spec.rb
spec/features/projects/branches_spec.rb
+1
-1
spec/features/projects/commit/builds_spec.rb
spec/features/projects/commit/builds_spec.rb
+1
-1
spec/features/projects/commit/cherry_pick_spec.rb
spec/features/projects/commit/cherry_pick_spec.rb
+1
-1
spec/features/projects/commit/mini_pipeline_graph_spec.rb
spec/features/projects/commit/mini_pipeline_graph_spec.rb
+1
-1
spec/features/projects/compare_spec.rb
spec/features/projects/compare_spec.rb
+1
-1
spec/features/projects/edit_spec.rb
spec/features/projects/edit_spec.rb
+3
-3
spec/features/projects/environments/environment_spec.rb
spec/features/projects/environments/environment_spec.rb
+1
-1
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+1
-1
spec/features/projects/features_visibility_spec.rb
spec/features/projects/features_visibility_spec.rb
+2
-2
spec/features/projects/files/browse_files_spec.rb
spec/features/projects/files/browse_files_spec.rb
+1
-1
spec/features/projects/files/creating_a_file_spec.rb
spec/features/projects/files/creating_a_file_spec.rb
+1
-1
spec/features/projects/files/dockerfile_dropdown_spec.rb
spec/features/projects/files/dockerfile_dropdown_spec.rb
+1
-1
spec/features/projects/files/download_buttons_spec.rb
spec/features/projects/files/download_buttons_spec.rb
+1
-1
spec/features/projects/files/edit_file_soft_wrap_spec.rb
spec/features/projects/files/edit_file_soft_wrap_spec.rb
+1
-1
spec/features/projects/files/editing_a_file_spec.rb
spec/features/projects/files/editing_a_file_spec.rb
+1
-1
spec/features/projects/files/find_file_keyboard_spec.rb
spec/features/projects/files/find_file_keyboard_spec.rb
+1
-1
spec/features/projects/files/find_files_spec.rb
spec/features/projects/files/find_files_spec.rb
+1
-1
spec/features/projects/files/gitignore_dropdown_spec.rb
spec/features/projects/files/gitignore_dropdown_spec.rb
+1
-1
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
+1
-1
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/template_type_dropdown_spec.rb
spec/features/projects/files/template_type_dropdown_spec.rb
+1
-1
spec/features/projects/files/undo_template_spec.rb
spec/features/projects/files/undo_template_spec.rb
+1
-1
spec/features/projects/gfm_autocomplete_load_spec.rb
spec/features/projects/gfm_autocomplete_load_spec.rb
+1
-1
spec/features/projects/group_links_spec.rb
spec/features/projects/group_links_spec.rb
+2
-2
spec/features/projects/import_export/import_file_spec.rb
spec/features/projects/import_export/import_file_spec.rb
+2
-2
spec/features/projects/issuable_templates_spec.rb
spec/features/projects/issuable_templates_spec.rb
+2
-2
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
spec/features/projects/labels/issues_sorted_by_priority_spec.rb
...eatures/projects/labels/issues_sorted_by_priority_spec.rb
+1
-1
spec/features/projects/main/download_buttons_spec.rb
spec/features/projects/main/download_buttons_spec.rb
+1
-1
spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
...s/members/group_member_cannot_leave_group_project_spec.rb
+1
-1
spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb
...member_cannot_request_access_to_his_group_project_spec.rb
+1
-1
spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb
.../group_requester_cannot_request_access_to_project_spec.rb
+1
-1
spec/features/projects/members/list_spec.rb
spec/features/projects/members/list_spec.rb
+1
-1
spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
...s/members/master_adds_member_with_expiration_date_spec.rb
+1
-1
spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb
...mbers/member_cannot_request_access_to_his_project_spec.rb
+1
-1
spec/features/projects/members/member_leaves_project_spec.rb
spec/features/projects/members/member_leaves_project_spec.rb
+1
-1
spec/features/projects/members/owner_cannot_leave_project_spec.rb
...tures/projects/members/owner_cannot_leave_project_spec.rb
+1
-1
spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
...embers/owner_cannot_request_access_to_his_project_spec.rb
+1
-1
spec/features/projects/members/user_requests_access_spec.rb
spec/features/projects/members/user_requests_access_spec.rb
+1
-1
spec/features/projects/merge_request_button_spec.rb
spec/features/projects/merge_request_button_spec.rb
+2
-2
spec/features/projects/merge_requests/list_spec.rb
spec/features/projects/merge_requests/list_spec.rb
+1
-1
spec/features/projects/no_password_spec.rb
spec/features/projects/no_password_spec.rb
+1
-1
spec/features/projects/pipeline_schedules_spec.rb
spec/features/projects/pipeline_schedules_spec.rb
+1
-1
spec/features/projects/pipelines/pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+3
-3
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+6
-6
spec/features/projects/project_settings_spec.rb
spec/features/projects/project_settings_spec.rb
+2
-4
spec/features/projects/ref_switcher_spec.rb
spec/features/projects/ref_switcher_spec.rb
+1
-1
spec/features/projects/services/slack_service_spec.rb
spec/features/projects/services/slack_service_spec.rb
+1
-1
spec/features/projects/services/slack_slash_command_spec.rb
spec/features/projects/services/slack_slash_command_spec.rb
+1
-1
spec/features/projects/settings/visibility_settings_spec.rb
spec/features/projects/settings/visibility_settings_spec.rb
+1
-1
spec/features/projects/shortcuts_spec.rb
spec/features/projects/shortcuts_spec.rb
+1
-1
spec/features/projects/snippets/create_snippet_spec.rb
spec/features/projects/snippets/create_snippet_spec.rb
+1
-1
spec/features/projects/user_browses_files_spec.rb
spec/features/projects/user_browses_files_spec.rb
+1
-1
spec/features/projects/user_creates_directory_spec.rb
spec/features/projects/user_creates_directory_spec.rb
+1
-1
spec/features/projects/user_creates_files_spec.rb
spec/features/projects/user_creates_files_spec.rb
+1
-1
spec/features/projects/user_deletes_files_spec.rb
spec/features/projects/user_deletes_files_spec.rb
+1
-1
spec/features/projects/user_edits_files_spec.rb
spec/features/projects/user_edits_files_spec.rb
+1
-1
spec/features/projects/user_replaces_files_spec.rb
spec/features/projects/user_replaces_files_spec.rb
+1
-1
spec/features/projects/user_uploads_files_spec.rb
spec/features/projects/user_uploads_files_spec.rb
+1
-1
spec/features/projects/wiki/markdown_preview_spec.rb
spec/features/projects/wiki/markdown_preview_spec.rb
+1
-1
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+2
-2
spec/features/projects/wiki/user_git_access_wiki_page_spec.rb
.../features/projects/wiki/user_git_access_wiki_page_spec.rb
+1
-1
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+2
-2
spec/features/projects/wiki/user_views_project_wiki_page_spec.rb
...atures/projects/wiki/user_views_project_wiki_page_spec.rb
+1
-1
No files found.
spec/features/projects/artifacts/browse_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Browse artifact'
,
:js
do
feature
'Browse artifact'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
'master'
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
)
}
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
def
browse_path
(
path
)
def
browse_path
(
path
)
...
...
spec/features/projects/artifacts/download_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Download artifact'
,
:js
do
feature
'Download artifact'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
status: :success
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
'master'
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
status: :success
,
project:
project
)
}
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
:success
,
pipeline:
pipeline
)
}
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
:success
,
pipeline:
pipeline
)
}
shared_examples
'downloading'
do
shared_examples
'downloading'
do
...
...
spec/features/projects/artifacts/file_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Artifact file'
,
:js
do
feature
'Artifact file'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
'master'
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
)
}
let
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
def
visit_file
(
path
)
def
visit_file
(
path
)
...
...
spec/features/projects/artifacts/raw_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Raw artifact'
,
:js
do
feature
'Raw artifact'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
'master'
)
}
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
)
}
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
let
(
:job
)
{
create
(
:ci_build
,
:artifacts
,
pipeline:
pipeline
)
}
def
raw_path
(
path
)
def
raw_path
(
path
)
...
...
spec/features/projects/badges/coverage_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'test coverage badge'
do
feature
'test coverage badge'
do
given!
(
:user
)
{
create
(
:user
)
}
given!
(
:user
)
{
create
(
:user
)
}
given!
(
:project
)
{
create
(
:project
,
:private
)
}
given!
(
:project
)
{
create
(
:
empty_
project
,
:private
)
}
context
'when user has access to view badge'
do
context
'when user has access to view badge'
do
background
do
background
do
...
@@ -55,7 +55,7 @@ feature 'test coverage badge' do
...
@@ -55,7 +55,7 @@ feature 'test coverage badge' do
end
end
def
create_pipeline
def
create_pipeline
opts
=
{
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
}
opts
=
{
project:
project
}
create
(
:ci_pipeline
,
opts
).
tap
do
|
pipeline
|
create
(
:ci_pipeline
,
opts
).
tap
do
|
pipeline
|
yield
pipeline
yield
pipeline
...
...
spec/features/projects/badges/list_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'list of badges'
do
feature
'list of badges'
do
background
do
background
do
user
=
create
(
:user
)
user
=
create
(
:user
)
project
=
create
(
:project
)
project
=
create
(
:project
,
:repository
)
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
sign_in
(
user
)
sign_in
(
user
)
visit
project_pipelines_settings_path
(
project
)
visit
project_pipelines_settings_path
(
project
)
...
...
spec/features/projects/blobs/blob_show_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'File blob'
,
:js
do
feature
'File blob'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
def
visit_blob
(
path
,
anchor:
nil
,
ref:
'master'
)
def
visit_blob
(
path
,
anchor:
nil
,
ref:
'master'
)
visit
project_blob_path
(
project
,
File
.
join
(
ref
,
path
),
anchor:
anchor
)
visit
project_blob_path
(
project
,
File
.
join
(
ref
,
path
),
anchor:
anchor
)
...
...
spec/features/projects/branches/download_buttons_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ feature 'Download buttons in branches page' do
...
@@ -4,7 +4,7 @@ feature 'Download buttons in branches page' do
given
(
:user
)
{
create
(
:user
)
}
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:status
)
{
'success'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
given
(
:pipeline
)
do
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
create
(
:ci_pipeline
,
...
...
spec/features/projects/branches/new_branch_ref_dropdown_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'New Branch Ref Dropdown'
,
:js
do
describe
'New Branch Ref Dropdown'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:toggle
)
{
find
(
'.create-from .dropdown-menu-toggle'
)
}
let
(
:toggle
)
{
find
(
'.create-from .dropdown-menu-toggle'
)
}
before
do
before
do
...
...
spec/features/projects/branches_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Branches'
do
describe
'Branches'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
let
(
:repository
)
{
project
.
repository
}
def
set_protected_branch_name
(
branch_name
)
def
set_protected_branch_name
(
branch_name
)
...
...
spec/features/projects/commit/builds_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'project commit pipelines'
,
js:
true
do
feature
'project commit pipelines'
,
js:
true
do
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
background
do
background
do
user
=
create
(
:user
)
user
=
create
(
:user
)
...
...
spec/features/projects/commit/cherry_pick_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
'Cherry-pick Commits'
do
describe
'Cherry-pick Commits'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
group
)
}
let
(
:master_pickable_commit
)
{
project
.
commit
(
'7d3b0f7cff5f37573aea97cebfd5692ea1689924'
)
}
let
(
:master_pickable_commit
)
{
project
.
commit
(
'7d3b0f7cff5f37573aea97cebfd5692ea1689924'
)
}
let
(
:master_pickable_merge
)
{
project
.
commit
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
let
(
:master_pickable_merge
)
{
project
.
commit
(
'e56497bb5f03a90a51293fc6d516788730953899'
)
}
...
...
spec/features/projects/commit/mini_pipeline_graph_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'rails_helper'
...
@@ -2,7 +2,7 @@ require 'rails_helper'
feature
'Mini Pipeline Graph in Commit View'
,
:js
do
feature
'Mini Pipeline Graph in Commit View'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
...
...
spec/features/projects/compare_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require "spec_helper"
...
@@ -2,7 +2,7 @@ require "spec_helper"
describe
"Compare"
,
js:
true
do
describe
"Compare"
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
...
spec/features/projects/edit_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'rails_helper'
...
@@ -2,7 +2,7 @@ require 'rails_helper'
feature
'Project edit'
,
js:
true
do
feature
'Project edit'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
@@ -20,7 +20,7 @@ feature 'Project edit', js: true do
...
@@ -20,7 +20,7 @@ feature 'Project edit', js: true do
end
end
context
'given project with merge_requests_disabled access level'
do
context
'given project with merge_requests_disabled access level'
do
let
(
:project
)
{
create
(
:project
,
:merge_requests_disabled
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:merge_requests_disabled
)
}
it
'hides merge requests section'
do
it
'hides merge requests section'
do
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.merge-requests-feature'
,
visible:
false
)
...
@@ -36,7 +36,7 @@ feature 'Project edit', js: true do
...
@@ -36,7 +36,7 @@ feature 'Project edit', js: true do
end
end
context
'given project with builds_disabled access level'
do
context
'given project with builds_disabled access level'
do
let
(
:project
)
{
create
(
:project
,
:builds_disabled
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:builds_disabled
)
}
it
'hides builds select section'
do
it
'hides builds select section'
do
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.builds-feature'
,
visible:
false
)
...
...
spec/features/projects/environments/environment_spec.rb
View file @
1a0064dc
...
@@ -205,7 +205,7 @@ feature 'Environment' do
...
@@ -205,7 +205,7 @@ feature 'Environment' do
end
end
feature
'auto-close environment when branch is deleted'
do
feature
'auto-close environment when branch is deleted'
do
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
given!
(
:environment
)
do
given!
(
:environment
)
do
create
(
:environment
,
:with_review_app
,
project:
project
,
create
(
:environment
,
:with_review_app
,
project:
project
,
...
...
spec/features/projects/environments/environments_spec.rb
View file @
1a0064dc
...
@@ -111,7 +111,7 @@ feature 'Environments page', :js do
...
@@ -111,7 +111,7 @@ feature 'Environments page', :js do
end
end
context
'with deployments'
do
context
'with deployments'
do
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
given
(
:deployment
)
do
given
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
create
(
:deployment
,
environment:
environment
,
...
...
spec/features/projects/features_visibility_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Edit Project Settings'
do
describe
'Edit Project Settings'
do
let
(
:member
)
{
create
(
:user
)
}
let
(
:member
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
path:
'gitlab'
,
name:
'sample'
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:non_member
)
{
create
(
:user
)
}
let
(
:non_member
)
{
create
(
:user
)
}
...
@@ -249,7 +249,7 @@ describe 'Edit Project Settings' do
...
@@ -249,7 +249,7 @@ describe 'Edit Project Settings' do
# Regression spec for https://gitlab.com/gitlab-org/gitlab-ce/issues/24056
# Regression spec for https://gitlab.com/gitlab-org/gitlab-ce/issues/24056
describe
'project statistic visibility'
do
describe
'project statistic visibility'
do
let!
(
:project
)
{
create
(
:project
,
:private
)
}
let!
(
:project
)
{
create
(
:
empty_
project
,
:private
)
}
before
do
before
do
project
.
team
<<
[
member
,
:guest
]
project
.
team
<<
[
member
,
:guest
]
...
...
spec/features/projects/files/browse_files_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'user browses project'
,
js:
true
do
feature
'user browses project'
,
js:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
before
do
...
...
spec/features/projects/files/creating_a_file_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'User wants to create a file'
do
feature
'User wants to create a file'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
background
do
background
do
...
...
spec/features/projects/files/dockerfile_dropdown_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ require 'fileutils'
...
@@ -4,7 +4,7 @@ require 'fileutils'
feature 'User wants to add a Dockerfile file' do
feature 'User wants to add a Dockerfile file' do
before do
before do
user = create(:user)
user = create(:user)
project = create(:project)
project = create(:project
, :repository
)
project.team << [user, :master]
project.team << [user, :master]
sign_in user
sign_in user
...
...
spec/features/projects/files/download_buttons_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ feature 'Download buttons in files tree' do
...
@@ -4,7 +4,7 @@ feature 'Download buttons in files tree' do
given
(
:user
)
{
create
(
:user
)
}
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:status
)
{
'success'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
given
(
:pipeline
)
do
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
create
(
:ci_pipeline
,
...
...
spec/features/projects/files/edit_file_soft_wrap_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'User uses soft wrap whilst editing file'
,
js:
true
do
feature
'User uses soft wrap whilst editing file'
,
js:
true
do
before
do
before
do
user
=
create
(
:user
)
user
=
create
(
:user
)
project
=
create
(
:project
)
project
=
create
(
:project
,
:repository
)
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
sign_in
user
sign_in
user
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'test_file-name'
)
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'test_file-name'
)
...
...
spec/features/projects/files/editing_a_file_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'User wants to edit a file'
do
feature
'User wants to edit a file'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:commit_params
)
do
let
(
:commit_params
)
do
{
{
...
...
spec/features/projects/files/find_file_keyboard_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Find file keyboard shortcuts'
,
js:
true
do
feature
'Find file keyboard shortcuts'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
...
spec/features/projects/files/find_files_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Find files button in the tree header'
do
feature
'Find files button in the tree header'
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:user
)
{
create
(
:user
)
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
background
do
background
do
sign_in
(
user
)
sign_in
(
user
)
...
...
spec/features/projects/files/gitignore_dropdown_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'User wants to add a .gitignore file'
do
feature
'User wants to add a .gitignore file'
do
before
do
before
do
user
=
create
(
:user
)
user
=
create
(
:user
)
project
=
create
(
:project
)
project
=
create
(
:project
,
:repository
)
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
sign_in
user
sign_in
user
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitignore'
)
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitignore'
)
...
...
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'User wants to add a .gitlab-ci.yml file'
do
feature
'User wants to add a .gitlab-ci.yml file'
do
before
do
before
do
user
=
create
(
:user
)
user
=
create
(
:user
)
project
=
create
(
:project
)
project
=
create
(
:project
,
:repository
)
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
sign_in
user
sign_in
user
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitlab-ci.yml'
)
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitlab-ci.yml'
)
...
...
spec/features/projects/files/project_owner_creates_license_file_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'project owner creates a license file'
,
js:
true
do
feature
'project owner creates a license file'
,
js:
true
do
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
background
do
background
do
project
.
repository
.
delete_file
(
project_master
,
'LICENSE'
,
project
.
repository
.
delete_file
(
project_master
,
'LICENSE'
,
message:
'Remove LICENSE'
,
branch_name:
'master'
)
message:
'Remove LICENSE'
,
branch_name:
'master'
)
...
...
spec/features/projects/files/template_type_dropdown_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Template type dropdown selector'
,
js:
true
do
feature
'Template type dropdown selector'
,
js:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
before
do
...
...
spec/features/projects/files/undo_template_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Template Undo Button'
,
js:
true
do
feature
'Template Undo Button'
,
js:
true
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
before
do
...
...
spec/features/projects/gfm_autocomplete_load_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
describe
'GFM autocomplete loading'
,
js:
true
do
describe
'GFM autocomplete loading'
,
js:
true
do
let
(
:project
)
{
create
(
:
project
)
}
let
(
:project
)
{
create
(
:empty_
project
)
}
before
do
before
do
sign_in
(
create
(
:admin
))
sign_in
(
create
(
:admin
))
...
...
spec/features/projects/group_links_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ feature 'Project group links', :js do
...
@@ -4,7 +4,7 @@ feature 'Project group links', :js do
include
Select2Helper
include
Select2Helper
let
(
:master
)
{
create
(
:user
)
}
let
(
:master
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
background
do
background
do
...
@@ -35,7 +35,7 @@ feature 'Project group links', :js do
...
@@ -35,7 +35,7 @@ feature 'Project group links', :js do
context
'nested group project'
do
context
'nested group project'
do
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
nested_group
)
}
let!
(
:project
)
{
create
(
:
empty_
project
,
namespace:
nested_group
)
}
background
do
background
do
group
.
add_master
(
master
)
group
.
add_master
(
master
)
...
...
spec/features/projects/import_export/import_file_spec.rb
View file @
1a0064dc
...
@@ -46,7 +46,7 @@ feature 'Import/Export - project import integration test', js: true do
...
@@ -46,7 +46,7 @@ feature 'Import/Export - project import integration test', js: true do
end
end
scenario
'invalid project'
do
scenario
'invalid project'
do
project
=
create
(
:project
,
namespace:
namespace
)
project
=
create
(
:
empty_
project
,
namespace:
namespace
)
visit
new_project_path
visit
new_project_path
...
@@ -62,7 +62,7 @@ feature 'Import/Export - project import integration test', js: true do
...
@@ -62,7 +62,7 @@ feature 'Import/Export - project import integration test', js: true do
end
end
scenario
'project with no name'
do
scenario
'project with no name'
do
create
(
:project
,
namespace:
namespace
)
create
(
:
empty_
project
,
namespace:
namespace
)
visit
new_project_path
visit
new_project_path
...
...
spec/features/projects/issuable_templates_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'issuable templates'
,
js:
true
do
feature
'issuable templates'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
@@ -120,7 +120,7 @@ feature 'issuable templates', js: true do
...
@@ -120,7 +120,7 @@ feature 'issuable templates', js: true do
context
'user creates a merge request from a forked project using templates'
do
context
'user creates a merge request from a forked project using templates'
do
let
(
:template_content
)
{
'this is a test "feature-proposal" template'
}
let
(
:template_content
)
{
'this is a test "feature-proposal" template'
}
let
(
:fork_user
)
{
create
(
:user
)
}
let
(
:fork_user
)
{
create
(
:user
)
}
let
(
:fork_project
)
{
create
(
:project
,
:public
)
}
let
(
:fork_project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:with_diffs
,
source_project:
fork_project
,
target_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
:with_diffs
,
source_project:
fork_project
,
target_project:
project
)
}
background
do
background
do
...
...
spec/features/projects/jobs_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ require 'tempfile'
...
@@ -4,7 +4,7 @@ require 'tempfile'
feature
'Jobs'
do
feature
'Jobs'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user_access_level
)
{
:developer
}
let
(
:user_access_level
)
{
:developer
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:job
)
{
create
(
:ci_build
,
:trace
,
pipeline:
pipeline
)
}
let
(
:job
)
{
create
(
:ci_build
,
:trace
,
pipeline:
pipeline
)
}
...
...
spec/features/projects/labels/issues_sorted_by_priority_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Issue prioritization'
do
feature
'Issue prioritization'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
name:
'test'
,
namespace:
user
.
namespace
)
}
# Labels
# Labels
let
(
:label_1
)
{
create
(
:label
,
title:
'label_1'
,
project:
project
,
priority:
1
)
}
let
(
:label_1
)
{
create
(
:label
,
title:
'label_1'
,
project:
project
,
priority:
1
)
}
...
...
spec/features/projects/main/download_buttons_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ feature 'Download buttons in project main page' do
...
@@ -4,7 +4,7 @@ feature 'Download buttons in project main page' do
given
(
:user
)
{
create
(
:user
)
}
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:status
)
{
'success'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
given
(
:pipeline
)
do
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
create
(
:ci_pipeline
,
...
...
spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'Projects > Members > Group member cannot leave group project'
do
feature
'Projects > Members > Group member cannot leave group project'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
group
)
}
background
do
background
do
group
.
add_developer
(
user
)
group
.
add_developer
(
user
)
...
...
spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'Projects > Members > Group member cannot request access to his group project'
do
feature
'Projects > Members > Group member cannot request access to his group project'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
group
)
}
scenario
'owner does not see the request access button'
do
scenario
'owner does not see the request access button'
do
group
.
add_owner
(
user
)
group
.
add_owner
(
user
)
...
...
spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ feature 'Projects > Members > Group requester cannot request access to project',
...
@@ -4,7 +4,7 @@ feature 'Projects > Members > Group requester cannot request access to project',
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:owner
)
{
create
(
:user
)
}
let
(
:owner
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:public
,
:access_requestable
)
}
let
(
:group
)
{
create
(
:group
,
:public
,
:access_requestable
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:access_requestable
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
,
:access_requestable
,
namespace:
group
)
}
background
do
background
do
group
.
add_owner
(
owner
)
group
.
add_owner
(
owner
)
...
...
spec/features/projects/members/list_spec.rb
View file @
1a0064dc
...
@@ -6,7 +6,7 @@ feature 'Project members list' do
...
@@ -6,7 +6,7 @@ feature 'Project members list' do
let
(
:user1
)
{
create
(
:user
,
name:
'John Doe'
)
}
let
(
:user1
)
{
create
(
:user
,
name:
'John Doe'
)
}
let
(
:user2
)
{
create
(
:user
,
name:
'Mary Jane'
)
}
let
(
:user2
)
{
create
(
:user
,
name:
'Mary Jane'
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
group
)
}
background
do
background
do
sign_in
(
user1
)
sign_in
(
user1
)
...
...
spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
View file @
1a0064dc
...
@@ -5,7 +5,7 @@ feature 'Projects > Members > Master adds member with expiration date', js: true
...
@@ -5,7 +5,7 @@ feature 'Projects > Members > Master adds member with expiration date', js: true
include
ActiveSupport
::
Testing
::
TimeHelpers
include
ActiveSupport
::
Testing
::
TimeHelpers
let
(
:master
)
{
create
(
:user
)
}
let
(
:master
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let!
(
:new_member
)
{
create
(
:user
)
}
let!
(
:new_member
)
{
create
(
:user
)
}
background
do
background
do
...
...
spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Projects > Members > Member cannot request access to his project'
do
feature
'Projects > Members > Member cannot request access to his project'
do
let
(
:member
)
{
create
(
:user
)
}
let
(
:member
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
background
do
background
do
project
.
team
<<
[
member
,
:developer
]
project
.
team
<<
[
member
,
:developer
]
...
...
spec/features/projects/members/member_leaves_project_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Projects > Members > Member leaves project'
do
feature
'Projects > Members > Member leaves project'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
background
do
background
do
project
.
team
<<
[
user
,
:developer
]
project
.
team
<<
[
user
,
:developer
]
...
...
spec/features/projects/members/owner_cannot_leave_project_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Projects > Members > Owner cannot leave project'
do
feature
'Projects > Members > Owner cannot leave project'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
background
do
background
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
owner
)
...
...
spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Projects > Members > Owner cannot request access to his project'
do
feature
'Projects > Members > Owner cannot request access to his project'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
background
do
background
do
sign_in
(
project
.
owner
)
sign_in
(
project
.
owner
)
...
...
spec/features/projects/members/user_requests_access_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Projects > Members > User requests access'
do
feature
'Projects > Members > User requests access'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:access_requestable
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:access_requestable
,
:repository
)
}
let
(
:master
)
{
project
.
owner
}
let
(
:master
)
{
project
.
owner
}
background
do
background
do
...
...
spec/features/projects/merge_request_button_spec.rb
View file @
1a0064dc
...
@@ -3,8 +3,8 @@ require 'spec_helper'
...
@@ -3,8 +3,8 @@ require 'spec_helper'
feature
'Merge Request button'
do
feature
'Merge Request button'
do
shared_examples
'Merge request button only shown when allowed'
do
shared_examples
'Merge request button only shown when allowed'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:forked_project
)
{
create
(
:project
,
:public
,
forked_from_project:
project
)
}
let
(
:forked_project
)
{
create
(
:project
,
:public
,
:repository
,
forked_from_project:
project
)
}
context
'not logged in'
do
context
'not logged in'
do
it
'does not show Create merge request button'
do
it
'does not show Create merge request button'
do
...
...
spec/features/projects/merge_requests/list_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Merge Requests List'
do
feature
'Merge Requests List'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
background
do
background
do
project
.
team
<<
[
user
,
:developer
]
project
.
team
<<
[
user
,
:developer
]
...
...
spec/features/projects/no_password_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'No Password Alert'
do
feature
'No Password Alert'
do
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
user
.
namespace
)
}
context
'with internal auth enabled'
do
context
'with internal auth enabled'
do
before
do
before
do
...
...
spec/features/projects/pipeline_schedules_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'Pipeline Schedules'
,
:js
do
feature
'Pipeline Schedules'
,
:js
do
include
PipelineSchedulesHelper
include
PipelineSchedulesHelper
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:project
)
{
create
(
:project
,
:repository
)
}
let!
(
:pipeline_schedule
)
{
create
(
:ci_pipeline_schedule
,
:nightly
,
project:
project
)
}
let!
(
:pipeline_schedule
)
{
create
(
:ci_pipeline_schedule
,
:nightly
,
project:
project
)
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
pipeline_schedule:
pipeline_schedule
)
}
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
pipeline_schedule:
pipeline_schedule
)
}
let
(
:scope
)
{
nil
}
let
(
:scope
)
{
nil
}
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
1a0064dc
...
@@ -42,7 +42,7 @@ describe 'Pipeline', :js do
...
@@ -42,7 +42,7 @@ describe 'Pipeline', :js do
describe
'GET /:project/pipelines/:id'
do
describe
'GET /:project/pipelines/:id'
do
include_context
'pipeline builds'
include_context
'pipeline builds'
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
,
user:
user
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
,
user:
user
)
}
before
do
before
do
...
@@ -188,7 +188,7 @@ describe 'Pipeline', :js do
...
@@ -188,7 +188,7 @@ describe 'Pipeline', :js do
describe
'GET /:project/pipelines/:id/builds'
do
describe
'GET /:project/pipelines/:id/builds'
do
include_context
'pipeline builds'
include_context
'pipeline builds'
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
before
do
before
do
...
@@ -262,7 +262,7 @@ describe 'Pipeline', :js do
...
@@ -262,7 +262,7 @@ describe 'Pipeline', :js do
end
end
describe
'GET /:project/pipelines/:id/failures'
do
describe
'GET /:project/pipelines/:id/failures'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
let
(
:pipeline_failures_page
)
{
failures_project_pipeline_path
(
project
,
pipeline
)
}
let
(
:pipeline_failures_page
)
{
failures_project_pipeline_path
(
project
,
pipeline
)
}
let!
(
:failed_build
)
{
create
(
:ci_build
,
:failed
,
pipeline:
pipeline
)
}
let!
(
:failed_build
)
{
create
(
:ci_build
,
:failed
,
pipeline:
pipeline
)
}
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
1a0064dc
...
@@ -12,7 +12,7 @@ describe 'Pipelines', :js do
...
@@ -12,7 +12,7 @@ describe 'Pipelines', :js do
end
end
describe
'GET /:project/pipelines'
do
describe
'GET /:project/pipelines'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let!
(
:pipeline
)
do
let!
(
:pipeline
)
do
create
(
create
(
...
@@ -385,7 +385,7 @@ describe 'Pipelines', :js do
...
@@ -385,7 +385,7 @@ describe 'Pipelines', :js do
end
end
describe
'GET /:project/pipelines/show'
do
describe
'GET /:project/pipelines/show'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
create
(
:ci_empty_pipeline
,
create
(
:ci_empty_pipeline
,
...
@@ -437,7 +437,7 @@ describe 'Pipelines', :js do
...
@@ -437,7 +437,7 @@ describe 'Pipelines', :js do
end
end
describe
'POST /:project/pipelines'
do
describe
'POST /:project/pipelines'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
visit
new_project_pipeline_path
(
project
)
visit
new_project_pipeline_path
(
project
)
...
@@ -476,7 +476,7 @@ describe 'Pipelines', :js do
...
@@ -476,7 +476,7 @@ describe 'Pipelines', :js do
end
end
describe
'Create pipelines'
do
describe
'Create pipelines'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
visit
new_project_pipeline_path
(
project
)
visit
new_project_pipeline_path
(
project
)
...
@@ -512,14 +512,14 @@ describe 'Pipelines', :js do
...
@@ -512,14 +512,14 @@ describe 'Pipelines', :js do
end
end
context
'when project is public'
do
context
'when project is public'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
it
{
expect
(
page
).
to
have_content
'Build with confidence'
}
it
{
expect
(
page
).
to
have_content
'Build with confidence'
}
it
{
expect
(
page
).
to
have_http_status
(
:success
)
}
it
{
expect
(
page
).
to
have_http_status
(
:success
)
}
end
end
context
'when project is private'
do
context
'when project is private'
do
let
(
:project
)
{
create
(
:project
,
:private
)
}
let
(
:project
)
{
create
(
:project
,
:private
,
:repository
)
}
it
{
expect
(
page
).
to
have_content
'You need to sign in'
}
it
{
expect
(
page
).
to
have_content
'You need to sign in'
}
end
end
...
...
spec/features/projects/project_settings_spec.rb
View file @
1a0064dc
...
@@ -55,8 +55,7 @@ describe 'Edit Project Settings' do
...
@@ -55,8 +55,7 @@ describe 'Edit Project Settings' do
end
end
context
'when changing project path'
do
context
'when changing project path'
do
# Not using empty project because we need a repo to exist
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
user
.
namespace
,
name:
'gitlabhq'
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
,
name:
'gitlabhq'
)
}
before
(
:context
)
do
before
(
:context
)
do
TestEnv
.
clean_test_path
TestEnv
.
clean_test_path
...
@@ -97,8 +96,7 @@ describe 'Edit Project Settings' do
...
@@ -97,8 +96,7 @@ describe 'Edit Project Settings' do
end
end
describe
'Transfer project section'
,
js:
true
do
describe
'Transfer project section'
,
js:
true
do
# Not using empty project because we need a repo to exist
let!
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
user
.
namespace
,
name:
'gitlabhq'
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
,
name:
'gitlabhq'
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
before
(
:context
)
do
before
(
:context
)
do
...
...
spec/features/projects/ref_switcher_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'rails_helper'
...
@@ -2,7 +2,7 @@ require 'rails_helper'
feature
'Ref switcher'
,
js:
true
do
feature
'Ref switcher'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
...
spec/features/projects/services/slack_service_spec.rb
View file @
1a0064dc
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
feature
'Projects > Slack service > Setup events'
do
feature
'Projects > Slack service > Setup events'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:service
)
{
SlackService
.
new
}
let
(
:service
)
{
SlackService
.
new
}
let
(
:project
)
{
create
(
:project
,
slack_service:
service
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
slack_service:
service
)
}
background
do
background
do
service
.
fields
service
.
fields
...
...
spec/features/projects/services/slack_slash_command_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Slack slash commands'
do
feature
'Slack slash commands'
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:user
)
{
create
(
:user
)
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:project
)
{
create
(
:
empty_
project
)
}
given
(
:service
)
{
project
.
create_slack_slash_commands_service
}
given
(
:service
)
{
project
.
create_slack_slash_commands_service
}
background
do
background
do
...
...
spec/features/projects/settings/visibility_settings_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Visibility settings'
,
js:
true
do
feature
'Visibility settings'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
,
visibility_level:
20
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
,
visibility_level:
20
)
}
context
'as owner'
do
context
'as owner'
do
before
do
before
do
...
...
spec/features/projects/shortcuts_spec.rb
View file @
1a0064dc
require
'spec_helper'
require
'spec_helper'
feature
'Project shortcuts'
do
feature
'Project shortcuts'
do
let
(
:project
)
{
create
(
:project
,
name:
'Victorialand'
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
name:
'Victorialand'
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
describe
'On a project'
,
js:
true
do
describe
'On a project'
,
js:
true
do
...
...
spec/features/projects/snippets/create_snippet_spec.rb
View file @
1a0064dc
...
@@ -4,7 +4,7 @@ feature 'Create Snippet', :js do
...
@@ -4,7 +4,7 @@ feature 'Create Snippet', :js do
include
DropzoneHelper
include
DropzoneHelper
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:
project
,
:repository
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_project
,
:public
)
}
def
fill_form
def
fill_form
fill_in
'project_snippet_title'
,
with:
'My Snippet Title'
fill_in
'project_snippet_title'
,
with:
'My Snippet Title'
...
...
spec/features/projects/user_browses_files_spec.rb
View file @
1a0064dc
...
@@ -7,7 +7,7 @@ describe 'User browses files' do
...
@@ -7,7 +7,7 @@ describe 'User browses files' do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
,
name:
'Shop'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
'Shop'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:tree_path_ref_6d39438
)
{
project_tree_path
(
project
,
'6d39438'
)
}
let
(
:tree_path_ref_6d39438
)
{
project_tree_path
(
project
,
'6d39438'
)
}
...
...
spec/features/projects/user_creates_directory_spec.rb
View file @
1a0064dc
...
@@ -5,7 +5,7 @@ feature 'User creates a directory', js: true do
...
@@ -5,7 +5,7 @@ feature 'User creates a directory', js: true do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/features/projects/user_creates_files_spec.rb
View file @
1a0064dc
...
@@ -5,7 +5,7 @@ describe 'User creates files' do
...
@@ -5,7 +5,7 @@ describe 'User creates files' do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
,
name:
'Shop'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
'Shop'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
...
...
spec/features/projects/user_deletes_files_spec.rb
View file @
1a0064dc
...
@@ -5,7 +5,7 @@ describe 'User deletes files' do
...
@@ -5,7 +5,7 @@ describe 'User deletes files' do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
,
name:
'Shop'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
'Shop'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
...
...
spec/features/projects/user_edits_files_spec.rb
View file @
1a0064dc
...
@@ -5,7 +5,7 @@ describe 'User edits files' do
...
@@ -5,7 +5,7 @@ describe 'User edits files' do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
,
name:
'Shop'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
'Shop'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
...
...
spec/features/projects/user_replaces_files_spec.rb
View file @
1a0064dc
...
@@ -7,7 +7,7 @@ describe 'User replaces files' do
...
@@ -7,7 +7,7 @@ describe 'User replaces files' do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
,
name:
'Shop'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
'Shop'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
...
...
spec/features/projects/user_uploads_files_spec.rb
View file @
1a0064dc
...
@@ -7,7 +7,7 @@ describe 'User uploads files' do
...
@@ -7,7 +7,7 @@ describe 'User uploads files' do
"You're not allowed to make changes to this project directly. "
\
"You're not allowed to make changes to this project directly. "
\
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
"A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
end
let
(
:project
)
{
create
(
:project
,
name:
'Shop'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
name:
'Shop'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project2
)
{
create
(
:project
,
:repository
,
name:
'Another Project'
,
path:
'another-project'
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project_tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
let
(
:project2_tree_path_root_ref
)
{
project_tree_path
(
project2
,
project2
.
repository
.
root_ref
)
}
...
...
spec/features/projects/wiki/markdown_preview_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Projects > Wiki > User previews markdown changes'
,
js:
true
do
feature
'Projects > Wiki > User previews markdown changes'
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
let
(
:wiki_content
)
do
let
(
:wiki_content
)
do
<<-
HEREDOC
<<-
HEREDOC
[regular link](regular)
[regular link](regular)
...
...
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
1a0064dc
...
@@ -11,7 +11,7 @@ feature 'Projects > Wiki > User creates wiki page', :js do
...
@@ -11,7 +11,7 @@ feature 'Projects > Wiki > User creates wiki page', :js do
end
end
context
'in the user namespace'
do
context
'in the user namespace'
do
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
context
'when wiki is empty'
do
context
'when wiki is empty'
do
before
do
before
do
...
@@ -157,7 +157,7 @@ feature 'Projects > Wiki > User creates wiki page', :js do
...
@@ -157,7 +157,7 @@ feature 'Projects > Wiki > User creates wiki page', :js do
end
end
context
'in a group namespace'
do
context
'in a group namespace'
do
let
(
:project
)
{
create
(
:project
,
namespace:
create
(
:group
,
:public
))
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
create
(
:group
,
:public
))
}
context
'when wiki is empty'
do
context
'when wiki is empty'
do
before
do
before
do
...
...
spec/features/projects/wiki/user_git_access_wiki_page_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Projects > Wiki > User views Git access wiki page'
do
describe
'Projects > Wiki > User views Git access wiki page'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:wiki_page
)
do
let
(
:wiki_page
)
do
WikiPages
::
CreateService
.
new
(
WikiPages
::
CreateService
.
new
(
project
,
project
,
...
...
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
View file @
1a0064dc
...
@@ -12,7 +12,7 @@ feature 'Projects > Wiki > User updates wiki page' do
...
@@ -12,7 +12,7 @@ feature 'Projects > Wiki > User updates wiki page' do
end
end
context
'in the user namespace'
do
context
'in the user namespace'
do
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
user
.
namespace
)
}
context
'the home page'
do
context
'the home page'
do
scenario
'success when the wiki content is not empty'
do
scenario
'success when the wiki content is not empty'
do
...
@@ -54,7 +54,7 @@ feature 'Projects > Wiki > User updates wiki page' do
...
@@ -54,7 +54,7 @@ feature 'Projects > Wiki > User updates wiki page' do
end
end
context
'in a group namespace'
do
context
'in a group namespace'
do
let
(
:project
)
{
create
(
:project
,
namespace:
create
(
:group
,
:public
))
}
let
(
:project
)
{
create
(
:
empty_
project
,
namespace:
create
(
:group
,
:public
))
}
scenario
'the home page'
do
scenario
'the home page'
do
click_link
'Edit'
click_link
'Edit'
...
...
spec/features/projects/wiki/user_views_project_wiki_page_spec.rb
View file @
1a0064dc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
feature
'Projects > Wiki > User views the wiki page'
do
feature
'Projects > Wiki > User views the wiki page'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:project
)
{
create
(
:
empty_
project
,
:public
)
}
let
(
:old_page_version_id
)
{
wiki_page
.
versions
.
last
.
id
}
let
(
:old_page_version_id
)
{
wiki_page
.
versions
.
last
.
id
}
let
(
:wiki_page
)
do
let
(
:wiki_page
)
do
WikiPages
::
CreateService
.
new
(
WikiPages
::
CreateService
.
new
(
...
...
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