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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ec1ec9b6
Commit
ec1ec9b6
authored
Aug 25, 2017
by
blackst0ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace 'source/search_code.feature' spinach test with an rspec analog
parent
0f006dc0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
65 deletions
+63
-65
changelogs/unreleased/add_index_on_ci_runners_contacted_at.yml
...elogs/unreleased/add_index_on_ci_runners_contacted_at.yml
+0
-4
changelogs/unreleased/replace_spinach_search_code-feature.yml
...gelogs/unreleased/replace_spinach_search_code-feature.yml
+5
-0
features/project/source/search_code.feature
features/project/source/search_code.feature
+0
-15
features/steps/project/source/search_code.rb
features/steps/project/source/search_code.rb
+0
-19
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+0
-4
spec/features/projects/files/find_files_spec.rb
spec/features/projects/files/find_files_spec.rb
+0
-23
spec/features/projects/files/user_searches_for_files_spec.rb
spec/features/projects/files/user_searches_for_files_spec.rb
+58
-0
No files found.
changelogs/unreleased/add_index_on_ci_runners_contacted_at.yml
deleted
100644 → 0
View file @
0f006dc0
---
title
:
Add index on ci_runners.contacted_at
merge_request
:
10876
author
:
blackst0ne
changelogs/unreleased/replace_spinach_search_code-feature.yml
0 → 100644
View file @
ec1ec9b6
---
title
:
Replace 'source/search_code.feature' spinach test with an rspec analog
merge_request
:
13697
author
:
blackst0ne
type
:
other
features/project/source/search_code.feature
deleted
100644 → 0
View file @
0f006dc0
Feature
:
Project Source Search Code
Background
:
Given
I sign in as a user
Scenario
:
Search for term "coffee"
Given
I own project
"Shop"
And
I visit project source page
When
I search for term
"coffee"
Then
I should see files from repository containing
"coffee"
Scenario
:
Search on empty project
Given
I own an empty project
And
I visit my project's home page
When
I search for term
"coffee"
Then
I should see empty result
features/steps/project/source/search_code.rb
deleted
100644 → 0
View file @
0f006dc0
class
Spinach::Features::ProjectSourceSearchCode
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedProject
include
SharedPaths
step
'I search for term "coffee"'
do
fill_in
"search"
,
with:
"coffee"
click_button
"Go"
end
step
'I should see files from repository containing "coffee"'
do
expect
(
page
).
to
have_content
'coffee'
expect
(
page
).
to
have_content
'CONTRIBUTING.md'
end
step
'I should see empty result'
do
expect
(
page
).
to
have_content
"We couldn't find any"
end
end
features/steps/shared/paths.rb
View file @
ec1ec9b6
...
...
@@ -304,10 +304,6 @@ module SharedPaths
visit
project_commits_path
(
@project
,
'stable'
,
{
limit:
5
})
end
step
'I visit project source page'
do
visit
project_tree_path
(
@project
,
root_ref
)
end
step
'I visit blob file from repo'
do
visit
project_blob_path
(
@project
,
File
.
join
(
sample_commit
.
id
,
sample_blob
.
path
))
end
...
...
spec/features/projects/files/find_files_spec.rb
deleted
100644 → 0
View file @
0f006dc0
require
'spec_helper'
feature
'Find files button in the tree header'
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:project
)
{
create
(
:project
,
:repository
)
}
background
do
sign_in
(
user
)
project
.
team
<<
[
user
,
:developer
]
end
scenario
'project main screen'
do
visit
project_path
(
project
)
expect
(
page
).
to
have_selector
(
'.tree-controls .shortcuts-find-file'
)
end
scenario
'project tree screen'
do
visit
project_tree_path
(
project
,
project
.
default_branch
)
expect
(
page
).
to
have_selector
(
'.tree-controls .shortcuts-find-file'
)
end
end
spec/features/projects/files/user_searches_for_files_spec.rb
0 → 100644
View file @
ec1ec9b6
require
'spec_helper'
describe
'User searches for files'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
sign_in
(
user
)
end
describe
'project main screen'
do
context
'when project is empty'
do
let
(
:empty_project
)
{
create
(
:project
)
}
before
do
empty_project
.
add_developer
(
user
)
visit
project_path
(
empty_project
)
end
it
'does not show any result'
do
fill_in
(
'search'
,
with:
'coffee'
)
click_button
(
'Go'
)
expect
(
page
).
to
have_content
(
"We couldn't find any"
)
end
end
context
'when project is not empty'
do
before
do
project
.
add_developer
(
user
)
visit
project_path
(
project
)
end
it
'shows "Find file" button'
do
expect
(
page
).
to
have_selector
(
'.tree-controls .shortcuts-find-file'
)
end
end
end
describe
'project tree screen'
do
before
do
project
.
add_developer
(
user
)
visit
project_tree_path
(
project
,
project
.
default_branch
)
end
it
'shows "Find file" button'
do
expect
(
page
).
to
have_selector
(
'.tree-controls .shortcuts-find-file'
)
end
it
'shows found files'
do
fill_in
(
'search'
,
with:
'coffee'
)
click_button
(
'Go'
)
expect
(
page
).
to
have_content
(
'coffee'
)
expect
(
page
).
to
have_content
(
'CONTRIBUTING.md'
)
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