Skip to content

Commit 4008dec

Browse files
committed
using record ids
1 parent e54283f commit 4008dec

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

spec/features/export_geofile_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
click_download_button
1010
end
1111

12-
it_behaves_like 'export geofile to local', 'berkeley-s7038h-shapefile.zip', 'Export Shapefile'
13-
it_behaves_like 'export geofile to local', 'berkeley-s7038h-kmz.kmz', 'Export KMZ'
14-
it_behaves_like 'export geofile to local', 'berkeley-s7038h-geojson.json', 'Export GeoJSON'
12+
it_behaves_like 'export geofile to local', "#{CommonHelpers::PUBLIC_RECORD_ID}-shapefile.zip", 'Export Shapefile'
13+
it_behaves_like 'export geofile to local', "#{CommonHelpers::PUBLIC_RECORD_ID}-kmz.kmz", 'Export KMZ'
14+
it_behaves_like 'export geofile to local', "#{CommonHelpers::PUBLIC_RECORD_ID}-geojson.json", 'Export GeoJSON'
1515

1616
end

spec/support/common_helpers.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
module CommonHelpers
22
EXPORT_TMP_PATH = '/opt/app/tmp/cache/downloads'.freeze
33
DOWNLOAD_TMP_PATH = '/opt/app/tmp/selenium_downloads'.freeze
4+
PUBLIC_RECORD_ID = 'berkeley-s7038h'.freeze
5+
RESTRICTED_RECORD_ID = 'berkeley-s7b12n'.freeze
46

57
def view_public_record
6-
visit 'catalog/berkeley-s7038h'
8+
visit "catalog/#{PUBLIC_RECORD_ID}"
79
end
810

911
def view_restricted_record
10-
visit '/catalog/berkeley-s7b12n'
12+
visit "/catalog/#{RESTRICTED_RECORD_ID}"
1113
end
1214

1315
def click_download_button

spec/system/public_result_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
context 'metadata link' do
1515
it 'displays the metadata link' do
16-
expect(page).to have_link('Metadata', href: '/catalog/berkeley-s7038h/metadata')
16+
expect(page).to have_link('Metadata', href: "/catalog/#{CommonHelpers::PUBLIC_RECORD_ID}/metadata")
1717
end
1818

1919
it 'clicking the metadata link, triggers the modal', js: true do

0 commit comments

Comments
 (0)