Sha256: 501199f7735871e1f42ae17302acbdd2ac5af43ea3d6533f5c73e9181161cb5f
Contents?: true
Size: 1.46 KB
Versions: 3
Compression:
Stored size: 1.46 KB
Contents
require 'spec_helper' feature 'Download layer' do scenario 'clicking shapefile download button should trigger download', js: true do expect_any_instance_of(ShapefileDownload).to receive(:get).and_return('mit-us-ma-e25zcta5dct-2000-shapefile.zip') visit catalog_path('mit-us-ma-e25zcta5dct-2000') find('button', text: 'Download').click find('a', text: 'Shapefile').click expect(page).to have_css('a', text: 'Your file mit-us-ma-e25zcta5dct-2000-shapefile.zip is ready for download') end scenario 'clicking kmz download button should trigger download', js: true do expect_any_instance_of(KmzDownload).to receive(:get).and_return('mit-us-ma-e25zcta5dct-2000-kmz.kmz') visit catalog_path('mit-us-ma-e25zcta5dct-2000') find('button', text: 'Download').click find('a', text: 'KMZ').click expect(page).to have_css('a', text: 'Your file mit-us-ma-e25zcta5dct-2000-kmz.kmz is ready for download') end scenario 'restricted layer should not have download available to non logged in user' do visit catalog_path('stanford-jf841ys4828') expect(page).to have_css 'a', text: 'Login to view and download' expect(page).to_not have_css 'button', text: 'Download' end scenario 'restricted layer should have download available to logged in user' do sign_in visit catalog_path('stanford-jf841ys4828') expect(page).to_not have_css 'a', text: 'Login to view and download' expect(page).to have_css 'button', text: 'Download' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
geoblacklight-0.0.7 | spec/features/download_layer_spec.rb |
geoblacklight-0.0.6 | spec/features/download_layer_spec.rb |
geoblacklight-0.0.5 | spec/features/download_layer_spec.rb |