import { TestBed } from '@angular/core/testing'; import { provideRouter } from '@angular/router'; import { LandingPageComponent } from './landing-page.component'; describe('LandingPageComponent', () => { it('leads with the approved positioning and four case studies', async () => { await TestBed.configureTestingModule({ imports: [LandingPageComponent], providers: [provideRouter([])] }).compileComponents(); const fixture = TestBed.createComponent(LandingPageComponent); fixture.detectChanges(); const page = fixture.nativeElement as HTMLElement; expect(page.querySelector('h1')?.textContent).toContain( 'I modernize complex software and connect it safely to AI.' ); expect(page.querySelectorAll('[data-testid="project-row"]').length).toBe(4); expect(page.textContent).toContain('Secure AI Integration Gateway'); expect(page.textContent).toContain('Travel Operations & Automation Platform'); expect(page.textContent).toContain('Multitenant Service Operations Platform'); expect(page.textContent).toContain('Biodiversity Data & Field Research Platform'); }); it('offers direct contact, CV, LinkedIn, and the complete role history', async () => { await TestBed.configureTestingModule({ imports: [LandingPageComponent], providers: [provideRouter([])] }).compileComponents(); const fixture = TestBed.createComponent(LandingPageComponent); fixture.detectChanges(); const page = fixture.nativeElement as HTMLElement; expect(page.querySelector('a[href="mailto:amar@dzanan.net"]')).toBeTruthy(); expect(page.querySelector('a[href="/cv"]')).toBeTruthy(); expect(page.querySelector('a[href="https://www.linkedin.com/in/amardzanan/"]')).toBeTruthy(); expect(page.textContent).toContain('Senior Software Engineer'); expect(page.textContent).toContain('Product Owner'); expect(page.textContent).toContain('Software Developer'); expect(page.textContent).toContain('Junior Software Developer'); }); });