Skip to content

Commit

Permalink
[DURACOM-195] user menu test
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-negretti committed Dec 5, 2023
1 parent afc0299 commit e7d4b21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ds-themed-loading *ngIf="(loading$ | async)"></ds-themed-loading>
<ul *ngIf="!(loading$ | async)" class="user-menu" role="menu" [attr.aria-label]="'nav.user-profile-menu-and-logout' |translate" id="user-menu-dropdown">
<li class="menu-item-wrapper" role="presentation">
<li class="menu-item-wrapper username-email-wrapper" role="presentation">
{{dsoNameService.getName(user$ | async)}}<br>
<span class="text-muted">{{(user$ | async)?.email}}</span>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe('UserMenuComponent', () => {

fixture.detectChanges();

deUserMenu = fixture.debugElement.query(By.css('div'));
deUserMenu = fixture.debugElement.query(By.css('ul#user-menu-dropdown'));
}));

afterEach(() => {
Expand All @@ -164,7 +164,7 @@ describe('UserMenuComponent', () => {
it('should display user name and email', () => {
const username = 'User Test';
const email = '[email protected]';
const span = deUserMenu.query(By.css('.dropdown-item-text'));
const span = deUserMenu.query(By.css('.username-email-wrapper'));
expect(span).toBeDefined();
expect(span.nativeElement.innerHTML).toContain(username);
expect(span.nativeElement.innerHTML).toContain(email);
Expand Down

0 comments on commit e7d4b21

Please sign in to comment.