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
be9f9938
Commit
be9f9938
authored
Oct 20, 2020
by
Vasilii Iakliushin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable a custom tooltip initialization
Close
https://gitlab.com/gitlab-org/gitlab/-/issues/249793
parent
ecf8d59f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
11 deletions
+6
-11
app/assets/javascripts/lib/utils/datetime_utility.js
app/assets/javascripts/lib/utils/datetime_utility.js
+0
-4
spec/features/dashboard/datetime_on_tooltips_spec.rb
spec/features/dashboard/datetime_on_tooltips_spec.rb
+1
-1
spec/features/projects/pipeline_schedules_spec.rb
spec/features/projects/pipeline_schedules_spec.rb
+1
-1
spec/frontend/lib/utils/datetime_utility_spec.js
spec/frontend/lib/utils/datetime_utility_spec.js
+4
-5
No files found.
app/assets/javascripts/lib/utils/datetime_utility.js
View file @
be9f9938
...
...
@@ -206,10 +206,6 @@ export const localTimeAgo = ($timeagoEls, setTimeago = true) => {
$timeagoEls
.
each
((
i
,
el
)
=>
{
// Recreate with custom template
el
.
setAttribute
(
'
title
'
,
formatDate
(
el
.
dateTime
));
$
(
el
).
tooltip
({
template
:
'
<div class="tooltip local-timeago" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>
'
,
});
});
}
...
...
spec/features/dashboard/datetime_on_tooltips_spec.rb
View file @
be9f9938
...
...
@@ -49,7 +49,7 @@ RSpec.describe 'Tooltips on .timeago dates', :js do
end
def
datetime_in_tooltip
datetime_text
=
page
.
find
(
'.
local-timeago
'
).
text
datetime_text
=
page
.
find
(
'.
tooltip
'
).
text
DateTime
.
parse
(
datetime_text
)
end
end
spec/features/projects/pipeline_schedules_spec.rb
View file @
be9f9938
...
...
@@ -24,7 +24,7 @@ RSpec.describe 'Pipeline Schedules', :js do
it
'displays the required information description'
do
page
.
within
(
'.pipeline-schedule-table-row'
)
do
expect
(
page
).
to
have_content
(
'pipeline schedule'
)
expect
(
find
(
".next-run-cell time"
)[
'
data-original-
title'
])
expect
(
find
(
".next-run-cell time"
)[
'title'
])
.
to
include
(
pipeline_schedule
.
real_next_run
.
strftime
(
'%b %-d, %Y'
))
expect
(
page
).
to
have_link
(
'master'
)
expect
(
page
).
to
have_link
(
"#
#{
pipeline
.
id
}
"
)
...
...
spec/frontend/lib/utils/datetime_utility_spec.js
View file @
be9f9938
...
...
@@ -643,16 +643,15 @@ describe('localTimeAgo', () => {
});
it
.
each
`
timeagoArg | title
| dataOriginalTitle
${
false
}
|
${
'
some time
'
}
|
${
null
}
${
true
}
|
${
'
'
}
|
${
'
Feb 18, 2020 10:22pm GMT+0000
'
}
`
(
'
converts $seconds seconds to $approximation
'
,
({
timeagoArg
,
title
,
dataOriginalTitle
})
=>
{
timeagoArg | title
${
false
}
|
${
'
some time
'
}
${
true
}
|
${
'
Feb 18, 2020 10:22pm GMT+0000
'
}
`
(
'
converts $seconds seconds to $approximation
'
,
({
timeagoArg
,
title
})
=>
{
const
element
=
document
.
querySelector
(
'
time
'
);
datetimeUtility
.
localTimeAgo
(
$
(
element
),
timeagoArg
);
jest
.
runAllTimers
();
expect
(
element
.
getAttribute
(
'
data-original-title
'
)).
toBe
(
dataOriginalTitle
);
expect
(
element
.
getAttribute
(
'
title
'
)).
toBe
(
title
);
});
});
...
...
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