asciinema.org/spec/features/playback_spec.rb

25 lines
556 B
Ruby
Raw Normal View History

2013-05-27 19:25:29 +00:00
require 'spec_helper'
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
page.should have_css('.time-remaining', visible: false, text: '-00:0')
2013-05-27 19:25:29 +00:00
end
end
end