* fixing landing tests

This commit is contained in:
Seth Call 2014-04-10 18:56:21 +00:00
parent 916f93797e
commit b0de20b916
3 changed files with 11 additions and 12 deletions

View File

@ -20,10 +20,10 @@
<div user-id="{user_id}" hoveraction="{hoverAction}" class="avatar-small mr10">
<img src="{avatar_url}" alt="" />
</div>
<div class="w80 left p10 lightgrey mt10">
<div class="w80 left p10 lightgrey mt10 comment-text">
<a user-id="{user_id}" hoveraction="{hoverAction}">{name}</a>&nbsp;{comment}
<br />
<div class="f12 grey mt5">{timeago}</div>
<div class="f12 grey mt5 comment-timestamp">{timeago}</div>
</div>
<br clear="all" />
</script>

View File

@ -12,12 +12,12 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do
before(:each) do
MusicSessionHistory.delete_all
sign_in_poltergeist(user)
end
let (:claimed_recording) { FactoryGirl.create(:claimed_recording) }
it "should render comments" do
pending "weird error"
recording = ClaimedRecording.first
comment = "test comment"
@ -31,10 +31,10 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do
# (1) Test a user creating a comment and ensure it displays.
# comment body
find('div', text: comment)
find('div.comment-text', text: comment)
# timestamp
find('div', text: timestamp)
find('div.comment-timestamp', text: timestamp)
# (2) Test a user visiting a landing page with an existing comment.
@ -42,9 +42,9 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do
visit url
# comment body
find('div', text: comment)
find('div.comment-text', text: comment)
# timestamp
find('div', text: timestamp)
find('div.comment-timestamp', text: timestamp)
end
end

View File

@ -14,7 +14,6 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do
end
it "should render comments" do
pending "weird error"
msh = MusicSessionHistory.first
comment = "test comment"
@ -28,10 +27,10 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do
find('#btnPostComment').trigger(:click)
# comment body
find('div', text: comment)
find('div.comment-text', text: comment)
# timestamp
find('div', text: timestamp)
find('div.comment-timestamp', text: timestamp)
# (2) Test a user visiting a landing page with an existing comment.
@ -39,9 +38,9 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do
visit url
# comment body
find('div', text: comment)
find('div.comment-text', text: comment)
# timestamp
find('div', text: timestamp)
find('div.comment-timestamp', text: timestamp)
end
end