diff options
Diffstat (limited to 'spec/frontend/members')
-rw-r--r-- | spec/frontend/members/components/table/members_table_spec.js | 19 | ||||
-rw-r--r-- | spec/frontend/members/mock_data.js | 3 |
2 files changed, 14 insertions, 8 deletions
diff --git a/spec/frontend/members/components/table/members_table_spec.js b/spec/frontend/members/components/table/members_table_spec.js index b2756e506eb..298a01e4f4d 100644 --- a/spec/frontend/members/components/table/members_table_spec.js +++ b/spec/frontend/members/components/table/members_table_spec.js @@ -10,6 +10,7 @@ import MemberAvatar from '~/members/components/table/member_avatar.vue'; import MemberSource from '~/members/components/table/member_source.vue'; import MembersTable from '~/members/components/table/members_table.vue'; import RoleDropdown from '~/members/components/table/role_dropdown.vue'; +import UserDate from '~/vue_shared/components/user_date.vue'; import { MEMBER_TYPES, MEMBER_STATE_CREATED, @@ -106,14 +107,16 @@ describe('MembersTable', () => { }; it.each` - field | label | member | expectedComponent - ${'account'} | ${'Account'} | ${memberMock} | ${MemberAvatar} - ${'source'} | ${'Source'} | ${memberMock} | ${MemberSource} - ${'granted'} | ${'Access granted'} | ${memberMock} | ${CreatedAt} - ${'invited'} | ${'Invited'} | ${invite} | ${CreatedAt} - ${'requested'} | ${'Requested'} | ${accessRequest} | ${CreatedAt} - ${'maxRole'} | ${'Max role'} | ${memberCanUpdate} | ${RoleDropdown} - ${'expiration'} | ${'Expiration'} | ${memberMock} | ${ExpirationDatepicker} + field | label | member | expectedComponent + ${'account'} | ${'Account'} | ${memberMock} | ${MemberAvatar} + ${'source'} | ${'Source'} | ${memberMock} | ${MemberSource} + ${'granted'} | ${'Access granted'} | ${memberMock} | ${CreatedAt} + ${'invited'} | ${'Invited'} | ${invite} | ${CreatedAt} + ${'requested'} | ${'Requested'} | ${accessRequest} | ${CreatedAt} + ${'maxRole'} | ${'Max role'} | ${memberCanUpdate} | ${RoleDropdown} + ${'expiration'} | ${'Expiration'} | ${memberMock} | ${ExpirationDatepicker} + ${'userCreatedAt'} | ${'Created on'} | ${memberMock} | ${UserDate} + ${'lastActivityOn'} | ${'Last activity'} | ${memberMock} | ${UserDate} `('renders the $label field', ({ field, label, member, expectedComponent }) => { createComponent({ members: [member], diff --git a/spec/frontend/members/mock_data.js b/spec/frontend/members/mock_data.js index 83856a00a15..06ccd107ce3 100644 --- a/spec/frontend/members/mock_data.js +++ b/spec/frontend/members/mock_data.js @@ -17,6 +17,7 @@ export const member = { state: MEMBER_STATE_CREATED, user: { id: 123, + createdAt: '2022-03-10T18:03:04.812Z', name: 'Administrator', username: 'root', webUrl: 'https://gitlab.com/root', @@ -26,6 +27,7 @@ export const member = { oncallSchedules: [{ name: 'schedule 1' }], escalationPolicies: [{ name: 'policy 1' }], availability: null, + lastActivityOn: '2022-03-15', showStatus: true, }, id: 238, @@ -56,6 +58,7 @@ export const group = { webUrl: 'https://gitlab.com/groups/parent-group/commit451', }, id: 3, + isDirectMember: true, createdAt: '2020-08-06T15:31:07.662Z', expiresAt: null, validRoles: { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 }, |