2023-05-23 15:02:54 -07:00
|
|
|
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
|
|
|
|
import { NotFoundComponent } from './not-found.component'
|
2023-08-08 23:59:13 -07:00
|
|
|
import { By } from '@angular/platform-browser'
|
|
|
|
|
import { LogoComponent } from '../common/logo/logo.component'
|
2024-06-26 20:57:39 -07:00
|
|
|
import { provideHttpClientTesting } from '@angular/common/http/testing'
|
2024-01-19 22:28:32 -08:00
|
|
|
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
|
2024-06-26 20:57:39 -07:00
|
|
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
|
2023-05-23 15:02:54 -07:00
|
|
|
|
|
|
|
|
describe('NotFoundComponent', () => {
|
|
|
|
|
let component: NotFoundComponent
|
|
|
|
|
let fixture: ComponentFixture<NotFoundComponent>
|
|
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
|
TestBed.configureTestingModule({
|
2023-08-08 23:59:13 -07:00
|
|
|
declarations: [NotFoundComponent, LogoComponent],
|
2024-06-26 20:57:39 -07:00
|
|
|
imports: [NgxBootstrapIconsModule.pick(allIcons)],
|
|
|
|
|
providers: [
|
|
|
|
|
provideHttpClient(withInterceptorsFromDi()),
|
|
|
|
|
provideHttpClientTesting(),
|
2024-01-19 22:28:32 -08:00
|
|
|
],
|
2023-05-23 15:02:54 -07:00
|
|
|
}).compileComponents()
|
|
|
|
|
|
|
|
|
|
fixture = TestBed.createComponent(NotFoundComponent)
|
|
|
|
|
component = fixture.componentInstance
|
|
|
|
|
|
|
|
|
|
fixture.detectChanges()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
it('should create component', () => {
|
|
|
|
|
expect(component).toBeTruthy()
|
2023-08-08 23:59:13 -07:00
|
|
|
expect(fixture.nativeElement.textContent).toContain('Not Found')
|
|
|
|
|
expect(fixture.debugElement.queryAll(By.css('a'))).toHaveLength(1)
|
2023-05-23 15:02:54 -07:00
|
|
|
})
|
|
|
|
|
})
|