Commit 88e8ee0f authored by George Tsiolis's avatar George Tsiolis

Remove redundant specs for tooltip

parent 02e74971
...@@ -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>
...@@ -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');
});
}); });
...@@ -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: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment