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
bb294b91
Commit
bb294b91
authored
Apr 10, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add container registry repositories view specs
parent
7ec3c2dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
app/views/projects/registry/repositories/_image.html.haml
app/views/projects/registry/repositories/_image.html.haml
+1
-1
app/views/projects/registry/repositories/_tag.html.haml
app/views/projects/registry/repositories/_tag.html.haml
+1
-1
spec/views/projects/registry/repositories/index.html.haml_spec.rb
...ws/projects/registry/repositories/index.html.haml_spec.rb
+36
-0
No files found.
app/views/projects/registry/repositories/_image.html.haml
View file @
bb294b91
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
=
icon
(
'chevron-down'
,
'aria-hidden'
:
'true'
)
=
icon
(
'chevron-down'
,
'aria-hidden'
:
'true'
)
=
escape_once
(
image
.
path
)
=
escape_once
(
image
.
path
)
=
clipboard_button
(
clipboard_text:
"docker pull
#{
image
.
path
}
"
)
=
clipboard_button
(
clipboard_text:
"docker pull
#{
image
.
location
}
"
)
.controls.hidden-xs.pull-right
.controls.hidden-xs.pull-right
=
link_to
namespace_project_container_registry_path
(
@project
.
namespace
,
@project
,
image
),
=
link_to
namespace_project_container_registry_path
(
@project
.
namespace
,
@project
,
image
),
...
...
app/views/projects/registry/repositories/_tag.html.haml
View file @
bb294b91
%tr
.tag
%tr
.tag
%td
%td
=
escape_once
(
tag
.
name
)
=
escape_once
(
tag
.
name
)
=
clipboard_button
(
text:
"docker pull
#{
tag
.
path
}
"
)
=
clipboard_button
(
text:
"docker pull
#{
tag
.
location
}
"
)
%td
%td
-
if
tag
.
revision
-
if
tag
.
revision
%span
.has-tooltip
{
title:
"#{tag.revision}"
}
%span
.has-tooltip
{
title:
"#{tag.revision}"
}
...
...
spec/views/projects/registry/repositories/index.html.haml_spec.rb
0 → 100644
View file @
bb294b91
require
'spec_helper'
describe
'projects/registry/repositories/index'
,
:view
do
let
(
:group
)
{
create
(
:group
,
path:
'group'
)
}
let
(
:project
)
{
create
(
:empty_project
,
group:
group
,
path:
'test'
)
}
let
(
:repository
)
do
create
(
:container_repository
,
project:
project
,
name:
'image'
)
end
before
do
stub_container_registry_config
(
enabled:
true
,
host_port:
'registry.gitlab'
,
api_url:
'http://registry.gitlab'
)
stub_container_registry_tags
(
repository: :any
,
tags:
[
:latest
])
assign
(
:project
,
project
)
assign
(
:images
,
[
repository
])
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
end
it
'contains container repository path'
do
render
expect
(
rendered
).
to
have_content
'group/test/image'
end
it
'contains attribute for copying tag location into clipboard'
do
render
expect
(
rendered
).
to
have_css
'button[data-clipboard-text="docker pull '
\
'registry.gitlab/group/test/image:latest"]'
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