This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from wrth1337/general-polish-wrth1337
General polish wrth1337
- Loading branch information
Showing
5 changed files
with
30 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ describe('EditProfileComponent', () => { | |
lastName: 'Mustermann', | ||
birthdate: '01.01.2000', | ||
description: 'Beschreibung', | ||
experience: 'Erfahrung' | ||
experience: 'Erfahrung', | ||
picture: 'URL_DES_PROFILBILDS' | ||
}; | ||
localStorage.setItem('userData','{"email":"[email protected]","user_id":4}'); | ||
fixture.detectChanges(); | ||
|
@@ -74,16 +75,21 @@ describe('EditProfileComponent', () => { | |
}); | ||
|
||
it('should display placeholder when no profile picture is available', () => { | ||
component.userData = { | ||
firstName: 'Max', | ||
lastName: 'Mustermann', | ||
birthdate: '01.01.2000', | ||
description: 'Beschreibung', | ||
experience: 'Erfahrung', | ||
picture: '' | ||
}; | ||
fixture.detectChanges(); | ||
const el = fixture.debugElement.query(By.css('.bi-person-circle')); | ||
expect(el).toBeTruthy(); | ||
|
||
}); | ||
|
||
it('should display profile picture when available', () => { | ||
|
||
component.userData = { picture: 'URL_DES_PROFILBILDS' }; | ||
fixture.detectChanges(); | ||
|
||
const el = fixture.debugElement.query(By.css('.profilepicture')); | ||
const placeholder = fixture.debugElement.query(By.css('.bi-person-circle')); | ||
expect(placeholder).toBeFalsy(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters