Preserve chronological order in gapless gallery rows

This commit is contained in:
2026-09-26 19:10:42 +01:00
parent c864e781d7
commit 00fffe703d
4 changed files with 86 additions and 14 deletions
+6
View File
@@ -27,4 +27,10 @@ single = '<p><img src="/img/arts/uploads/batch/00.jpg"></p>'
raise 'Single photo changed' unless renderer.gallery_items(single) == [single]
legacy = '<p><img src="/img/old.jpg"></p><p>Existing artwork content</p>'
raise 'Legacy artwork changed' unless renderer.gallery_items(legacy) == [legacy]
portrait = '<img src="/img/arts/dresden-prague-iran-2024/Prague_000512360030.jpg">'
landscape = '<img src="/img/arts/uploads/5e085e7d10edc54172e7b5c47d22fe532edec19c879a8d566667d3c3c1bb3d96/00.jpg">'
raise 'Portrait ratio incorrect' unless renderer.gallery_image_ratio(portrait) < 1
raise 'Landscape ratio incorrect' unless renderer.gallery_image_ratio(landscape) > 1
raise 'Video fallback ratio incorrect' unless renderer.gallery_image_ratio('<video></video>') == 1.5
puts 'Gallery item regression checks passed'