Add latest added tracks list on the home page
This commit is contained in:
@@ -8,3 +8,12 @@ Feature: Home
|
||||
Given a playlist named "Electro"
|
||||
When I am on the home page
|
||||
Then I should see "Electro" within "ul>li"
|
||||
|
||||
Scenario: Last tracks added
|
||||
Given the following tracks:
|
||||
| name | created_at |
|
||||
| Mega song 1 | 2011-07-27 19:13:42 |
|
||||
| Mega song 2 | 2011-07-27 19:58:57 |
|
||||
When I am on the home page
|
||||
Then I should see "Mega song 2" within "ul>li:first-child"
|
||||
And I should see "Mega song 1" within "ul>li:first-child+li"
|
||||
|
@@ -4,6 +4,12 @@ Given /^a track named "([^"]*)"$/ do |name|
|
||||
@track.save_with_file(file, 'audio/mpeg')
|
||||
end
|
||||
|
||||
Given /^the following tracks:$/ do |table|
|
||||
table.hashes.each do |h|
|
||||
Factory.create(:track, h)
|
||||
end
|
||||
end
|
||||
|
||||
Then /^I should see an audio player$/ do
|
||||
page.should have_xpath '//audio'
|
||||
end
|
||||
|
Reference in New Issue
Block a user