summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Tsiolis <tsiolis.g@gmail.com>2018-11-07 01:10:31 +0200
committerGeorge Tsiolis <tsiolis.g@gmail.com>2018-11-21 23:11:41 +0200
commit88e8ee0f6ce16c1bf2f4f57656fe9bce759c2641 (patch)
tree62ca036ef0017029cd49adbef8454ca17da1e64f
parent02e74971663d14e5c43f89b6911766ce2062ed39 (diff)
downloadgitlab-ce-88e8ee0f6ce16c1bf2f4f57656fe9bce759c2641.tar.gz
Remove redundant specs for tooltip
-rw-r--r--app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue11
-rw-r--r--spec/javascripts/issue_show/components/edited_spec.js10
-rw-r--r--spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js13
3 files changed, 1 insertions, 33 deletions
diff --git a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
index 58205d8bc69..abaac1cf8a6 100644
--- a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
+++ b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
@@ -17,13 +17,6 @@ export default {
type: String,
required: true,
},
-
- tooltipPlacement: {
- type: String,
- required: false,
- default: 'top',
- },
-
cssClass: {
type: String,
required: false,
@@ -37,8 +30,6 @@ export default {
v-gl-tooltip="{ placement: tooltipPlacement }"
:class="cssClass"
:title="tooltipTitle(time)"
- :data-placement="tooltipPlacement"
- v-text="timeFormated(time)"
- >
+ v-text="timeFormated(time)">
</time>
</template>
diff --git a/spec/javascripts/issue_show/components/edited_spec.js b/spec/javascripts/issue_show/components/edited_spec.js
index 7f09db837bb..a1683f060c0 100644
--- a/spec/javascripts/issue_show/components/edited_spec.js
+++ b/spec/javascripts/issue_show/components/edited_spec.js
@@ -46,14 +46,4 @@ describe('edited', () => {
expect(editedComponent.$el.querySelector('.author-link')).toBeFalsy();
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');
- });
});
diff --git a/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js b/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
index 745571d0a97..536bb57b946 100644
--- a/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
+++ b/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
@@ -26,24 +26,11 @@ describe('Time ago with tooltip component', () => {
formatDate('2017-05-08T14:57:39.781Z'),
);
- expect(vm.$el.getAttribute('data-placement')).toEqual('top');
-
const timeago = getTimeago();
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', () => {
vm = new TimeagoTooltip({
propsData: {