Sha256: 0490864e57cc932f2f9283ca6825c5229c13f396f511c16eef82e3a38c5b13ee

Contents?: true

Size: 866 Bytes

Versions: 5

Compression:

Stored size: 866 Bytes

Contents

require 'spec_helper'

describe 'Institutions#index map view', js: true do

  before { visit institutions_path(:view => 'maps') }

  it 'should show map marker' do
    within ('#institutions-index-map') do
      expect(page).to have_selector('.leaflet-marker-icon')
    end
  end

  describe 'click marker cluster' do

    before { find('div.leaflet-marker-icon').click }

    it 'should show the search_form_institution content' do
      within ('div.leaflet-popup-content') do
        expect(page.text).to include('institution')
      end
    end

    describe 'constraints links' do

      before { find('div.leaflet-popup-content a').click }

      it 'should have .constraints > a.remove that links to institutions#index' do
        within ('#appliedParams') do
          expect(page.html).to include('/institutions?')
        end
      end

    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
commonwealth-vlr-engine-0.0.7 spec/features/institutions/map_view_spec.rb
commonwealth-vlr-engine-0.0.4 spec/features/institutions/map_view_spec.rb
commonwealth-vlr-engine-0.0.3 spec/features/institutions/map_view_spec.rb
commonwealth-vlr-engine-0.0.2 spec/features/institutions/map_view_spec.rb
commonwealth-vlr-engine-0.0.1 spec/features/institutions/map_view_spec.rb