Barazo default frontend barazo.forum
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(web): update component tests for author display name

Tests now check for author.displayName instead of raw authorDid,
matching the updated component rendering from P2.8.

+6 -4
+3 -2
src/components/reply-card.test.tsx
··· 20 20 expect(screen.getByText(reply.content)).toBeInTheDocument() 21 21 }) 22 22 23 - it('renders author handle', () => { 23 + it('renders author display name', () => { 24 24 render(<ReplyCard reply={reply} postNumber={2} />) 25 - expect(screen.getByText(reply.authorDid)).toBeInTheDocument() 25 + const expectedName = reply.author?.displayName ?? reply.author?.handle ?? reply.authorDid 26 + expect(screen.getByText(expectedName)).toBeInTheDocument() 26 27 }) 27 28 28 29 it('renders as article with aria-labelledby', () => {
+3 -2
src/components/topic-card.test.tsx
··· 13 13 expect(link).toBeInTheDocument() 14 14 }) 15 15 16 - it('renders author handle', () => { 16 + it('renders author display name', () => { 17 17 render(<TopicCard topic={topic} />) 18 - expect(screen.getByText(topic.authorDid)).toBeInTheDocument() 18 + const expectedName = topic.author?.displayName ?? topic.author?.handle ?? topic.authorDid 19 + expect(screen.getByText(expectedName)).toBeInTheDocument() 19 20 }) 20 21 21 22 it('renders category', () => {