Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5b859e58
Commit
5b859e58
authored
May 06, 2020
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec for real-time sidebar assignees
Also mounts ActionCable in Capybara's Puma server
parent
ca6aa800
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
config/initializers/action_cable.rb
config/initializers/action_cable.rb
+3
-3
spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb
...ures/issues/user_sees_sidebar_updates_in_realtime_spec.rb
+32
-0
No files found.
config/initializers/action_cable.rb
View file @
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
spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb
0 → 100644
View file @
5b859e58
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment