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
80c22e4c
Commit
80c22e4c
authored
Jul 25, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add four features tests for download buttons in different places
parent
fcb560f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
150 additions
and
0 deletions
+150
-0
spec/features/projects/branches/download_buttons_spec.rb
spec/features/projects/branches/download_buttons_spec.rb
+37
-0
spec/features/projects/files/download_buttons_spec.rb
spec/features/projects/files/download_buttons_spec.rb
+38
-0
spec/features/projects/main/download_buttons_spec.rb
spec/features/projects/main/download_buttons_spec.rb
+37
-0
spec/features/projects/tags/download_buttons_spec.rb
spec/features/projects/tags/download_buttons_spec.rb
+38
-0
No files found.
spec/features/projects/branches/download_buttons_spec.rb
0 → 100644
View file @
80c22e4c
require
'spec_helper'
feature
'Download buttons in branches page'
,
feature:
true
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
project
.
default_branch
,
status:
status
)
end
given!
(
:build
)
do
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
,
status:
pipeline
.
status
,
name:
'build'
)
end
background
do
login_as
(
user
)
project
.
team
<<
[
user
,
role
]
end
describe
'when checking branches'
do
context
'with artifacts'
do
before
do
visit
namespace_project_branches_path
(
project
.
namespace
,
project
)
end
scenario
'shows download artifacts button'
do
expect
(
page
).
to
have_link
"Download '
#{
build
.
name
}
'"
end
end
end
end
spec/features/projects/files/download_buttons_spec.rb
0 → 100644
View file @
80c22e4c
require
'spec_helper'
feature
'Download buttons in files tree'
,
feature:
true
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
project
.
default_branch
,
status:
status
)
end
given!
(
:build
)
do
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
,
status:
pipeline
.
status
,
name:
'build'
)
end
background
do
login_as
(
user
)
project
.
team
<<
[
user
,
role
]
end
describe
'when files tree'
do
context
'with artifacts'
do
before
do
visit
namespace_project_tree_path
(
project
.
namespace
,
project
,
project
.
default_branch
)
end
scenario
'shows download artifacts button'
do
expect
(
page
).
to
have_link
"Download '
#{
build
.
name
}
'"
end
end
end
end
spec/features/projects/main/download_buttons_spec.rb
0 → 100644
View file @
80c22e4c
require
'spec_helper'
feature
'Download buttons in project main page'
,
feature:
true
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
project
.
default_branch
,
status:
status
)
end
given!
(
:build
)
do
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
,
status:
pipeline
.
status
,
name:
'build'
)
end
background
do
login_as
(
user
)
project
.
team
<<
[
user
,
role
]
end
describe
'when checking project main page'
do
context
'with artifacts'
do
before
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
end
scenario
'shows download artifacts button'
do
expect
(
page
).
to
have_link
"Download '
#{
build
.
name
}
'"
end
end
end
end
spec/features/projects/tags/download_buttons_spec.rb
0 → 100644
View file @
80c22e4c
require
'spec_helper'
feature
'Download buttons in tags page'
,
feature:
true
do
given
(
:user
)
{
create
(
:user
)
}
given
(
:role
)
{
:developer
}
given
(
:status
)
{
'success'
}
given
(
:tag
)
{
'v1.0.0'
}
given
(
:project
)
{
create
(
:project
)
}
given
(
:pipeline
)
do
create
(
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
,
ref:
tag
,
status:
status
)
end
given!
(
:build
)
do
create
(
:ci_build
,
:success
,
:artifacts
,
pipeline:
pipeline
,
status:
pipeline
.
status
,
name:
'build'
)
end
background
do
login_as
(
user
)
project
.
team
<<
[
user
,
role
]
end
describe
'when checking tags'
do
context
'with artifacts'
do
before
do
visit
namespace_project_tags_path
(
project
.
namespace
,
project
)
end
scenario
'shows download artifacts button'
do
expect
(
page
).
to
have_link
"Download '
#{
build
.
name
}
'"
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