diff --git a/frontend/src/components/UserCard.spec.js b/frontend/src/components/UserCard.spec.js index c78d77943..6977917f5 100644 --- a/frontend/src/components/UserCard.spec.js +++ b/frontend/src/components/UserCard.spec.js @@ -11,7 +11,8 @@ describe('UserCard', () => { $n: jest.fn((n) => String(n)), $store: { state: { - email: 'user@example.org', + firstName: 'Bibi', + lastName: 'Bloxberg', }, }, } @@ -28,5 +29,12 @@ describe('UserCard', () => { it('renders the Div Element ".userdata-card"', () => { expect(wrapper.find('div.userdata-card').exists()).toBeTruthy() }) + it('renders the SPAN Element ".b-avatar"', () => { + expect(wrapper.find('span.b-avatar').exists()).toBeTruthy() + }) + + it('find the first letters of the firstName and lastName', () => { + expect(wrapper.find('span.b-avatar').text()).toBe('B B') + }) }) }) diff --git a/frontend/src/components/UserCard.vue b/frontend/src/components/UserCard.vue index e1c872cc8..2ed17403b 100755 --- a/frontend/src/components/UserCard.vue +++ b/frontend/src/components/UserCard.vue @@ -1,7 +1,9 @@