feat: implement portfolio home page with split layout

This commit is contained in:
Ilia Mashkov
2026-05-05 09:42:04 +03:00
parent 24bf946cb0
commit 1a413e3d04
3 changed files with 37 additions and 51 deletions
@@ -50,19 +50,19 @@ describe('ProjectMetadata', () => {
it('year section has no brutal-border-top (first section)', () => {
const { container } = render(<ProjectMetadata {...DEFAULT_PROPS} />);
const sections = container.firstChild?.childNodes;
const sections = container.firstChild?.childNodes as NodeListOf<Element>;
expect(sections[0]).not.toHaveClass('brutal-border-top');
});
it('role section has brutal-border-top and pt-6', () => {
const { container } = render(<ProjectMetadata {...DEFAULT_PROPS} />);
const sections = container.firstChild?.childNodes;
const sections = container.firstChild?.childNodes as NodeListOf<Element>;
expect(sections[1]).toHaveClass('brutal-border-top', 'pt-6');
});
it('stack section has brutal-border-top and pt-6', () => {
const { container } = render(<ProjectMetadata {...DEFAULT_PROPS} />);
const sections = container.firstChild?.childNodes;
const sections = container.firstChild?.childNodes as NodeListOf<Element>;
expect(sections[2]).toHaveClass('brutal-border-top', 'pt-6');
});
@@ -22,7 +22,7 @@ describe('groupByKey', () => {
{ category: 'A', order: 1 },
{ category: 'A', order: 2 },
];
expect(groupByKey(items, 'category')['A']).toEqual([
expect(groupByKey(items, 'category').A).toEqual([
{ category: 'A', order: 1 },
{ category: 'A', order: 2 },
]);
@@ -41,7 +41,7 @@ describe('groupByKey', () => {
];
const result = groupByKey(items, 'type');
expect(Object.keys(result)).toHaveLength(1);
expect(result['X']).toHaveLength(2);
expect(result.X).toHaveLength(2);
});
it('handles single item', () => {