Commit 7b33e89c authored by marcheing's avatar marcheing

Add feature for pending encoded content

parent ef2ba1c3
......@@ -3,9 +3,13 @@ Given(/^there is a video author user$/) do
create(:profile, user_id: @video_author.id)
end
Given(/^the video author has a stored and encoded video$/) do
Given(/^the video author has a stored video$/) do
@video = create(:video, :zencoder, user_id: @video_author.id)
Delayed::Job.where(queue: 'zencoder').last.invoke_job
end
Given(/^the video author has a stored and encoded video$/) do
step 'the video author has a stored video'
`zencoder_fetcher -u #{ZencoderSettings.notifications.url} #{ZencoderSettings.api_key} -n 1 -x`
end
......@@ -19,5 +23,9 @@ Then(/^I should see the video player$/) do
end
Then(/^I should be able to see the video's author$/) do
should have_content(@video_author.profile.full_name)
step "I should see \"#{@video_author.profile.full_name}\""
end
Then(/^I should see the content is not ready message$/) do
step "I should see \"#{I18n.t('video_has_not_finished_encoding')}\""
end
......@@ -14,3 +14,10 @@ Feature: Video player
When I visit the video's page
Then I should see the video player
And I should be able to see the video's author
@javascript
Scenario: Accessing video page when the encoding process is not finished
Given there is a video author user
And the video author has a stored video
When I visit the video's page
Then I should see the content is not ready message
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment