- Dashboard now accessible at /dashboard instead of /upadaj/dashboard - Updated all navigation links to use new /dashboard route - Login page still at /upadaj, redirects to /dashboard on success - Colors and requests remain under /upadaj prefix - Updated test files to reference new dashboard path
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('filamentService');
|
|
});
|
|
|
|
it('should use API service in all components', () => {
|
|
const pagePath = join(process.cwd(), 'app', 'page.tsx');
|
|
const adminPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
|
|
|
const pageContent = readFileSync(pagePath, 'utf-8');
|
|
const adminContent = readFileSync(adminPath, 'utf-8');
|
|
|
|
expect(pageContent).toContain('filamentService');
|
|
expect(adminContent).toContain('filamentService');
|
|
});
|
|
}); |