feat(dashboard): add full-size media preview
This commit is contained in:
1 parent
c483c7b8be
commit
654bbda457
5 files changed
+71
-7
No files matched your search
@@ -106,6 +106,21 @@ describe('media page', () => {
|
||||
expect(await screen.findByRole('img', { name: 'Media from alice' })).toHaveClass('is-blurred');
|
||||
});
|
||||
|
||||
it('opens revealed media in a dismissible full-size preview', async () => {
|
||||
installMediaApi();
|
||||
const user = userEvent.setup();
|
||||
renderMedia();
|
||||
|
||||
await user.click(await screen.findByRole('button', { name: 'Reveal media from alice' }));
|
||||
await user.click(screen.getByRole('button', { name: 'View media from alice larger' }));
|
||||
|
||||
const dialog = screen.getByRole('dialog', { name: 'Media from alice' });
|
||||
expect(within(dialog).getByRole('img', { name: 'Media from alice' })).toHaveAttribute('src', '/media/one.jpg');
|
||||
|
||||
await user.keyboard('{Escape}');
|
||||
expect(screen.queryByRole('dialog', { name: 'Media from alice' })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('filters by conversation, sender, media type, and age with an explicit no-match state', async () => {
|
||||
installMediaApi();
|
||||
const user = userEvent.setup();
|
||||
|
||||
Reference in new issue
Block a user