diff --git a/.gitignore b/.gitignore index a237787..449034a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,5 +42,8 @@ tests/e2e/test_firmware.zip # NickelMenu build artifacts nickelmenu/kobo-config/ +# Proposals +proposals/ + # Claude .claude diff --git a/tests/e2e/integration.spec.js b/tests/e2e/integration.spec.js index 1126a20..ccf4f8b 100644 --- a/tests/e2e/integration.spec.js +++ b/tests/e2e/integration.spec.js @@ -1150,3 +1150,57 @@ test.describe('Custom patches', () => { await expect(page.locator('#step-connect')).not.toBeHidden(); }); }); + +// ============================================================ +// Build output +// ============================================================ + +test.describe('Build output', () => { + const path = require('path'); + const distDir = path.join(__dirname, '..', '..', 'web', 'dist'); + + test('CSS cache-bust hash is present on style.css link', async () => { + const html = fs.readFileSync(path.join(distDir, 'index.html'), 'utf-8'); + expect(html).toMatch(/css\/style\.css\?h=[0-9a-f]{8}/); + }); + + test('JS cache-bust hash is present on bundle.js script', async () => { + const html = fs.readFileSync(path.join(distDir, 'index.html'), 'utf-8'); + expect(html).toMatch(/bundle\.js\?h=[0-9a-f]{8}/); + }); + + test('critical CSS is inlined with :root tokens', async () => { + const html = fs.readFileSync(path.join(distDir, 'index.html'), 'utf-8'); + // :root block should be inside an inline ` + ); + // Remove all