- 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
29 lines
1020 B
TypeScript
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);
|
|
});
|
|
});
|