require '../common/spec_helper'
require './pages/directory_page'

describe 'Games Directory' do

  before(:each) do
    visit('/')
  end

  it 'loads' do
    expect(page).to have_css(DirectoryPage.games_list)
  end
end

describe 'Channel Directory' do

  before(:each) do
    visit('/')
  end

  it 'loads via Games Directory' do
    expect(page).to have_css(DirectoryPage.games_list)

    first(DirectoryPage.directory_item_css).click
    expect(page).to have_css(DirectoryPage.channel_directory)
    expect(page).to have_css(DirectoryPage.directory_item_css)
  end
end
