Sha256: 5b1bf09778a7fee9b426a266c63dd6f9ce3bb17ac48676405e77bdedd453f0c7

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true
require 'spec_helper'

feature 'Index map' do
  # Colors
  default_color = '#7FCDBB'
  selected_color = '#2C7FB8'
  scenario 'displays index map viewer (polygon)', js: true do
    visit solr_document_path('stanford-fb897vt9938')
    # Wait until SVG elements are added
    expect(page).to have_css '.leaflet-overlay-pane svg'
    within '#map' do
      expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
      find('svg g path:nth-child(2)').click
      expect(page).to have_css "svg g path:nth-child(2)[fill='#{selected_color}']"
      first('svg g path').click
      expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
    end
  end
  scenario 'displays index map viewer (points)', js: true do
    visit solr_document_path('cornell-ny-aerial-photos-1960s')
    # Wait until SVG elements are added
    expect(page).to have_css '.leaflet-overlay-pane svg'
    within '#map' do
      expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
      find('svg g path:nth-child(2)').click
      expect(page).to have_css "svg g path:nth-child(2)[fill='#{selected_color}']"
      first('svg g path').click
      expect(page).to have_css "svg g path:nth-child(2)[fill='#{default_color}']"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geoblacklight-4.0.0 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.rc3 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.rc2 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.rc1 spec/features/index_map_spec.rb