Feature: app branding (#5357)

This commit is contained in:
shamoon 2024-01-13 11:57:25 -08:00 committed by GitHub
parent 2da5e46386
commit 2a6e79acc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 675 additions and 118 deletions

View file

@ -2,15 +2,21 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'
import { LogoComponent } from './logo.component'
import { By } from '@angular/platform-browser'
import { HttpClientTestingModule } from '@angular/common/http/testing'
import { SettingsService } from 'src/app/services/settings.service'
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
describe('LogoComponent', () => {
let component: LogoComponent
let fixture: ComponentFixture<LogoComponent>
let settingsService: SettingsService
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [LogoComponent],
imports: [HttpClientTestingModule],
})
settingsService = TestBed.inject(SettingsService)
fixture = TestBed.createComponent(LogoComponent)
component = fixture.componentInstance
fixture.detectChanges()
@ -33,4 +39,9 @@ describe('LogoComponent', () => {
'height:10em'
)
})
it('should support getting custom logo', () => {
settingsService.set(SETTINGS_KEYS.APP_LOGO, '/logo/test.png')
expect(component.customLogo).toEqual('http://localhost:8000/logo/test.png')
})
})