From 9470d05c70c15df75ae6be45812967abf89ae59a Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Sun, 13 Dec 2015 00:39:47 +0100 Subject: Add spinach test for note polling This also increases capybara timeout to 15 seconds (note polling interval). Capybara will look for new note for this period of time. --- features/steps/project/issues/issues.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index a13044c3ae1..4a7ff21d385 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -284,6 +284,16 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end end + step 'another user adds a comment with text "Yay!" to issue "Release 0.4"' do + issue = Issue.find_by!(title: 'Release 0.4') + create(:note_on_issue, noteable: issue, note: 'Yay!') + end + + step 'I should see a new comment with text "Yay!"' do + page.within '#notes' do + expect(page).to have_content('Yay!') + end + end def filter_issue(text) fill_in 'issue_search', with: text end -- cgit v1.2.1