From 51df4af6ba33d1e7aca104c21278aea63c272233 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 13 Dec 2025 16:00:54 -0500 Subject: [PATCH] Add test coverage for the image lightbox because we're about to mess with it. --- test/system/smoke_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/system/smoke_test.rb b/test/system/smoke_test.rb index 14c7a7116..c307c50d2 100644 --- a/test/system/smoke_test.rb +++ b/test/system/smoke_test.rb @@ -54,6 +54,14 @@ class SmokeTest < ApplicationSystemTestCase assert_selector "a img[src*='/rails/active_storage']" assert_selector "figcaption span.attachment__name", text: "moon.jpg" end + + # Click the image to open the lightbox + find("action-text-attachment figure.attachment a:has(img)").click + + assert_selector "dialog.lightbox[open]" + within("dialog.lightbox") do + assert_selector "img.lightbox__image[src*='/rails/active_storage']" + end end test "dismissing notifications" do