Skip to content

Commit 65ad2c1

Browse files
committed
clean up
1 parent 5fed57d commit 65ad2c1

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ services:
4646
selenium:
4747
image: selenium/standalone-chrome
4848
# image: selenium/standalone-chrome:4.10.0
49-
# environment:
50-
# - SE_ENABLE_TRACING=false
49+
environment:
50+
# - SE_OTEL_SERVICE_NAME="selenium-standalone"
51+
# - SE_ENABLE_TRACING=false
5152
ports:
5253
- 4444:4444
5354
- 7900:7900
@@ -65,3 +66,4 @@ volumes:
6566

6667
#https://github.com/SeleniumHQ/docker-selenium/issues/2423
6768
#https://github.com/SeleniumHQ/docker-selenium?tab=readme-ov-file#standalone
69+
#https://www.selenium.dev/blog/2023/headless-is-going-away/

spec/features/download_zipfile_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
let(:download_dir) { '/home/seluser/Downloads/' }
77
let(:zip_file_name) { 'data.zip' }
88
let(:zip_file_path) { File.join(download_dir, zip_file_name) }
9+
let(:crdownload_file) { "#{zip_file_path}.crdownload" }
910
let(:crdownload_files) { Dir.glob(File.join(download_dir, '*.crdownload')) }
1011

1112
before do
@@ -53,15 +54,14 @@ def wait_for_zip_download(zip_file_path, timeout: 600)
5354
end
5455
it 'click link to download original source data zip file' do
5556
find_link('Original Shapefile').click
56-
sleep 5
57+
# sleep 5
5758

5859
# wait = Selenium::WebDriver::Wait.new(timeout: 10)
5960
# wait.until do
6061
# !File.exist?(crdownload_file) && File.exist?(zip_file_path)
6162
# end
6263
wait_for_zip_download(zip_file_path, timeout: 30)
6364
expect(File.exist?(zip_file_path)).to be_truthy, "Expected source data zip file not found: #{zip_file_path}"
64-
6565
end
6666

6767
# it 'Source data zip file includes ' do

spec/support/shared_examples/link_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919

2020
end
2121

22-
RSpec.shared_examples 'export geofile' do |file_name, link_name|
22+
RSpec.shared_examples 'export geofile to local' do |file_name, link_name|
2323
let(:download_dir) { '/opt/app/tmp/cache/downloads' }
2424
let(:export_file_path) { File.join(download_dir, file_name) }
2525

2626
before do
2727
# FileUtils.rm_f(shapefile_zip_file_path)
28-
Dir.mkdir(download_dir) unless File.exist?(download_dir)
28+
FileUtils.mkdir_p(download_dir)
29+
# Dir.mkdir(download_dir) unless File.exist?(download_dir)
2930
# FileUtils.rm_f(shapefile_zip_file_path)
3031
# FileUtils.mkdir_p(download_dir)
3132
visit 'catalog/berkeley-s7038h'
@@ -37,10 +38,10 @@
3738
FileUtils.rm_f(export_file_path)
3839
end
3940

40-
it "export geofle #{file_name}" do
41+
it "export geofle: #{file_name}" do
4142
find_link(link_name).click
4243
sleep 5
43-
expect(File.exist?(export_file_path)).to be_truthy, "Expected source data zip file not found: #{export_file_path}"
44+
expect(File.exist?(export_file_path)).to be_truthy, "Expected no exported geofile not found: #{export_file_path}"
4445
end
4546

4647
end

0 commit comments

Comments
 (0)