[AAE-9310] Add missing initial on task assignment dialog (#7694)

* [AAE-9310] Add missing initial on task assignment dialog

* [AAE-9310] rewrite full-name pipe

* [AAE-9310] improved build username or email

* Trigger travis

* [AAE-9310] improve buildFromUsernameOrEmail
This commit is contained in:
Tomasz Gnyp
2022-07-04 19:09:26 +02:00
committed by GitHub
parent fbda085d48
commit 1a9c79c2a7
6 changed files with 76 additions and 63 deletions

View File

@@ -354,34 +354,6 @@ describe('User info component', () => {
expect(fullNameElement.textContent).not.toContain('fake-first-name');
});
it('should not show first name if it is null string', async () => {
const wrongFirstNameBpmUser: BpmUserModel = new BpmUserModel({
firstName: 'null',
lastName: 'fake-last-name'
});
getCurrentUserInfoStub.and.returnValue(of(wrongFirstNameBpmUser));
await whenFixtureReady();
expect(element.querySelector('#userinfo_container')).toBeDefined();
expect(element.querySelector('#adf-userinfo-bpm-name-display')).toBeDefined();
expect(element.querySelector('#adf-userinfo-bpm-name-display').textContent).toContain('fake-last-name');
expect(element.querySelector('#adf-userinfo-bpm-name-display').textContent).not.toContain('null');
});
it('should not show last name if it is null string', async () => {
const wrongLastNameBpmUser: BpmUserModel = new BpmUserModel({
firstName: 'fake-first-name',
lastName: 'null'
});
getCurrentUserInfoStub.and.returnValue(of(wrongLastNameBpmUser));
await whenFixtureReady();
expect(element.querySelector('#userinfo_container')).toBeDefined();
expect(element.querySelector('#adf-userinfo-bpm-name-display')).toBeDefined();
expect(element.querySelector('#adf-userinfo-bpm-name-display').textContent).toContain('fake-first-name');
expect(element.querySelector('#adf-userinfo-bpm-name-display').textContent).not.toContain('null');
});
it('should not show the tabs', async () => {
await whenFixtureReady();
openUserInfo();