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
2e1d5ca3
Commit
2e1d5ca3
authored
Dec 13, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show proper label for the last repository check run
parent
547b8ad2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
8 deletions
+67
-8
ee/app/views/admin/geo/projects/_registry_synced.html.haml
ee/app/views/admin/geo/projects/_registry_synced.html.haml
+1
-1
ee/spec/features/admin/geo/admin_geo_projects_spec.rb
ee/spec/features/admin/geo/admin_geo_projects_spec.rb
+63
-4
locale/gitlab.pot
locale/gitlab.pot
+3
-3
No files found.
ee/app/views/admin/geo/projects/_registry_synced.html.haml
View file @
2e1d5ca3
...
...
@@ -15,7 +15,7 @@
=
s_
(
'Geo|Never'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Last
time verified
'
)
=
s_
(
'Geo|Last
repository check run
'
)
.project-status-content
-
if
project_registry
.
last_repository_check_at
=
time_ago_with_tooltip
(
project_registry
.
last_repository_check_at
,
placement:
'bottom'
)
...
...
ee/spec/features/admin/geo/admin_geo_projects_spec.rb
View file @
2e1d5ca3
...
...
@@ -15,10 +15,8 @@ describe 'admin Geo Projects', :js, :geo do
end
describe
'visiting geo projects initial page'
do
let
(
:page_url
)
{
admin_geo_projects_path
}
before
do
visit
(
page_url
)
visit
(
admin_geo_projects_path
)
wait_for_requests
end
...
...
@@ -48,7 +46,7 @@ describe 'admin Geo Projects', :js, :geo do
end
end
describe
'
visiting
specific tab in geo projects page'
do
describe
'
clicking on a
specific tab in geo projects page'
do
let
(
:page_url
)
{
admin_geo_projects_path
}
before
do
...
...
@@ -98,4 +96,65 @@ describe 'admin Geo Projects', :js, :geo do
end
end
end
shared_examples
'shows tab specific projects and correct labels'
do
before
do
visit
(
admin_geo_projects_path
(
sync_status:
sync_status
))
wait_for_requests
end
it
'shows tab specific projects'
do
page
.
within
(
find
(
'#content-body'
,
match: :first
))
do
expected_registries
.
each
do
|
registry
|
expect
(
page
).
to
have_content
(
registry
.
project
.
full_name
)
end
unexpected_registries
.
each
do
|
registry
|
expect
(
page
).
not_to
have_content
(
registry
.
project
.
full_name
)
end
end
page
.
within
(
find
(
'.project-card'
,
match: :first
))
do
labels
.
each
do
|
label
|
expect
(
page
).
to
have_content
(
label
)
end
end
end
end
describe
'visiting geo synced projects page'
do
let
(
:sync_status
)
{
:synced
}
let
(
:expected_registries
)
{
[
synced_registry
]
}
let
(
:unexpected_registries
)
{
[
sync_pending_registry
,
sync_failed_registry
,
never_synced_registry
]
}
let
(
:labels
)
{
[
'Status'
,
'Last successful sync'
,
'Last repository check run'
]
}
it_behaves_like
'shows tab specific projects and correct labels'
end
describe
'visiting geo pending synced projects page'
do
let
(
:sync_status
)
{
:pending
}
let
(
:expected_registries
)
{
[
sync_pending_registry
]
}
let
(
:unexpected_registries
)
{
[
synced_registry
,
sync_failed_registry
,
never_synced_registry
]
}
let
(
:labels
)
{
[
'Status'
,
'Next sync scheduled at'
,
'Last sync attempt'
]
}
it_behaves_like
'shows tab specific projects and correct labels'
end
describe
'visiting geo never synced projects page'
do
let
(
:sync_status
)
{
:never
}
let
(
:labels
)
{
[
'Status'
,
'Next sync scheduled at'
,
'Last sync attempt'
]
}
let
(
:expected_registries
)
{
[
never_synced_registry
]
}
let
(
:unexpected_registries
)
{
[
synced_registry
,
sync_pending_registry
,
sync_failed_registry
]
}
it_behaves_like
'shows tab specific projects and correct labels'
end
describe
'visiting geo failed sync projects page'
do
let
(
:sync_status
)
{
:failed
}
let
(
:expected_registries
)
{
[
sync_failed_registry
]
}
let
(
:unexpected_registries
)
{
[
synced_registry
,
sync_pending_registry
,
never_synced_registry
]
}
let
(
:labels
)
{
[
'Status'
,
'Next sync scheduled at'
,
'Last sync attempt'
]
}
it_behaves_like
'shows tab specific projects and correct labels'
end
end
locale/gitlab.pot
View file @
2e1d5ca3
...
...
@@ -4053,13 +4053,13 @@ msgstr ""
msgid "Geo|In sync"
msgstr ""
msgid "Geo|Last
successful sync
"
msgid "Geo|Last
repository check run
"
msgstr ""
msgid "Geo|Last s
ync attempt
"
msgid "Geo|Last s
uccessful sync
"
msgstr ""
msgid "Geo|Last
time verified
"
msgid "Geo|Last
sync attempt
"
msgstr ""
msgid "Geo|Never"
...
...
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