feat: establish nightdrive visual foundation
This commit is contained in:
@@ -111,6 +111,25 @@ test('exposes the complete semantic portfolio from the generated document', asyn
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
test('loads the self-hosted Geist families for information and route text', async ({
|
||||
page,
|
||||
distUrl,
|
||||
}) => {
|
||||
await page.goto(distUrl, { waitUntil: 'domcontentloaded' });
|
||||
await page.evaluate(() => document.fonts.ready);
|
||||
|
||||
const fonts = await page.evaluate(() => ({
|
||||
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,
|
||||
}));
|
||||
|
||||
expect(fonts).toMatchObject({ sansLoaded: true, monoLoaded: true });
|
||||
expect(fonts.headingFamily).toContain('Geist Variable');
|
||||
expect(fonts.routeFamily).toContain('Geist Mono Variable');
|
||||
});
|
||||
|
||||
test('keeps canonical native anchors and safe external destinations', async ({
|
||||
page,
|
||||
distUrl,
|
||||
|
||||
@@ -53,6 +53,23 @@ describe('trusted Vite asset closure', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('accepts Vite emitted-asset records when a reachable module owns the emitted file', () => {
|
||||
const manifest = recursiveManifest();
|
||||
manifest['index.html']!.assets = [
|
||||
'assets/entry-logo-a1.webp',
|
||||
'assets/geist-latin-a1.woff2',
|
||||
];
|
||||
manifest['node_modules/font/files/geist-latin.woff2'] = {
|
||||
file: 'assets/geist-latin-a1.woff2',
|
||||
src: 'node_modules/font/files/geist-latin.woff2',
|
||||
};
|
||||
|
||||
expect(resolveViteAssetClosure(manifest).viteAssets).toEqual([
|
||||
'assets/entry-logo-a1.webp',
|
||||
'assets/geist-latin-a1.woff2',
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
{
|
||||
name: 'a missing exact index.html entry',
|
||||
|
||||
Reference in New Issue
Block a user