feat: compose the portfolio journey layer
This commit is contained in:
@@ -15,14 +15,13 @@ const sectionIds = [
|
||||
] as const;
|
||||
|
||||
const sectionHeadings = [
|
||||
'START',
|
||||
'PROFILE',
|
||||
'EXPERIENCE',
|
||||
'INFRASTRUCTURE',
|
||||
'SELECTED BUILDS',
|
||||
'ADDITIONAL WORK',
|
||||
'TOOLKIT',
|
||||
'CONTACT',
|
||||
'Profile',
|
||||
'Experience',
|
||||
'Infrastructure',
|
||||
'Selected builds',
|
||||
'Additional work',
|
||||
'Toolkit',
|
||||
'Contact',
|
||||
] as const;
|
||||
|
||||
const rawStatus = async (
|
||||
@@ -81,8 +80,8 @@ test('exposes the complete semantic portfolio from the generated document', asyn
|
||||
await page.goto(distUrl, { waitUntil: 'domcontentloaded' });
|
||||
|
||||
await expect(page.locator('h1:visible')).toHaveCount(1);
|
||||
await expect(page.locator('h1')).toHaveText('Luca Pîslaru');
|
||||
await expect(page.locator('.site-header > p').first()).toHaveText(
|
||||
await expect(page.locator('#start h1')).toHaveText('Luca Pîslaru');
|
||||
await expect(page.locator('.hero-journey__role')).toHaveText(
|
||||
'System Administrator & Full-Stack Developer',
|
||||
);
|
||||
await expect(page.locator('main')).toHaveCount(1);
|
||||
@@ -99,6 +98,9 @@ test('exposes the complete semantic portfolio from the generated document', asyn
|
||||
expect(await page.locator('main > section > h2').allTextContents()).toEqual(
|
||||
sectionHeadings,
|
||||
);
|
||||
await expect(page.locator('.route-label')).toHaveCount(0);
|
||||
await expect(page.getByRole('link', { name: 'Explore work' })).toHaveAttribute('href', '#selected-builds');
|
||||
await expect(page.getByRole('link', { name: 'Start a conversation' })).toHaveAttribute('href', 'mailto:luca.pislaru@gmail.com');
|
||||
expect(
|
||||
await page.locator('h1, h2, h3').evaluateAll((headings) => {
|
||||
const levels = headings.map((heading) =>
|
||||
@@ -122,7 +124,7 @@ test('loads the self-hosted Geist families for information and route text', asyn
|
||||
sansLoaded: document.fonts.check('16px "Geist Variable"'),
|
||||
monoLoaded: document.fonts.check('16px "Geist Mono Variable"'),
|
||||
headingFamily: getComputedStyle(document.querySelector('h1')!).fontFamily,
|
||||
routeFamily: getComputedStyle(document.querySelector('.route-label')!).fontFamily,
|
||||
routeFamily: getComputedStyle(document.querySelector('.section-eyebrow')!).fontFamily,
|
||||
}));
|
||||
|
||||
expect(fonts).toMatchObject({ sansLoaded: true, monoLoaded: true });
|
||||
@@ -149,7 +151,7 @@ test('keeps canonical native anchors and safe external destinations', async ({
|
||||
|
||||
const email = page.locator('a[href^="mailto:"]');
|
||||
await expect(email).toHaveCount(1);
|
||||
await expect(email).toHaveText('luca.pislaru@gmail.com');
|
||||
await expect(email).toHaveText('Start a conversation');
|
||||
|
||||
const externalLinks = page.locator('#contact a[target="_blank"]');
|
||||
await expect(externalLinks).toHaveCount(3);
|
||||
|
||||
Reference in New Issue
Block a user