Sha256: 9ed819b1f20fc8e48e66b64da86fa1073830266f5c649eec9c59d1e18bed5e3b

Contents?: true

Size: 895 Bytes

Versions: 9

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true

describe 'Choosing files', type: :feature, js: true do
  before do
    visit '/'
  end

  shared_examples 'browseable files' do
    it 'selects files from the filesystem' do
      click_button('Browse')
      wait_for_ajax

      expect(page).to have_selector '#browse-everything'
      expect(page).to have_link 'config.ru'
      find(:css, '#config-ru').set(true)

      within('.modal-footer') do
        click_button('Submit')
      end

      wait_for_ajax

      expect(page).to have_selector('#status', text: '1 items selected')
    end
  end

  context 'when Turbolinks are enabled', fail: true do
    before { click_link('Enter Test App (Turbolinks)') }

    it_behaves_like 'browseable files'
  end

  context 'when Turbolinks are disabled' do
    before { click_link('Enter Test App (No Turbolinks)') }

    it_behaves_like 'browseable files'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
browse-everything-1.1.2 spec/features/select_files_spec.rb
browse-everything-1.1.1 spec/features/select_files_spec.rb
browse-everything-1.1.0 spec/features/select_files_spec.rb
browse-everything-1.0.2 spec/features/select_files_spec.rb
browse-everything-1.0.1 spec/features/select_files_spec.rb
browse-everything-1.0.0 spec/features/select_files_spec.rb
browse-everything-1.0.0.rc2 spec/features/select_files_spec.rb
browse-everything-1.0.0.rc1 spec/features/select_files_spec.rb
browse-everything-0.16.1 spec/features/select_files_spec.rb