Commit ec2cb847 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Add assertions on real-time feature spec

Fixes a flaky spec when Capybara closes the browser before the
ActionCable subscription is established
parent 6bfef2d2
......@@ -33,5 +33,15 @@ RSpec.describe 'ActionCable logging', :js do
gitlab_sign_in(user)
visit project_issue_path(project, issue)
# Because there is no visual indicator for Capybara to wait on before closing the browser,
# we need to test an actual feature to ensure that the subscription was already established.
expect(page.find('.assignee')).to have_content 'None'
fill_in 'note[note]', with: "/assign #{user.username}"
click_button 'Comment'
expect(page.find('.assignee')).to have_content user.name
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment