Sha256: 41d4f2832b735b6b94b4469bc1c5a8738f67070094d0c20d573f3b4571bc89ed

Contents?: true

Size: 891 Bytes

Versions: 6

Compression:

Stored size: 891 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

  context "the terms of service", :js do
    it "should be required to be checked" 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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sufia-6.0.0 spec/features/ingest_upload_files_spec.rb
sufia-6.0.0.rc4 spec/features/ingest_upload_files_spec.rb
sufia-6.0.0.rc3 spec/features/ingest_upload_files_spec.rb
sufia-6.0.0.rc2 spec/features/ingest_upload_files_spec.rb
sufia-6.0.0.rc1 spec/features/ingest_upload_files_spec.rb
sufia-6.0.0.beta1 spec/features/ingest_upload_files_spec.rb