feat: mettre en valeur les mentions et afficher l'heure des commentaires
This commit is contained in:
@@ -34,4 +34,18 @@ describe('Komante', () => {
|
||||
expect(screen.getByRole('link', {name: 'Quelqu\'un'})).toHaveAttribute('href', 'https://mastodon.social/@quelqun')
|
||||
expect(screen.getByRole('link', {name: /voir sur mastodon/i})).toHaveAttribute('href', 'https://bokante.o-k-i.net/@quelqun/1')
|
||||
})
|
||||
|
||||
it('met en valeur les mentions @ dans le contenu', () => {
|
||||
render(<Komante commentaires={[{
|
||||
id: 3,
|
||||
contenu: '@pawol_nu oh oh ye ye, avec @cybermawonaj@bokante.o-k-i.net aussi',
|
||||
origine: 'activitypub',
|
||||
auteurNom: 'Quelqu\'un'
|
||||
}]} />)
|
||||
|
||||
const mansyon = screen.getByText('@pawol_nu')
|
||||
expect(mansyon).toBeInTheDocument()
|
||||
expect(screen.getByText('@cybermawonaj@bokante.o-k-i.net')).toBeInTheDocument()
|
||||
expect(screen.getByText(/oh oh ye ye/)).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user