Skip to content
Snippets Groups Projects

Consolidate user avatar Vue logic

Merged username-removed-408230 requested to merge user-avatar-vue-ce into master
All threads resolved!
1 file
+ 13
0
Compare changes
  • Side-by-side
  • Inline
@@ -29,6 +29,7 @@ describe('User Avatar Image Component', function () {
}).$mount();
this.userAvatarImage = this.vueInstance.$children[0];
this.imageElement = this.userAvatarImage.$refs.tooltipTarget;
});
it('should return a defined Vue component', function () {
@@ -56,10 +57,18 @@ describe('User Avatar Image Component', function () {
expect(this.userAvatarImage.tooltipContainer).toBe('body');
});
it('should properly render tooltipContainer', function () {
expect(this.imageElement).toContain('body');
});
it('should properly compute tooltipClass', function () {
expect(this.userAvatarImage.tooltipClass).toBe('has-tooltip');
});
it('should properly render tooltipClass', function () {
expect(this.imageElement).toContain('has-tooltip');
});
it('should properly compute avatarSizeClass', function () {
expect(this.userAvatarImage.avatarSizeClass).toBe('s99');
});
@@ -67,5 +76,9 @@ describe('User Avatar Image Component', function () {
it('should properly compute imgCssClasses', function () {
expect(this.userAvatarImage.imgCssClasses).toBe('avatar has-tooltip s99 myextraavatarclass');
});
it('should properly render imgCssClasses', function () {
expect(this.imageElement).toContain('avatar has-tooltip s99 myextraavatarclass');
});
});
});
Loading