Sha256: a781313a17f988c8dc536e3c26d2a99555fb022527d7a8c77586a2cd32e24857

Contents?: true

Size: 877 Bytes

Versions: 25

Compression:

Stored size: 877 Bytes

Contents

require 'spec_helper'

feature 'Add an attached file' do
  let(:user) { create(:user) }
  let!(:work) { create(:work, user: user) }

  before do
    sign_in user
    # stub out characterization. Travis doesn't have fits installed, and it's not relevant to the test.
    allow(CharacterizeJob).to receive(:perform_later)
    allow_any_instance_of(CurationConcerns::Actors::FileSetActor).to receive(:acquire_lock_for).and_yield
  end

  it 'updates the file' do
    visit "/concern/generic_works/#{work.id}"
    click_link 'Attach a File'

    within('form.new_file_set') do
      fill_in('Title', with: 'image.png')
      attach_file('Upload a file', fixture_file_path('files/image.png'))
      click_on('Attach to Generic Work')
    end

    visit "/concern/generic_works/#{work.id}"
    within '.related_files' do
      expect(page).to have_link 'image.png'
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
curation_concerns-1.7.0.beta1 spec/features/add_file_spec.rb
curation_concerns-1.6.3 spec/features/add_file_spec.rb
curation_concerns-1.6.2 spec/features/add_file_spec.rb
curation_concerns-1.6.1 spec/features/add_file_spec.rb
curation_concerns-1.6.0 spec/features/add_file_spec.rb
curation_concerns-1.5.0 spec/features/add_file_spec.rb
curation_concerns-1.4.0 spec/features/add_file_spec.rb
curation_concerns-1.3.3 spec/features/add_file_spec.rb
curation_concerns-1.3.2 spec/features/add_file_spec.rb
curation_concerns-1.3.1 spec/features/add_file_spec.rb
curation_concerns-1.3.0 spec/features/add_file_spec.rb
curation_concerns-1.2.0 spec/features/add_file_spec.rb
curation_concerns-1.1.2 spec/features/add_file_spec.rb
curation_concerns-1.1.1 spec/features/add_file_spec.rb
curation_concerns-1.1.0 spec/features/add_file_spec.rb
curation_concerns-1.0.0 spec/features/add_file_spec.rb
curation_concerns-1.0.0.beta10 spec/features/add_file_spec.rb
curation_concerns-1.0.0.beta9 spec/features/add_file_spec.rb
curation_concerns-1.0.0.beta8 spec/features/add_file_spec.rb
curation_concerns-1.0.0.beta7 spec/features/add_file_spec.rb