Commit ed429c0b authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'feature-spec-realtime-assignees' into 'master'

Add feature spec for real-time sidebar assignees

See merge request gitlab-org/gitlab!31132
parents 0e66c4e2 5b859e58
# frozen_string_literal: true
Rails.application.configure do
# Prevents the default engine from being mounted because
# we're running ActionCable as a standalone server
config.action_cable.mount_path = nil
# We only mount the ActionCable engine in tests where we run it in-app
# For other environments, we run it on a standalone Puma server
config.action_cable.mount_path = Rails.env.test? ? '/-/cable' : nil
config.action_cable.url = Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, '/-/cable')
config.action_cable.worker_pool_size = Gitlab.config.action_cable.worker_pool_size
end
# frozen_string_literal: true
require 'spec_helper'
describe 'Issues > Real-time sidebar', :js do
let_it_be(:project) { create(:project, :public) }
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:user) { create(:user) }
before_all do
project.add_developer(user)
end
it 'updates the assignee in real-time' do
Capybara::Session.new(:other_session)
using_session :other_session do
visit project_issue_path(project, issue)
expect(page.find('.assignee')).to have_content 'None'
end
gitlab_sign_in(user)
visit project_issue_path(project, issue)
expect(page.find('.assignee')).to have_content 'None'
click_button 'assign yourself'
using_session :other_session do
expect(page.find('.assignee')).to have_content user.name
end
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