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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
5dbbec46
Commit
5dbbec46
authored
Jan 03, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8520 from cirosantilli/edit-blob-link-tests
Add tests for disabled blob edit button cases v2
parents
e8fc5591
18fa1550
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
features/project/source/browse_files.feature
features/project/source/browse_files.feature
+10
-0
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+8
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+10
-0
No files found.
features/project/source/browse_files.feature
View file @
5dbbec46
...
...
@@ -50,6 +50,16 @@ Feature: Project Source Browse Files
And
I click button
"Edit"
Then
I can edit code
Scenario
:
If the file is binary the edit link is hidden
Given
I visit a binary file in the repo
Then
I cannot see the edit button
Scenario
:
If I don't have edit permission the edit link is disabled
Given
public project
"Community"
And
I visit project
"Community"
source page
And
I click on
".gitignore"
file in repo
Then
The edit button is disabled
@javascript
Scenario
:
I
can edit and commit file
Given
I click on
".gitignore"
file in repo
...
...
features/steps/project/source/browse_files.rb
View file @
5dbbec46
...
...
@@ -48,6 +48,14 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_link
'Edit'
end
step
'I cannot see the edit button'
do
page
.
should_not
have_link
'edit'
end
step
'The edit button is disabled'
do
page
.
should
have_css
'.disabled'
,
text:
'Edit'
end
step
'I can edit code'
do
set_new_content
evaluate_script
(
'editor.getValue()'
).
should
==
new_gitignore_content
...
...
features/steps/shared/paths.rb
View file @
5dbbec46
...
...
@@ -183,6 +183,11 @@ module SharedPaths
visit
project_tree_path
(
@project
,
root_ref
)
end
step
'I visit a binary file in the repo'
do
visit
project_blob_path
(
@project
,
File
.
join
(
root_ref
,
'files/images/logo-black.png'
))
end
step
"I visit my project's commits page"
do
visit
project_commits_path
(
@project
,
root_ref
,
{
limit:
5
})
end
...
...
@@ -385,6 +390,11 @@ module SharedPaths
visit
project_path
(
project
)
end
step
'I visit project "Community" source page'
do
project
=
Project
.
find_by
(
name:
'Community'
)
visit
project_tree_path
(
project
,
root_ref
)
end
step
'I visit project "Internal" page'
do
project
=
Project
.
find_by
(
name:
"Internal"
)
visit
project_path
(
project
)
...
...
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