Initial commit: Brachnha Insight project setup
- Next.js 14+ with App Router and TypeScript - Tailwind CSS and ShadCN UI styling - Zustand state management - Dexie.js for IndexedDB (local-first data) - Auth.js v5 for authentication - BMAD framework integration Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
45
tests/integration/pwa-manifest.test.ts
Normal file
45
tests/integration/pwa-manifest.test.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('PWA Manifest', () => {
|
||||
test('should serve a valid manifest.webmanifest', async ({ request }) => {
|
||||
const response = await request.get('/manifest.webmanifest');
|
||||
expect(response.status()).toBe(200);
|
||||
expect(response.headers()['content-type']).toContain('application/manifest+json');
|
||||
|
||||
const manifest = await response.json();
|
||||
|
||||
// Core properties matching manifest.ts
|
||||
expect(manifest.name).toBe('Test01');
|
||||
expect(manifest.short_name).toBe('Test01');
|
||||
expect(manifest.display).toBe('standalone');
|
||||
expect(manifest.start_url).toBe('/');
|
||||
expect(manifest.background_color).toBe('#F8FAFC');
|
||||
expect(manifest.theme_color).toBe('#64748B');
|
||||
|
||||
// Icons
|
||||
expect(manifest.icons.length).toBeGreaterThanOrEqual(2);
|
||||
expect(manifest.icons).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
src: '/icons/icon-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
}),
|
||||
expect.objectContaining({
|
||||
src: '/icons/icon-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
})
|
||||
])
|
||||
);
|
||||
});
|
||||
|
||||
test('should have accessible icon files', async ({ request }) => {
|
||||
const icon192 = await request.get('/icons/icon-192x192.png');
|
||||
expect(icon192.status()).toBe(200);
|
||||
|
||||
const icon512 = await request.get('/icons/icon-512x512.png');
|
||||
expect(icon512.status()).toBe(200);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user