import { TestBed } from '@angular/core/testing'; import { provideRouter } from '@angular/router'; import { LandingPageComponent } from './landing-page.component'; describe('LandingPageComponent', () => { async function render(): Promise { await TestBed.configureTestingModule({ imports: [LandingPageComponent], providers: [provideRouter([])] }).compileComponents(); const fixture = TestBed.createComponent(LandingPageComponent); fixture.detectChanges(); return fixture.nativeElement as HTMLElement; } it('leads with the positioning and the profile terminal', async () => { const page = await render(); expect(page.querySelector('h1')?.textContent).toContain('Complex systems, understood before changed.'); expect(page.querySelector('[data-testid="profile-terminal"]')?.textContent).toContain('"open_to"'); }); it('indexes every section page and offers direct contact', async () => { const page = await render(); for (const href of ['/work', '/experience', '/cv', '/contact']) { expect(page.querySelector(`[data-testid="index-row"][href="${href}"]`)).withContext(href).toBeTruthy(); } expect(page.querySelector('a[href="mailto:amar@dzanan.net"]')).toBeTruthy(); }); });