mirror of
https://git.shipoclu.com/moon/plspace.git
synced 2026-08-13 02:42:30 +00:00
refactor and fix all references to emojis
This commit is contained in:
@@ -91,4 +91,33 @@ describe('PollView', () => {
|
||||
expect(view.getByRole('link', { name: 'Sign in to vote' })).toHaveAttribute('href', '#/login')
|
||||
expect(view.queryByRole('button', { name: 'Vote' })).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('renders custom emoji in poll choices', () => {
|
||||
const view = render(PollView, {
|
||||
props: {
|
||||
poll: poll({
|
||||
options: [
|
||||
{ title: 'Choose :blobcat:', votes_count: null },
|
||||
{ title: 'No thanks', votes_count: null },
|
||||
],
|
||||
emojis: [
|
||||
{
|
||||
shortcode: 'blobcat',
|
||||
url: 'https://cdn.example/blobcat.png',
|
||||
static_url: 'https://cdn.example/blobcat.png',
|
||||
visible_in_picker: true,
|
||||
},
|
||||
],
|
||||
}),
|
||||
authorId: 'someone-else',
|
||||
},
|
||||
context: new Map([[APP_SERVICES, testServices()]]),
|
||||
})
|
||||
|
||||
expect(view.getByAltText(':blobcat:')).toHaveAttribute(
|
||||
'src',
|
||||
'https://cdn.example/blobcat.png',
|
||||
)
|
||||
expect(view.getByRole('radio', { name: 'Choose :blobcat:' })).toBeDisabled()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user