- Import real data from PDF (35 Bambu Lab filaments) - Remove all Confluence integration and dependencies - Implement new V2 data structure with proper inventory tracking - Add backwards compatibility for existing data - Create enhanced UI components (ColorSwatch, InventoryBadge, MaterialBadge) - Add advanced filtering with quick filters and multi-criteria search - Organize codebase for dev/prod environments - Update Lambda functions to support both V1/V2 formats - Add inventory summary dashboard - Clean up project structure and documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import { readFileSync, existsSync } from 'fs';
|
|
import { join } from 'path';
|
|
|
|
describe('No Mock Data Tests', () => {
|
|
it('should not have data.json in public folder', () => {
|
|
const dataJsonPath = join(process.cwd(), 'public', 'data.json');
|
|
expect(existsSync(dataJsonPath)).toBe(false);
|
|
});
|
|
|
|
it('should not have fallback to data.json in page.tsx', () => {
|
|
const pagePath = join(process.cwd(), 'app', 'page.tsx');
|
|
const pageContent = readFileSync(pagePath, 'utf-8');
|
|
|
|
expect(pageContent).not.toContain('data.json');
|
|
expect(pageContent).not.toContain("'/data.json'");
|
|
expect(pageContent).toContain('API URL not configured');
|
|
});
|
|
|
|
it('should use NEXT_PUBLIC_API_URL in all components', () => {
|
|
const pagePath = join(process.cwd(), 'app', 'page.tsx');
|
|
const adminPath = join(process.cwd(), 'app', 'admin', 'dashboard', 'page.tsx');
|
|
|
|
const pageContent = readFileSync(pagePath, 'utf-8');
|
|
const adminContent = readFileSync(adminPath, 'utf-8');
|
|
|
|
expect(pageContent).toContain('process.env.NEXT_PUBLIC_API_URL');
|
|
expect(adminContent).toContain('process.env.NEXT_PUBLIC_API_URL');
|
|
});
|
|
}); |