2014-08-30 17:38:47 +00:00
|
|
|
require 'rails_helper'
|
2013-05-27 19:25:29 +00:00
|
|
|
|
|
|
|
describe 'Asciicast playback', :js => true, :slow => true do
|
|
|
|
|
2013-10-20 15:26:01 +00:00
|
|
|
let(:asciicast) { create(:asciicast) }
|
|
|
|
|
|
|
|
describe "from fixture" do
|
|
|
|
before do
|
|
|
|
@old_wait_time = Capybara.default_wait_time
|
2014-07-01 19:53:29 +00:00
|
|
|
Capybara.default_wait_time = 15
|
2013-10-20 15:26:01 +00:00
|
|
|
end
|
2013-05-27 19:25:29 +00:00
|
|
|
|
2013-10-20 15:26:01 +00:00
|
|
|
after do
|
|
|
|
Capybara.default_wait_time = @old_wait_time
|
|
|
|
end
|
2013-05-27 19:25:29 +00:00
|
|
|
|
2013-10-20 15:26:01 +00:00
|
|
|
it "is successful" do
|
|
|
|
visit asciicast_path(asciicast, speed: 5)
|
2014-07-01 19:53:29 +00:00
|
|
|
find(".start-prompt .play-button").click
|
2014-09-25 19:47:25 +00:00
|
|
|
expect(page).to have_css('.time-remaining', visible: false, text: '-00:0')
|
2013-05-27 19:25:29 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|