diff options
Diffstat (limited to 'spec/frontend/admin/users/components/users_table_spec.js')
-rw-r--r-- | spec/frontend/admin/users/components/users_table_spec.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/frontend/admin/users/components/users_table_spec.js b/spec/frontend/admin/users/components/users_table_spec.js index ba36e1e32ef..b79d2d4d39d 100644 --- a/spec/frontend/admin/users/components/users_table_spec.js +++ b/spec/frontend/admin/users/components/users_table_spec.js @@ -2,6 +2,7 @@ import { GlTable } from '@gitlab/ui'; import { mount } from '@vue/test-utils'; import AdminUsersTable from '~/admin/users/components/users_table.vue'; +import AdminUserAvatar from '~/admin/users/components/user_avatar.vue'; import { users, paths } from '../mock_data'; describe('AdminUsersTable component', () => { @@ -44,8 +45,12 @@ describe('AdminUsersTable component', () => { ${'projectsCount'} | ${'Projects'} ${'createdAt'} | ${'Created on'} ${'lastActivityOn'} | ${'Last activity'} - `('renders users.$key for $label', ({ key, label }) => { - expect(getCellByLabel(0, label).text()).toBe(`${user[key]}`); + `('renders users.$key in column $label', ({ key, label }) => { + expect(getCellByLabel(0, label).text()).toContain(`${user[key]}`); + }); + + it('renders an AdminUserAvatar component', () => { + expect(getCellByLabel(0, 'Name').find(AdminUserAvatar).exists()).toBe(true); }); }); |