Sha256: 67a32a685c6610500d28a404b1cd34b15670336ea0dc8e26f9b00828232a0a7e

Contents?: true

Size: 840 Bytes

Versions: 5

Compression:

Stored size: 840 Bytes

Contents

require 'spec_helper'

describe "Uploading files via web form", :type => :feature do
  before do
    sign_in :user
    click_link "Upload"
  end

  it "should have an ingest screen" do
    expect(page).to have_content "Select files"
    expect(page).to have_content "Start upload"
    expect(page).to have_content "Cancel upload"
    expect(page).to have_xpath '//input[@type="file"]'
  end

  it "should require checking the terms of service" do
    attach_file("files[]", File.dirname(__FILE__)+"/../../spec/fixtures/image.jp2")
    attach_file("files[]", File.dirname(__FILE__)+"/../../spec/fixtures/jp2_fits.xml")
    expect(page).to have_css("button#main_upload_start[disabled]")
    find('#main_upload_start_span').hover do
      expect(page).to have_content "Please accept Deposit Agreement before you can upload."
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sufia-5.0.0 spec/features/ingest_upload_files_spec.rb
sufia-5.0.0.rc1 spec/features/ingest_upload_files_spec.rb
sufia-4.3.1 spec/features/ingest_upload_files_spec.rb
sufia-4.2.0 spec/features/ingest_upload_files_spec.rb
sufia-4.1.0 spec/features/ingest_upload_files_spec.rb