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
Léo-Paul Géneau
gitlab-ce
Commits
13f7415a
Commit
13f7415a
authored
Apr 09, 2018
by
Rémy Coutable
Committed by
Robert Speicher
Apr 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review feedback
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
2d54dfb2
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
57 additions
and
101 deletions
+57
-101
spec/features/projects/activity/rss_spec.rb
spec/features/projects/activity/rss_spec.rb
+3
-4
spec/features/projects/activity/user_sees_activity_spec.rb
spec/features/projects/activity/user_sees_activity_spec.rb
+2
-17
spec/features/projects/files/dockerfile_dropdown_spec.rb
spec/features/projects/files/dockerfile_dropdown_spec.rb
+2
-9
spec/features/projects/files/download_buttons_spec.rb
spec/features/projects/files/download_buttons_spec.rb
+9
-15
spec/features/projects/files/edit_file_soft_wrap_spec.rb
spec/features/projects/files/edit_file_soft_wrap_spec.rb
+1
-2
spec/features/projects/files/editing_a_file_spec.rb
spec/features/projects/files/editing_a_file_spec.rb
+1
-2
spec/features/projects/files/files_sort_submodules_with_folders_spec.rb
...projects/files/files_sort_submodules_with_folders_spec.rb
+1
-2
spec/features/projects/files/find_file_keyboard_spec.rb
spec/features/projects/files/find_file_keyboard_spec.rb
+1
-2
spec/features/projects/files/gitignore_dropdown_spec.rb
spec/features/projects/files/gitignore_dropdown_spec.rb
+5
-6
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
+5
-6
spec/features/projects/files/project_owner_creates_license_file_spec.rb
...projects/files/project_owner_creates_license_file_spec.rb
+1
-2
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
+1
-2
spec/features/projects/files/template_type_dropdown_spec.rb
spec/features/projects/files/template_type_dropdown_spec.rb
+1
-2
spec/features/projects/files/undo_template_spec.rb
spec/features/projects/files/undo_template_spec.rb
+1
-2
spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder.rb
..._browses_a_tree_with_a_folder_containing_only_a_folder.rb
+1
-1
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+1
-2
spec/features/projects/files/user_browses_lfs_files_spec.rb
spec/features/projects/files/user_browses_lfs_files_spec.rb
+1
-2
spec/features/projects/files/user_searches_for_files_spec.rb
spec/features/projects/files/user_searches_for_files_spec.rb
+8
-8
spec/features/projects/settings/lfs_settings_spec.rb
spec/features/projects/settings/lfs_settings_spec.rb
+2
-1
spec/features/projects/show/user_manages_notifications_spec.rb
...features/projects/show/user_manages_notifications_spec.rb
+10
-14
No files found.
spec/features/projects/activity/rss_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
feature
'Project Activity RSS'
do
feature
'Project Activity RSS'
do
let
(
:
user
)
{
create
(
:user
)
}
let
(
:
project
)
{
create
(
:project
,
:public
)
}
let
(
:
project
)
{
create
(
:project
,
visibility_level:
Gitlab
::
VisibilityLevel
::
PUBLIC
)
}
let
(
:
user
)
{
project
.
owner
}
let
(
:path
)
{
activity_project_path
(
project
)
}
let
(
:path
)
{
activity_project_path
(
project
)
}
before
do
before
do
...
@@ -11,8 +11,7 @@ feature 'Project Activity RSS' do
...
@@ -11,8 +11,7 @@ feature 'Project Activity RSS' do
context
'when signed in'
do
context
'when signed in'
do
before
do
before
do
project
.
add_developer
(
user
)
sign_in
(
project
.
owner
)
sign_in
(
user
)
visit
path
visit
path
end
end
...
...
spec/features/projects/activity/user_sees_activity_spec.rb
View file @
13f7415a
...
@@ -15,22 +15,7 @@ feature 'Projects > Activity > User sees activity' do
...
@@ -15,22 +15,7 @@ feature 'Projects > Activity > User sees activity' do
visit
activity_project_path
(
project
)
visit
activity_project_path
(
project
)
end
end
shared_examples
'push appears in activity'
do
it
'shows the last push in the activity page'
,
:js
do
it
'shows the last push in the activity page'
,
:js
do
expect
(
page
).
to
have_content
"
#{
user
.
name
}
pushed new branch fix"
expect
(
page
).
to
have_content
"
#{
user
.
name
}
pushed new branch fix"
end
end
context
'when signed in'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
end
it_behaves_like
'push appears in activity'
end
context
'when signed out'
do
it_behaves_like
'push appears in activity'
end
end
end
end
spec/features/projects/files/dockerfile_dropdown_spec.rb
View file @
13f7415a
require 'spec_helper'
require 'spec_helper'
require 'fileutils'
describe 'Projects > Files > User wants to add a Dockerfile file' do
describe 'Projects > Files > User wants to add a Dockerfile file' do
before do
before do
user = create(:user)
project = create(:project, :repository)
project = create(:project, :repository)
project.add_master(user)
sign_in project.owner
sign_in user
visit project_new_blob_path(project, 'master', file_name: 'Dockerfile')
visit project_new_blob_path(project, 'master', file_name: 'Dockerfile')
end
end
it 'user can
see Dockerfile dropdown'
do
it 'user can
pick a Dockerfile file from the dropdown', :js
do
expect(page).to have_css('.dockerfile-selector')
expect(page).to have_css('.dockerfile-selector')
end
it 'user can pick a Dockerfile file from the dropdown', :js do
find('.js-dockerfile-selector').click
find('.js-dockerfile-selector').click
wait_for_requests
wait_for_requests
...
...
spec/features/projects/files/download_buttons_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Files > Download buttons in files tree'
do
describe
'Projects > Files > Download buttons in files tree'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:role
)
{
:developer
}
let
(
:status
)
{
'success'
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let
(
:pipeline
)
do
let
(
:pipeline
)
do
create
(
:ci_pipeline
,
create
(
:ci_pipeline
,
project:
project
,
project:
project
,
sha:
project
.
commit
.
sha
,
sha:
project
.
commit
.
sha
,
ref:
project
.
default_branch
,
ref:
project
.
default_branch
,
status:
status
)
status:
'success'
)
end
end
let!
(
:build
)
do
let!
(
:build
)
do
...
@@ -23,20 +21,16 @@ describe 'Projects > Files > Download buttons in files tree' do
...
@@ -23,20 +21,16 @@ describe 'Projects > Files > Download buttons in files tree' do
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
project
.
add_role
(
user
,
role
)
project
.
add_developer
(
user
)
end
describe
'when files tree'
do
visit
project_tree_path
(
project
,
project
.
default_branch
)
context
'with artifacts'
do
end
before
do
visit
project_tree_path
(
project
,
project
.
default_branch
)
end
it
'shows download artifacts button'
do
context
'with artifacts'
do
href
=
latest_succeeded_project_artifacts_path
(
project
,
"
#{
project
.
default_branch
}
/download"
,
job:
'build'
)
it
'shows download artifacts button'
do
href
=
latest_succeeded_project_artifacts_path
(
project
,
"
#{
project
.
default_branch
}
/download"
,
job:
'build'
)
expect
(
page
).
to
have_link
"Download '
#{
build
.
name
}
'"
,
href:
href
expect
(
page
).
to
have_link
"Download '
#{
build
.
name
}
'"
,
href:
href
end
end
end
end
end
end
end
spec/features/projects/files/edit_file_soft_wrap_spec.rb
View file @
13f7415a
...
@@ -2,9 +2,8 @@ require 'spec_helper'
...
@@ -2,9 +2,8 @@ require 'spec_helper'
describe
'Projects > Files > User uses soft wrap whilst editing file'
,
:js
do
describe
'Projects > Files > User uses soft wrap whilst editing file'
,
:js
do
before
do
before
do
user
=
create
(
:user
)
project
=
create
(
:project
,
:repository
)
project
=
create
(
:project
,
:repository
)
project
.
add_master
(
user
)
user
=
project
.
owner
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'
)
page
.
within
(
'.file-editor.code'
)
do
page
.
within
(
'.file-editor.code'
)
do
...
...
spec/features/projects/files/editing_a_file_spec.rb
View file @
13f7415a
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
'Projects > Files > User wants to edit a file'
do
describe
'Projects > Files > User wants to edit a file'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:commit_params
)
do
let
(
:commit_params
)
do
{
{
start_branch:
project
.
default_branch
,
start_branch:
project
.
default_branch
,
...
@@ -16,7 +16,6 @@ describe 'Projects > Files > User wants to edit a file' do
...
@@ -16,7 +16,6 @@ describe 'Projects > Files > User wants to edit a file' do
end
end
before
do
before
do
project
.
add_master
(
user
)
sign_in
user
sign_in
user
visit
project_edit_blob_path
(
project
,
visit
project_edit_blob_path
(
project
,
File
.
join
(
project
.
default_branch
,
'.gitignore'
))
File
.
join
(
project
.
default_branch
,
'.gitignore'
))
...
...
spec/features/projects/files/files_sort_submodules_with_folders_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Files > User views files page'
do
describe
'Projects > Files > User views files page'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:user
)
{
project
.
owner
}
before
do
before
do
project
.
add_master
(
user
)
sign_in
user
sign_in
user
visit
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
visit
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
end
end
...
...
spec/features/projects/files/find_file_keyboard_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Files > Find file keyboard shortcuts'
,
:js
do
describe
'Projects > Files > Find file keyboard shortcuts'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
owner
}
before
do
before
do
project
.
add_master
(
user
)
sign_in
user
sign_in
user
visit
project_find_file_path
(
project
,
project
.
repository
.
root_ref
)
visit
project_find_file_path
(
project
,
project
.
repository
.
root_ref
)
...
...
spec/features/projects/files/gitignore_dropdown_spec.rb
View file @
13f7415a
...
@@ -2,24 +2,23 @@ require 'spec_helper'
...
@@ -2,24 +2,23 @@ require 'spec_helper'
describe
'Projects > Files > User wants to add a .gitignore file'
do
describe
'Projects > Files > User wants to add a .gitignore file'
do
before
do
before
do
user
=
create
(
:user
)
project
=
create
(
:project
,
:repository
)
project
=
create
(
:project
,
:repository
)
project
.
add_master
(
user
)
sign_in
project
.
owner
sign_in
user
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitignore'
)
visit
project_new_blob_path
(
project
,
'master'
,
file_name:
'.gitignore'
)
end
end
it
'user can
see .gitignore dropdown'
do
it
'user can
pick a .gitignore file from the dropdown'
,
:js
do
expect
(
page
).
to
have_css
(
'.gitignore-selector'
)
expect
(
page
).
to
have_css
(
'.gitignore-selector'
)
end
it
'user can pick a .gitignore file from the dropdown'
,
:js
do
find
(
'.js-gitignore-selector'
).
click
find
(
'.js-gitignore-selector'
).
click
wait_for_requests
wait_for_requests
within
'.gitignore-selector'
do
within
'.gitignore-selector'
do
find
(
'.dropdown-input-field'
).
set
(
'rails'
)
find
(
'.dropdown-input-field'
).
set
(
'rails'
)
find
(
'.dropdown-content li'
,
text:
'Rails'
).
click
find
(
'.dropdown-content li'
,
text:
'Rails'
).
click
end
end
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_css
(
'.gitignore-selector .dropdown-toggle-text'
,
text:
'Rails'
)
expect
(
page
).
to
have_css
(
'.gitignore-selector .dropdown-toggle-text'
,
text:
'Rails'
)
...
...
spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb
View file @
13f7415a
...
@@ -2,24 +2,23 @@ require 'spec_helper'
...
@@ -2,24 +2,23 @@ require 'spec_helper'
describe
'Projects > Files > User wants to add a .gitlab-ci.yml file'
do
describe
'Projects > Files > User wants to add a .gitlab-ci.yml file'
do
before
do
before
do
user
=
create
(
:user
)
project
=
create
(
:project
,
:repository
)
project
=
create
(
:project
,
:repository
)
project
.
add_master
(
user
)
sign_in
project
.
owner
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'
)
end
end
it
'user can
see .gitlab-ci.yml dropdown'
do
it
'user can
pick a template from the dropdown'
,
:js
do
expect
(
page
).
to
have_css
(
'.gitlab-ci-yml-selector'
)
expect
(
page
).
to
have_css
(
'.gitlab-ci-yml-selector'
)
end
it
'user can pick a template from the dropdown'
,
:js
do
find
(
'.js-gitlab-ci-yml-selector'
).
click
find
(
'.js-gitlab-ci-yml-selector'
).
click
wait_for_requests
wait_for_requests
within
'.gitlab-ci-yml-selector'
do
within
'.gitlab-ci-yml-selector'
do
find
(
'.dropdown-input-field'
).
set
(
'Jekyll'
)
find
(
'.dropdown-input-field'
).
set
(
'Jekyll'
)
find
(
'.dropdown-content li'
,
text:
'Jekyll'
).
click
find
(
'.dropdown-content li'
,
text:
'Jekyll'
).
click
end
end
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_css
(
'.gitlab-ci-yml-selector .dropdown-toggle-text'
,
text:
'Jekyll'
)
expect
(
page
).
to
have_css
(
'.gitlab-ci-yml-selector .dropdown-toggle-text'
,
text:
'Jekyll'
)
...
...
spec/features/projects/files/project_owner_creates_license_file_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Files > Project owner creates a license file'
,
:js
do
describe
'Projects > Files > Project owner creates a license file'
,
:js
do
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project_master
)
{
project
.
owner
}
before
do
before
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'
)
project
.
add_master
(
project_master
)
sign_in
(
project_master
)
sign_in
(
project_master
)
visit
project_path
(
project
)
visit
project_path
(
project
)
end
end
...
...
spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Files > Project owner sees a link to create a license file in empty project'
,
:js
do
describe
'Projects > Files > Project owner sees a link to create a license file in empty project'
,
:js
do
let
(
:project_master
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project_empty_repo
)
}
let
(
:project
)
{
create
(
:project_empty_repo
)
}
let
(
:project_master
)
{
project
.
owner
}
before
do
before
do
project
.
add_master
(
project_master
)
sign_in
(
project_master
)
sign_in
(
project_master
)
end
end
...
...
spec/features/projects/files/template_type_dropdown_spec.rb
View file @
13f7415a
...
@@ -2,10 +2,9 @@ require 'spec_helper'
...
@@ -2,10 +2,9 @@ require 'spec_helper'
describe
'Projects > Files > Template type dropdown selector'
,
:js
do
describe
'Projects > Files > Template type dropdown selector'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
project
.
owner
}
before
do
before
do
project
.
add_master
(
user
)
sign_in
user
sign_in
user
end
end
...
...
spec/features/projects/files/undo_template_spec.rb
View file @
13f7415a
...
@@ -2,10 +2,9 @@ require 'spec_helper'
...
@@ -2,10 +2,9 @@ require 'spec_helper'
describe
'Projects > Files > Template Undo Button'
,
:js
do
describe
'Projects > Files > Template Undo Button'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
project
.
owner
}
before
do
before
do
project
.
add_master
(
user
)
sign_in
user
sign_in
user
end
end
...
...
spec/features/projects/files/user_browses_a_tree_with_a_folder_containing_only_a_folder.rb
View file @
13f7415a
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
# This is a regression test for https://gitlab.com/gitlab-org/gitlab-ce/issues/37569
# This is a regression test for https://gitlab.com/gitlab-org/gitlab-ce/issues/37569
describe
'Projects > Files > User browses a tree with a folder containing only a folder'
do
describe
'Projects > Files > User browses a tree with a folder containing only a folder'
do
let
(
:project
)
{
create
(
:project
,
:empty_repo
)
}
let
(
:project
)
{
create
(
:project
,
:empty_repo
)
}
let
(
:user
)
{
project
.
creato
r
}
let
(
:user
)
{
project
.
owne
r
}
before
do
before
do
# We need to disable the tree.flat_path provided by Gitaly to reproduce the issue
# We need to disable the tree.flat_path provided by Gitaly to reproduce the issue
...
...
spec/features/projects/files/user_browses_files_spec.rb
View file @
13f7415a
...
@@ -10,10 +10,9 @@ describe 'Projects > Files > User browses files' do
...
@@ -10,10 +10,9 @@ describe 'Projects > Files > User browses files' do
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'
)
}
let
(
:tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:tree_path_root_ref
)
{
project_tree_path
(
project
,
project
.
repository
.
root_ref
)
}
let
(
:user
)
{
project
.
creato
r
}
let
(
:user
)
{
project
.
owne
r
}
before
do
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
sign_in
(
user
)
end
end
...
...
spec/features/projects/files/user_browses_lfs_files_spec.rb
View file @
13f7415a
...
@@ -2,10 +2,9 @@ require 'spec_helper'
...
@@ -2,10 +2,9 @@ require 'spec_helper'
describe
'Projects > Files > User browses LFS files'
do
describe
'Projects > Files > User browses LFS files'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
creato
r
}
let
(
:user
)
{
project
.
owne
r
}
before
do
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
sign_in
(
user
)
end
end
...
...
spec/features/projects/files/user_searches_for_files_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Files > User searches for files'
do
describe
'Projects > Files > User searches for files'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
...
@@ -10,11 +9,10 @@ describe 'Projects > Files > User searches for files' do
...
@@ -10,11 +9,10 @@ describe 'Projects > Files > User searches for files' do
describe
'project main screen'
do
describe
'project main screen'
do
context
'when project is empty'
do
context
'when project is empty'
do
let
(
:
empty_
project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
before
do
empty_project
.
add_developer
(
user
)
visit
project_path
(
project
)
visit
project_path
(
empty_project
)
end
end
it
'does not show any result'
do
it
'does not show any result'
do
...
@@ -26,6 +24,8 @@ describe 'Projects > Files > User searches for files' do
...
@@ -26,6 +24,8 @@ describe 'Projects > Files > User searches for files' do
end
end
context
'when project is not empty'
do
context
'when project is not empty'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
project
.
add_developer
(
user
)
project
.
add_developer
(
user
)
visit
project_path
(
project
)
visit
project_path
(
project
)
...
@@ -38,16 +38,16 @@ describe 'Projects > Files > User searches for files' do
...
@@ -38,16 +38,16 @@ describe 'Projects > Files > User searches for files' do
end
end
describe
'project tree screen'
do
describe
'project tree screen'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
project
.
add_developer
(
user
)
project
.
add_developer
(
user
)
visit
project_tree_path
(
project
,
project
.
default_branch
)
visit
project_tree_path
(
project
,
project
.
default_branch
)
end
end
it
'shows
"Find file" button
'
do
it
'shows
found files
'
do
expect
(
page
).
to
have_selector
(
'.tree-controls .shortcuts-find-file'
)
expect
(
page
).
to
have_selector
(
'.tree-controls .shortcuts-find-file'
)
end
it
'shows found files'
do
fill_in
(
'search'
,
with:
'coffee'
)
fill_in
(
'search'
,
with:
'coffee'
)
click_button
(
'Go'
)
click_button
(
'Go'
)
...
...
spec/features/projects/settings/lfs_settings_spec.rb
View file @
13f7415a
...
@@ -6,11 +6,12 @@ describe 'Projects > Settings > LFS settings' do
...
@@ -6,11 +6,12 @@ describe 'Projects > Settings > LFS settings' do
context
'LFS enabled setting'
do
context
'LFS enabled setting'
do
before
do
before
do
allow
(
Gitlab
.
config
.
lfs
).
to
receive
(
:enabled
).
and_return
(
true
)
sign_in
(
admin
)
sign_in
(
admin
)
end
end
it
'displays the correct elements'
,
:js
do
it
'displays the correct elements'
,
:js
do
allow
(
Gitlab
.
config
.
lfs
).
to
receive
(
:enabled
).
and_return
(
true
)
visit
edit_project_path
(
project
)
visit
edit_project_path
(
project
)
expect
(
page
).
to
have_content
(
'Git Large File Storage'
)
expect
(
page
).
to
have_content
(
'Git Large File Storage'
)
...
...
spec/features/projects/show/user_manages_notifications_spec.rb
View file @
13f7415a
require
'spec_helper'
require
'spec_helper'
describe
'Projects > Show > User manages notifications'
do
describe
'Projects > Show > User manages notifications'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
context
'when user is signed in'
,
:js
do
before
do
let
(
:user
)
{
create
(
:user
)
}
sign_in
(
project
.
owner
)
visit
project_path
(
project
)
before
do
end
sign_in
(
user
)
visit
project_path
(
project
)
end
it
'changes the notification setting'
do
it
'changes the notification setting'
do
first
(
'.notifications-btn'
).
click
first
(
'.notifications-btn'
).
click
click_link
'On mention'
click_link
'On mention'
page
.
within
'#notifications-button'
do
page
.
within
'#notifications-button'
do
expect
(
page
).
to
have_content
'On mention'
expect
(
page
).
to
have_content
'On mention'
end
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment