mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
Smaller aircraft photos, one-row-per-item detail cards, push diagnostics
- Aircraft photos get 192px and 960x432 copies made on upload; the header, share page and Fleet cards use them (and the offline copies), instead of the full original. - Flight, engine data, component and major record details show one label and value per row on phones (wide items no longer add grid columns). - Profile re-records this device's push subscription on every visit, and says why if it can't; Send test delivers now and lists each device's result; Google's other push hosts are accepted; turning notifications on shows the browser's actual error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f314a13bb
commit
d4b71d17a1
21 files changed
+234
-96
No files matched your search
@@ -74,4 +74,22 @@ class WorkflowPolishTest < ActionDispatch::IntegrationTest
|
||||
get aircraft_path(@a)
|
||||
assert_select "[data-controller=dismiss]", 0
|
||||
end
|
||||
|
||||
test "aircraft pages show a small copy of the photo, made when it's uploaded" do
|
||||
perform_enqueued_jobs { @a.picture.attach(io: StringIO.new(Vips::Image.black(1200, 900).jpegsave_buffer), filename: "plane.jpg", content_type: "image/jpeg") }
|
||||
assert_equal 2, @a.picture.blob.variant_records.count, "both sizes are made on upload"
|
||||
sign_in @owner
|
||||
get aircraft_path(@a)
|
||||
assert_select "img[src*='/representations/'][width='48']"
|
||||
get aircraft_index_path
|
||||
assert_select "img[src*='/representations/'][loading='lazy']"
|
||||
end
|
||||
|
||||
test "a flight's details are one label and value per row" do
|
||||
flight = @a.flight_logs.create!(date: Date.current, tach_out: 100, tach_in: 101, hobbs_out: 50, hobbs_in: 51, user: @owner)
|
||||
sign_in @owner
|
||||
get aircraft_flight_log_path(@a, flight)
|
||||
assert_select "dl > div.detail-row > dt", minimum: 6
|
||||
assert_select "dl dd.col-span-3", 0
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user