Skip to content
Snippets Groups Projects
Commit 9470d05c authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Grzegorz Bizon
Browse files

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.
parent 7c14541d
No related branches found
No related tags found
1 merge request!2086Add feature specs for note polling
Loading
@@ -197,3 +197,9 @@ Feature: Project Issues
Loading
@@ -197,3 +197,9 @@ Feature: Project Issues
And I should not see labels field And I should not see labels field
And I submit new issue "500 error on profile" And I submit new issue "500 error on profile"
Then I should see issue "500 error on profile" Then I should see issue "500 error on profile"
@javascript
Scenario: Another user adds a comment to issue I'm currently viewing
Given I visit issue page "Release 0.4"
And another user adds a comment with text "Yay!" to issue "Release 0.4"
Then I should see a new comment with text "Yay!"
Loading
@@ -284,6 +284,16 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
Loading
@@ -284,6 +284,16 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end end
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) def filter_issue(text)
fill_in 'issue_search', with: text fill_in 'issue_search', with: text
end end
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spinach/capybara'
Loading
@@ -2,7 +2,7 @@ require 'spinach/capybara'
require 'capybara/poltergeist' require 'capybara/poltergeist'
   
# Give CI some extra time # Give CI some extra time
timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10 timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15
   
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| Capybara.register_driver :poltergeist do |app|
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment