Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ <h2 class="orc-font-body" i18n="@@interstitial.yourPrimaryEmailAddress">
class="email-category"
*ngIf="primaryEmailCategory === 'PROFESSIONAL'"
>
<mat-icon class="material-icons-outlined">work</mat-icon>
<mat-icon class="material-symbols-outlined">work</mat-icon>
<span class="orc-font-small-print" i18n="@@interstitial.professional"
>Professional</span
>
</div>
<div class="email-category" *ngIf="primaryEmailCategory === 'PERSONAL'">
<mat-icon class="material-icons-outlined">fingerprint</mat-icon>
<mat-icon class="material-symbols-outlined">fingerprint</mat-icon>
<span class="orc-font-small-print" i18n="@@interstitial.personal"
>Personal</span
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,33 @@ describe('BackupEmailComponent', () => {
expect(component.primaryEmailCategory).toBe('PROFESSIONAL')
})

// The outlined look comes from the Material Symbols font. The
// `material-icons-outlined` class these used to carry matches no loaded
// stylesheet, so it silently fell back to the filled font (PD-6198).
it('should draw the professional category icon in the outlined font', () => {
const icon = fixture.nativeElement.querySelector(
'.email-category mat-icon'
)

expect(icon.textContent.trim()).toBe('work')
expect(icon.classList).toContain('material-symbols-outlined')
})

it('should draw the personal category icon in the outlined font', () => {
emailCategory = () =>
of({ category: 'PERSONAL', rorId: null } as EmailCategoryEndpoint)

const newFixture = TestBed.createComponent(BackupEmailComponent)
newFixture.detectChanges()

const icon = newFixture.nativeElement.querySelector(
'.email-category mat-icon'
)

expect(icon.textContent.trim()).toBe('fingerprint')
expect(icon.classList).toContain('material-symbols-outlined')
})

it('should leave the category out when the lookup fails', () => {
emailCategory = () => throwError(() => new Error('lookup failed'))

Expand Down
Loading