Sha256: 6b4d02217bc2eb83b36a5d50a77d247564c40fb4cfbdf55bde1233de8719f0e1

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

require 'spec_helper'
feature 'Dashboard' do

  it 'should has uptime information' do
    visit '/'
    expect(page).to have_content /Uptime(\ )+[0-9]+\ days\ [0-9]+h\ [0-9]+m/
  end

  it 'should has cpu load information' do
    visit '/'
    expect(page).to have_content /CPU\ usage(\ )+[0-9]+/
  end

  it 'should has ram usage information' do
    visit '/'
    expect(page).to have_content /RAM\ used\ [0-9]+(\.[0-9]+)?Gb\ from\ [0-9]+(\.[0-9]+)?Gb\ total/
  end

  it 'should show swap usage' do
    visit '/'
    expect(page).to have_content /Swap\ used\ [0-9]+(\.[0-9]+)?Gb\ from\ [0-9](\.[0-9]+)?Gb\ total/
  end

  it 'should show network interfaces' do 
    visit '/'
    expect(page).to have_content /[a-z]+[0-9][0-9\.]+(\ )/
  end

  it 'should show disks status' do
    visit '/'
    expect(page).to have_content /\/.*used\ [0-9\.]+Gb\ from\ [0-9\.]+Gb\ total/
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ServState-0.1.0 spec/dashboard_spec.rb