Align catalog with Bambu Lab product line, add conditional filters and admin sidebar
All checks were successful
Deploy / deploy (push) Successful in 2m24s
All checks were successful
Deploy / deploy (push) Successful in 2m24s
- Add master catalog (bambuLabCatalog.ts) as single source of truth for materials, finishes, colors, and refill/spool availability - Fix incorrect finish-per-material mappings (remove PLA: 85A/90A/95A HF/FR/GF/HF, add ASA: Basic/CF/Aero, fix PETG/PC) - Implement cascading filters on public site: material restricts finish, finish restricts color - Add AdminSidebar component across all admin pages - Redirect /upadaj to /dashboard when already authenticated - Update color hex mappings and tests to match official Bambu Lab names
This commit is contained in:
@@ -46,21 +46,18 @@ describe('UI Features Tests', () => {
|
||||
it('should have predefined material options', () => {
|
||||
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||
const adminContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||
|
||||
// Check for material select dropdown
|
||||
expect(adminContent).toContain('<option value="PLA">PLA</option>');
|
||||
expect(adminContent).toContain('<option value="PETG">PETG</option>');
|
||||
expect(adminContent).toContain('<option value="ABS">ABS</option>');
|
||||
|
||||
// Check for material select dropdown (now generated from catalog)
|
||||
expect(adminContent).toContain('getMaterialOptions()');
|
||||
expect(adminContent).toContain('Izaberi tip');
|
||||
});
|
||||
|
||||
it('should have admin header with navigation', () => {
|
||||
it('should have admin sidebar and header', () => {
|
||||
const adminDashboardPath = join(process.cwd(), 'app', 'dashboard', 'page.tsx');
|
||||
|
||||
const dashboardContent = readFileSync(adminDashboardPath, 'utf-8');
|
||||
|
||||
// Check for admin header
|
||||
expect(dashboardContent).toContain('Admin');
|
||||
expect(dashboardContent).toContain('Nazad na sajt');
|
||||
|
||||
// Check for admin sidebar and header
|
||||
expect(dashboardContent).toContain('AdminSidebar');
|
||||
expect(dashboardContent).toContain('Odjava');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user