Sha256: 91b22346dfea22c560e8212dde5a10f030a7a160cf6ee972cabb5a423215a7f5

Contents?: true

Size: 1.24 KB

Versions: 8

Compression:

Stored size: 1.24 KB

Contents

require 'spec_helper'

feature 'Index map' do
  # Colors
  default_color = '#1eb300'
  selected_color = '#006bde'
  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

8 entries across 8 versions & 1 rubygems

Version Path
geoblacklight-2.4.0 spec/features/index_map_spec.rb
geoblacklight-2.3.0 spec/features/index_map_spec.rb
geoblacklight-2.2.1 spec/features/index_map_spec.rb
geoblacklight-2.2.0 spec/features/index_map_spec.rb
geoblacklight-2.1.2 spec/features/index_map_spec.rb
geoblacklight-2.1.1 spec/features/index_map_spec.rb
geoblacklight-2.1.0 spec/features/index_map_spec.rb
geoblacklight-2.0.0 spec/features/index_map_spec.rb