Sha256: 30c2807c03d604cb487cd23dbe319bdb36ba9fe6ef2e3898326b04f6547c70c5

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

# -*- encoding : utf-8 -*-

require File.expand_path('../../test_helper', __FILE__)

describe 'Manage which shares are being watched' do
  it 'should update a share through the UI' do
    gitdocs_add('local')
    gitdocs_start
    visit_and_click_link('Settings')

    within('#settings') do
      within('#share-0') do
        fill_in('share[0][polling_interval]', with: '0.2')
        select('Fetch only', from: 'share[0][sync_type]')
      end
      click_button('Save')
    end

    # Allow the asynchronous portion of the update finish before checking
    # the result.
    sleep(1)

    click_link('Settings')
    within('#settings') do
      within('#share-0') do
        page.must_have_field('share[0][polling_interval]', with: '0.2')
        page.must_have_field('share[0][sync_type]', with: 'fetch')
      end
    end
  end

  describe 'remove a share' do
    before { gitdocs_add('local') }

    it do
      gitdocs_start
      visit_and_click_link('Settings')

      within('#settings') do
        within('#share-0') { click_link('Delete') }

        page.must_have_css('.share', count: 0)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gitdocs-0.6.2 test/integration/web/share_management_test.rb
gitdocs-0.6.1 test/integration/web/share_management_test.rb
gitdocs-0.6.0 test/integration/web/share_management_test.rb