From b0de20b916cf8876e448645dc8d699386a5eba2c Mon Sep 17 00:00:00 2001 From: Seth Call Date: Thu, 10 Apr 2014 18:56:21 +0000 Subject: [PATCH] * fixing landing tests --- web/app/views/shared/_comments.html.erb | 4 ++-- web/spec/features/recording_landing_spec.rb | 10 +++++----- web/spec/features/session_landing_spec.rb | 9 ++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/web/app/views/shared/_comments.html.erb b/web/app/views/shared/_comments.html.erb index 0dba9f65e..03f348550 100644 --- a/web/app/views/shared/_comments.html.erb +++ b/web/app/views/shared/_comments.html.erb @@ -20,10 +20,10 @@
-
+
{name} {comment}
-
{timeago}
+
{timeago}

\ No newline at end of file diff --git a/web/spec/features/recording_landing_spec.rb b/web/spec/features/recording_landing_spec.rb index e186f4c67..eeb426f72 100644 --- a/web/spec/features/recording_landing_spec.rb +++ b/web/spec/features/recording_landing_spec.rb @@ -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 \ No newline at end of file diff --git a/web/spec/features/session_landing_spec.rb b/web/spec/features/session_landing_spec.rb index 6e776ff21..f9530b8c7 100644 --- a/web/spec/features/session_landing_spec.rb +++ b/web/spec/features/session_landing_spec.rb @@ -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 \ No newline at end of file