harvard-lil / perma

Indelible links
423 stars 71 forks source link

Failed and in-progress links display #3628

Closed rebeccacremona closed 1 month ago

rebeccacremona commented 1 month ago

See LIL-2767.

Lots of work has been underway to convert the dashboard to Vue. While doing lots of QA for that work, I noticed that, if a capture failed, it was no longer styled as a failed capture in the link list. While I initially suspected something had gone amiss during the port, I think that actually, this has been broken since we switched from making captures with Perma's own, legacy capture system to making captures with Scoop. When using the legacy capture system, we created placeholder Capture(role='screenshot'...) objects for Perma Links by default, and marked them as status='failed' if we didn't get one. Now, we only create Capture objects for screenshots if we actually have one. And... the code for deciding whether to show the Capture Failed styles assumed a Capture(role='screenshot'...) would be present.

This PR tweaks the logic to handle the status quo.

Before:

image

After:

image

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.73%. Comparing base (d955941) to head (c426eb4). Report is 4 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3628 +/- ## ======================================== Coverage 69.73% 69.73% ======================================== Files 54 54 Lines 7326 7326 ======================================== Hits 5109 5109 Misses 2217 2217 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.