File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
app/views/sub_guide_cards Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 11< h1 > SubGuideCards#show</ h1 >
22< p > Find me in app/views/sub_guide_cards/show.html.erb</ p >
33<%= @sub_guide_card . heading %>
4- <%= @sub_guide_card . path %>
54<% @card_images . each do |image | %>
6- <%= image_tag ( image . iiif_url ) %>
5+ <%= image_tag ( image . iiif_url ) %>
76<% end %>
Original file line number Diff line number Diff line change 33require 'rails_helper'
44require 'ruby-progressbar/outputs/null'
55
6- RSpec . describe 'GuideCards ' , type : :system , js : true do
6+ RSpec . describe 'SubGuideCards ' , type : :system , js : true do
77 let ( :subguide_card_fixture ) { Rails . root . join ( 'spec' , 'fixtures' , 'subguide_card_fixture.csv' ) }
88 before do
99 SubGuideLoadingService . new ( csv_location : subguide_card_fixture ,
1010 progressbar : ProgressBar . create ( output : ProgressBar ::Outputs ::Null ) ) . import
1111 end
1212
13- describe 'SubGuide page with image display' do
14- it 'shows all images for the SubGuide path' do
13+ describe 'show page' do
14+ it 'displays card images as links' do
15+ ci = CardImage . new
16+ ci . path = SubGuideCard . find ( 2 ) . path
17+ ci . image_name = 'imagecat-disk1-0675-B1764-0000.0219.tif'
18+ ci . save
1519 visit '/sub_guide_cards/2'
16- expect ( page ) . to have_text 'Afdeling natuurkunde'
20+ expect ( page ) . to have_selector ( 'img' )
1721 end
1822 end
1923end
You can’t perform that action at this time.
0 commit comments