Update reporter to use username instead of full name (#121820)

* Update reporter fto use username instead of full name

* Fix test for username

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
This commit is contained in:
Kristof C 2021-12-22 08:28:36 -06:00 committed by GitHub
parent 5e174d2b1a
commit f7dee0088f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -174,7 +174,7 @@ describe('AllCasesListGeneric', () => {
wrapper.find(`span[data-test-subj="case-table-column-tags-0"]`).first().prop('title')
).toEqual(useGetCasesMockState.data.cases[0].tags[0]);
expect(wrapper.find(`[data-test-subj="case-table-column-createdBy"]`).first().text()).toEqual(
useGetCasesMockState.data.cases[0].createdBy.fullName
useGetCasesMockState.data.cases[0].createdBy.username
);
expect(
wrapper

View file

@ -211,7 +211,7 @@ export const useCasesColumns = ({
size="s"
/>
<Spacer data-test-subj="case-table-column-createdBy">
{createdBy.fullName ? createdBy.fullName : createdBy.username ?? i18n.UNKNOWN}
{createdBy.username ?? i18n.UNKNOWN}
</Spacer>
</>
);