提交 c38d624b 编写于 作者: F Filipa Lacerda

Merge branch 'fix-timeago-tooltip-attribute' into 'master'

Fix invalid attribute used for time-ago-tooltip component

Closes #37163

See merge request !13899
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
Edited Edited
<time-ago-tooltip <time-ago-tooltip
v-if="updatedAt" v-if="updatedAt"
placement="bottom" tooltip-placement="bottom"
:time="updatedAt" :time="updatedAt"
/> />
<span <span
......
...@@ -46,4 +46,14 @@ describe('edited', () => { ...@@ -46,4 +46,14 @@ 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');
});
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册