feat: ExperienceCard stack field and Card subcomponent layout

This commit is contained in:
Ilia Mashkov
2026-05-18 12:39:41 +03:00
parent 543020f85c
commit 782c619a91
5 changed files with 36 additions and 13 deletions
@@ -6,6 +6,7 @@ const DEFAULT_PROPS = {
company: 'Acme Corp',
period: '2021 2024',
description: 'Built scalable frontend systems.',
stack: [],
};
describe('ExperienceCard', () => {
@@ -32,9 +33,9 @@ describe('ExperienceCard', () => {
});
describe('structure', () => {
it('title is rendered as an h4', () => {
it('title is rendered as an h3', () => {
render(<ExperienceCard {...DEFAULT_PROPS} />);
expect(screen.getByRole('heading', { level: 4 })).toHaveTextContent('Senior Developer');
expect(screen.getByRole('heading', { level: 3 })).toHaveTextContent('Senior Developer');
});
it('period badge has brutal-border, bg-blue, text-cream, text-sm', () => {
@@ -43,11 +44,11 @@ describe('ExperienceCard', () => {
expect(badge).toHaveClass('brutal-border', 'bg-blue', 'text-cream', 'text-sm');
});
it('company paragraph has opacity-80', () => {
it('company paragraph has opacity-60', () => {
render(<ExperienceCard {...DEFAULT_PROPS} />);
const company = screen.getByText('Acme Corp');
expect(company.tagName).toBe('P');
expect(company).toHaveClass('opacity-80');
expect(company).toHaveClass('opacity-60');
});
it('description renders via RichText with rich-text class', () => {