mirror of
https://github.com/immich-app/immich.git
synced 2026-03-20 16:37:54 -04:00
fix(web): allow images to be downloaded again(long-press or right click) (#26992)
This commit is contained in:
parent
694ea151f5
commit
88002cf7fe
@ -64,6 +64,20 @@ test.describe('Photo Viewer', () => {
|
||||
await expect(original).toHaveAttribute('src', /fullsize/);
|
||||
});
|
||||
|
||||
test('right-click targets the img element', async ({ page }) => {
|
||||
await page.goto(`/photos/${asset.id}`);
|
||||
|
||||
const preview = page.getByTestId('preview').filter({ visible: true });
|
||||
await expect(preview).toHaveAttribute('src', /.+/);
|
||||
|
||||
const box = await preview.boundingBox();
|
||||
const tagAtCenter = await page.evaluate(({ x, y }) => document.elementFromPoint(x, y)?.tagName, {
|
||||
x: box!.x + box!.width / 2,
|
||||
y: box!.y + box!.height / 2,
|
||||
});
|
||||
expect(tagAtCenter).toBe('IMG');
|
||||
});
|
||||
|
||||
test('reloads photo when checksum changes', async ({ page }) => {
|
||||
await page.goto(`/photos/${asset.id}`);
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
onLoad={() => adaptiveImageLoader.onLoad(quality)}
|
||||
onError={() => adaptiveImageLoader.onError(quality)}
|
||||
bind:ref
|
||||
class="h-full w-full bg-transparent"
|
||||
class="h-full w-full bg-transparent pointer-events-auto"
|
||||
{alt}
|
||||
{role}
|
||||
draggable={false}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user