Sha256: 4301f9a6390ecab14596c3fb357650da9fbb7f05cc71f41b597977156ff51fd5

Contents?: true

Size: 1.27 KB

Versions: 16

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true
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

16 entries across 16 versions & 1 rubygems

Version Path
geoblacklight-3.8.1 spec/features/index_map_spec.rb
geoblacklight-3.8.0 spec/features/index_map_spec.rb
geoblacklight-3.7.0 spec/features/index_map_spec.rb
geoblacklight-3.6.0 spec/features/index_map_spec.rb
geoblacklight-3.5.0 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.alpha.3 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.alpha.2 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.alpha.1 spec/features/index_map_spec.rb
geoblacklight-4.0.0.pre.alpha spec/features/index_map_spec.rb
geoblacklight-3.4.0 spec/features/index_map_spec.rb
geoblacklight-3.3.1 spec/features/index_map_spec.rb
geoblacklight-3.3.0 spec/features/index_map_spec.rb
geoblacklight-3.2.0 spec/features/index_map_spec.rb
geoblacklight-3.1.0 spec/features/index_map_spec.rb
geoblacklight-3.0.1 spec/features/index_map_spec.rb
geoblacklight-3.0.0 spec/features/index_map_spec.rb