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
88e8ee0f
Commit
88e8ee0f
authored
Nov 07, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant specs for tooltip
parent
02e74971
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
33 deletions
+1
-33
app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
...ts/javascripts/vue_shared/components/time_ago_tooltip.vue
+1
-10
spec/javascripts/issue_show/components/edited_spec.js
spec/javascripts/issue_show/components/edited_spec.js
+0
-10
spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
...avascripts/vue_shared/components/time_ago_tooltip_spec.js
+0
-13
No files found.
app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
View file @
88e8ee0f
...
@@ -17,13 +17,6 @@ export default {
...
@@ -17,13 +17,6 @@ export default {
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
tooltipPlacement
:
{
type
:
String
,
required
:
false
,
default
:
'
top
'
,
},
cssClass
:
{
cssClass
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
...
@@ -37,8 +30,6 @@ export default {
...
@@ -37,8 +30,6 @@ export default {
v-gl-tooltip=
"
{ placement: tooltipPlacement }"
v-gl-tooltip=
"
{ placement: tooltipPlacement }"
:class="cssClass"
:class="cssClass"
:title="tooltipTitle(time)"
:title="tooltipTitle(time)"
:data-placement="tooltipPlacement"
v-text="timeFormated(time)">
v-text="timeFormated(time)"
>
</time>
</time>
</
template
>
</
template
>
spec/javascripts/issue_show/components/edited_spec.js
View file @
88e8ee0f
...
@@ -46,14 +46,4 @@ describe('edited', () => {
...
@@ -46,14 +46,4 @@ describe('edited', () => {
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author-link
'
)).
toBeFalsy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
.author-link
'
)).
toBeFalsy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeTruthy
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
)).
toBeTruthy
();
});
});
it
(
'
renders time ago tooltip at the bottom
'
,
()
=>
{
const
editedComponent
=
new
EditedComponent
({
propsData
:
{
updatedAt
:
'
2017-05-15T12:31:04.428Z
'
,
},
}).
$mount
();
expect
(
editedComponent
.
$el
.
querySelector
(
'
time
'
).
dataset
.
placement
).
toEqual
(
'
bottom
'
);
});
});
});
spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
View file @
88e8ee0f
...
@@ -26,24 +26,11 @@ describe('Time ago with tooltip component', () => {
...
@@ -26,24 +26,11 @@ describe('Time ago with tooltip component', () => {
formatDate
(
'
2017-05-08T14:57:39.781Z
'
),
formatDate
(
'
2017-05-08T14:57:39.781Z
'
),
);
);
expect
(
vm
.
$el
.
getAttribute
(
'
data-placement
'
)).
toEqual
(
'
top
'
);
const
timeago
=
getTimeago
();
const
timeago
=
getTimeago
();
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
timeago
.
format
(
'
2017-05-08T14:57:39.781Z
'
));
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
timeago
.
format
(
'
2017-05-08T14:57:39.781Z
'
));
});
});
it
(
'
should render tooltip placed in bottom
'
,
()
=>
{
vm
=
new
TimeagoTooltip
({
propsData
:
{
time
:
'
2017-05-08T14:57:39.781Z
'
,
tooltipPlacement
:
'
bottom
'
,
},
}).
$mount
();
expect
(
vm
.
$el
.
getAttribute
(
'
data-placement
'
)).
toEqual
(
'
bottom
'
);
});
it
(
'
should render provided html class
'
,
()
=>
{
it
(
'
should render provided html class
'
,
()
=>
{
vm
=
new
TimeagoTooltip
({
vm
=
new
TimeagoTooltip
({
propsData
:
{
propsData
:
{
...
...
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