diff --git a/app/models/zizia/csv_import_detail.rb b/app/models/zizia/csv_import_detail.rb
index b3a3e8d..37c4bc6 100644
--- a/app/models/zizia/csv_import_detail.rb
+++ b/app/models/zizia/csv_import_detail.rb
@@ -9,6 +9,10 @@ class CsvImportDetail < ::ApplicationRecord
has_many :pre_ingest_works
has_many :pre_ingest_files, through: :pre_ingest_works
+ def status
+ 'undetermined'
+ end
+
def total_size
return 0 if pre_ingest_files.empty?
pre_ingest_files.map(&:size).sum
diff --git a/app/views/zizia/csv_import_details/index.html.erb b/app/views/zizia/csv_import_details/index.html.erb
index 7990127..fddab5e 100644
--- a/app/views/zizia/csv_import_details/index.html.erb
+++ b/app/views/zizia/csv_import_details/index.html.erb
@@ -8,6 +8,8 @@
Number of Works |
Number of Files |
Total Size |
+ Status |
+ Overwrite Behavior Type |
<% @csv_import_details.each do |csv_import_detail| %>
@@ -32,6 +34,12 @@
<%= number_to_human_size(csv_import_detail.total_size) %>
|
+
+ <%= csv_import_detail.status %>
+ |
+
+ <%= csv_import_detail.update_actor_stack %>
+ |
<% end %>
diff --git a/db/migrate/20191029162902_add_status_to_csv_import_detail.rb b/db/migrate/20191029162902_add_status_to_csv_import_detail.rb
new file mode 100644
index 0000000..52e92c7
--- /dev/null
+++ b/db/migrate/20191029162902_add_status_to_csv_import_detail.rb
@@ -0,0 +1,5 @@
+class AddStatusToCsvImportDetail < ActiveRecord::Migration[5.1]
+ def change
+ add_column :zizia_csv_import_details, :status, :string
+ end
+end
diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb
index 9fc173c..2a5e89c 100644
--- a/spec/dummy/db/schema.rb
+++ b/spec/dummy/db/schema.rb
@@ -573,6 +573,7 @@
t.integer "failure_count"
t.string "deduplication_field"
t.string "update_actor_stack"
+ t.string "status"
t.index ["csv_import_id"], name: "index_zizia_csv_import_details_on_csv_import_id"
end
diff --git a/spec/dummy/spec/system/csv_import_details_page_spec.rb b/spec/dummy/spec/system/csv_import_details_page_spec.rb
index 3ee799d..19c09c6 100644
--- a/spec/dummy/spec/system/csv_import_details_page_spec.rb
+++ b/spec/dummy/spec/system/csv_import_details_page_spec.rb
@@ -17,6 +17,8 @@
it 'displays the metadata when you visit the page' do
visit ('/csv_import_details/index')
expect(page).to have_content('CSV Imports ID')
+ expect(page).to have_content('Status')
+ expect(page).to have_content('undetermined')
click_on '1'
expect(page).to have_content('Total Size')
end
@@ -34,6 +36,18 @@
expect(page).to have_content('October 29, 2019 14:20')
end
+ it 'displays undetermined for the status' do
+ visit ('/csv_import_details/index')
+ expect(page).to have_content('Status')
+ expect(page).to have_content('undetermined')
+ end
+
+ it 'displays the overwrite behavior type' do
+ visit ('/csv_import_details/index')
+ expect(page).to have_content('Overwrite Behavior Type')
+ expect(page).to have_content('HyraxMetadataOnly')
+ end
+
it 'has the dashboard layout' do
visit ('/csv_import_details/index')
expect(page).to have_content('Your activity')
diff --git a/spec/factories/csv_import_detail.rb b/spec/factories/csv_import_detail.rb
index 5f0430d..f09fa54 100644
--- a/spec/factories/csv_import_detail.rb
+++ b/spec/factories/csv_import_detail.rb
@@ -11,6 +11,6 @@
success_count { 1 }
failure_count { 0 }
deduplication_field { 'identifier' }
- update_actor_stack { 'HyraxDefault' }
+ update_actor_stack { 'HyraxMetadataOnly' }
end
end