Files
inkreach-official-website/apps/website/test/ProductCenterLayout.test.ts
T
yeuimu 79fabd85f7 feat(product-center): implement Figma-designed UI, upload module, and website tests
- Redesign website homepage & product-center per Figma (fonts, logos, hero/footer/customer cases)
- Add API upload module (multer) with static serving for uploads/public assets
- Add OriginGood.delisted flag and SDS request retry logic
- Add admin ImageUpload component and goods import/upload flows
- Add vitest suite for website components and composables (32 tests)
- Add skills, docs, plans and PRODUCT.md
2026-08-20 14:32:03 +08:00

29 lines
1020 B
TypeScript

import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { describe, expect, it } from 'vitest';
describe('product center layout', () => {
it('removes the sidebar left edge and extends filter dividers to the viewport right', () => {
const source = readFileSync(
resolve(process.cwd(), 'app/pages/product-center.vue'),
'utf8',
);
expect(source).not.toMatch(/\.sidebar-shell\s*\{[^}]*border-left:/u);
expect(source).toContain('.countries::after, .filter-tools::after');
expect(source).toContain('right: calc(-1 * var(--page-gutter))');
expect(source).toContain('left: 0');
expect(source).toContain('height: 1px');
expect(source).toContain('background: #e5e7eb');
});
it('adds breathing room between root category rows', () => {
const source = readFileSync(
resolve(process.cwd(), 'app/components/product/ProductSidebar.vue'),
'utf8',
);
expect(source).toMatch(/\.root-row\s*\{[^}]*margin-bottom:\s*10px/u);
});
});