fix(web): allow images to be downloaded again(long-press or right click) (#26992)

This commit is contained in:
Min Idzelis
2026-03-18 07:40:36 -04:00
committed by GitHub
parent 694ea151f5
commit 88002cf7fe
2 changed files with 15 additions and 1 deletions

View File

@@ -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}`);