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
Jérome Perrin
gitlab-ce
Commits
340aa444
Commit
340aa444
authored
May 25, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for dates on tooltips
parent
6ae82d57
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
app/views/users/show.html.haml
app/views/users/show.html.haml
+2
-2
spec/features/dashboard/datetime_on_tooltips_spec.rb
spec/features/dashboard/datetime_on_tooltips_spec.rb
+46
-0
No files found.
app/views/users/show.html.haml
View file @
340aa444
...
@@ -79,10 +79,10 @@
...
@@ -79,10 +79,10 @@
%li
.js-contributed-tab
%li
.js-contributed-tab
=
link_to
user_contributed_projects_path
,
data:
{
target:
'div#contributed'
,
action:
'contributed'
,
toggle:
'tab'
}
do
=
link_to
user_contributed_projects_path
,
data:
{
target:
'div#contributed'
,
action:
'contributed'
,
toggle:
'tab'
}
do
Contributed projects
Contributed projects
%li
.projects-tab
%li
.
js-
projects-tab
=
link_to
user_projects_path
,
data:
{
target:
'div#projects'
,
action:
'projects'
,
toggle:
'tab'
}
do
=
link_to
user_projects_path
,
data:
{
target:
'div#projects'
,
action:
'projects'
,
toggle:
'tab'
}
do
Personal projects
Personal projects
%li
.snippets-tab
%li
.
js-
snippets-tab
=
link_to
user_snippets_path
,
data:
{
target:
'div#snippets'
,
action:
'snippets'
,
toggle:
'tab'
}
do
=
link_to
user_snippets_path
,
data:
{
target:
'div#snippets'
,
action:
'snippets'
,
toggle:
'tab'
}
do
Snippets
Snippets
...
...
spec/features/dashboard/datetime_on_tooltips_spec.rb
0 → 100644
View file @
340aa444
require
'spec_helper'
feature
'Tooltips on .timeago dates'
,
feature:
true
,
js:
true
do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
name:
'test'
,
namespace:
user
.
namespace
)
}
let
(
:created_date
)
{
Date
.
yesterday
.
to_time
}
let
(
:expected_format
)
{
created_date
.
strftime
(
'%b %d, %Y %l:%M%P UTC'
)
}
context
'on the activity tab'
do
before
do
project
.
team
<<
[
user
,
:master
]
Event
.
create
(
project:
project
,
author_id:
user
.
id
,
action:
Event
::
JOINED
,
updated_at:
created_date
,
created_at:
created_date
)
login_as
user
visit
user_path
(
user
)
wait_for_ajax
()
page
.
find
(
'.js-timeago'
).
hover
end
it
'has the datetime formated correctly'
do
expect
(
page
).
to
have_selector
(
'.local-timeago'
,
text:
expected_format
)
end
end
context
'on the snippets tab'
do
before
do
project
.
team
<<
[
user
,
:master
]
create
(
:snippet
,
author:
user
,
updated_at:
created_date
,
created_at:
created_date
)
login_as
user
visit
user_snippets_path
(
user
)
wait_for_ajax
()
page
.
find
(
'.js-timeago'
).
hover
end
it
'has the datetime formated correctly'
do
expect
(
page
).
to
have_selector
(
'.local-timeago'
,
text:
expected_format
)
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