Sha256: 1a8689cbea7471a2bb76619d59390bd82c5d8451b3d4a19e348633a693cb78b4

Contents?: true

Size: 1.16 KB

Versions: 22

Compression:

Stored size: 1.16 KB

Contents

require 'spec_helper'

describe 'dashboard' do
  let!(:exists_user) { build(:user) }

  before { login_with exists_user }

  context 'no configuration' do
    before { visit '/' }

    it do
      page.should have_css('h1', text: 'fluentd')
      page.should have_link(I18n.t('terms.setup', target: 'fluentd'))
      page.should have_link(I18n.t('terms.setup', target: 'td-agent'))
    end
  end

  context 'fluentd is stop', stub: :daemon do
    before { visit '/' }

    it do
      page.should have_css('h1', text: I18n.t('fluentd.show.page_title'))
      page.should have_css('h4', text: I18n.t('fluentd.common.stopped'))
      page.should have_css('h4', text: I18n.t('fluentd.common.fluentd_info'))
    end
  end

  context 'fluentd is running', stub: :daemon do
    before do
      # XXX i have no idea to not use stub...
      Fluentd::Agent::TdAgent.any_instance.stub(:running?).and_return(true)

      visit '/'
    end

    it do
      page.should have_css('h1', text: I18n.t('fluentd.show.page_title'))
      page.should have_css('h4', text: I18n.t('fluentd.common.running'))
      page.should have_css('h4', text: I18n.t('fluentd.common.fluentd_info'))
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
fluentd-ui-1.0.0.beta.1 spec/features/dashboard_spec.rb
fluentd-ui-1.0.0.alpha.3 spec/features/dashboard_spec.rb
fluentd-ui-1.0.0.alpha.2 spec/features/dashboard_spec.rb
fluentd-ui-1.0.0.alpha.1 spec/features/dashboard_spec.rb
fluentd-ui-0.4.5 spec/features/dashboard_spec.rb
fluentd-ui-0.4.4 spec/features/dashboard_spec.rb
fluentd-ui-0.4.3 spec/features/dashboard_spec.rb
fluentd-ui-0.4.2 spec/features/dashboard_spec.rb
fluentd-ui-0.4.1 spec/features/dashboard_spec.rb
fluentd-ui-0.4.0 spec/features/dashboard_spec.rb
fluentd-ui-0.3.21 spec/features/dashboard_spec.rb
fluentd-ui-0.3.20 spec/features/dashboard_spec.rb
fluentd-ui-0.3.19 spec/features/dashboard_spec.rb
fluentd-ui-0.3.18 spec/features/dashboard_spec.rb
fluentd-ui-0.3.17 spec/features/dashboard_spec.rb
fluentd-ui-0.3.16 spec/features/dashboard_spec.rb
fluentd-ui-0.3.15 spec/features/dashboard_spec.rb
fluentd-ui-0.3.14 spec/features/dashboard_spec.rb
fluentd-ui-0.3.13 spec/features/dashboard_spec.rb
fluentd-ui-0.3.12 spec/features/dashboard_spec.rb