require '../common/spec_helper'
require './pages/channel_page'
require './pages/components/player_ui'

describe 'Player-ui' do

  before(:each) do
    visit '?channel=monstercat'
  end

  it 'shows fullscreen overlay' do
    # within_frame(ChannelPage.player_frame) do
    expect(page).to have_css(PlayerUI.player_fullscreen_overlay)
    # end
  end

  it 'shows bottom play/pause button' do
    # Verify data-paused attr is false; stream is playing
    expect(PlayerUI).not_to be_paused

    # within_frame ChannelPage.player_frame do
    expect(page).to have_css(PlayerUI.play_pause_button)
    # end
  end

  it 'has fullscreen functionality' do
    # Verify data-isfullscreen attr is true; player is fullscreen
    expect(PlayerUI.player_fullscreen?).to be true
  end
end
