Skip to content

Commit

Permalink
Explicilty include JS for the import UI
Browse files Browse the repository at this point in the history
Normally you put this tag in a layout, but our UI only
needs the JS on one page.
  • Loading branch information
little9 committed Oct 3, 2019
1 parent ced1eba commit 7cc0340
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/zizia/zizia.scss
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
@import 'file_upload';

.btn {
white-space:normal !important;
word-wrap: break-word;
}
1 change: 1 addition & 0 deletions app/views/zizia/csv_imports/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<%= javascript_include_tag 'zizia/application' %>
<h2><span class="glyphicon glyphicon-cloud-upload"></span> Begin Your CSV Import </h2>
<%= render 'form', csv_import: @csv_import %>
2 changes: 2 additions & 0 deletions spec/dummy/spec/system/import_from_csv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# Fill in and submit the form
attach_file('csv_import[manifest]', csv_file, make_visible: true)

expect(page).to have_content('You sucessfully uploaded this CSV: all_fields.csv')

click_on 'Preview Import'

# We expect to see the title of the collection on the page
Expand Down

0 comments on commit 7cc0340

Please sign in to comment.