This commit is contained in:
@@ -3,7 +3,7 @@ import { provideRouter } from '@angular/router';
|
||||
import { LandingPageComponent } from './landing-page.component';
|
||||
|
||||
describe('LandingPageComponent', () => {
|
||||
it('leads with the approved positioning and four case studies', async () => {
|
||||
async function render(): Promise<HTMLElement> {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [LandingPageComponent],
|
||||
providers: [provideRouter([])]
|
||||
@@ -11,34 +11,22 @@ describe('LandingPageComponent', () => {
|
||||
|
||||
const fixture = TestBed.createComponent(LandingPageComponent);
|
||||
fixture.detectChanges();
|
||||
const page = fixture.nativeElement as HTMLElement;
|
||||
return 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('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('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;
|
||||
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();
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user