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
5d219e52
Commit
5d219e52
authored
Aug 19, 2021
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate epic sidebar participants to widget
Review feedback
parent
34ff5a78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
app/assets/javascripts/sidebar/components/participants/sidebar_participants_widget.vue
...r/components/participants/sidebar_participants_widget.vue
+3
-3
ee/app/assets/javascripts/epic/components/epic_sidebar.vue
ee/app/assets/javascripts/epic/components/epic_sidebar.vue
+1
-1
spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js
...mponents/participants/sidebar_participants_widget_spec.js
+9
-1
No files found.
app/assets/javascripts/sidebar/components/participants/sidebar_participants_widget.vue
View file @
5d219e52
...
...
@@ -57,8 +57,8 @@ export default {
},
},
methods
:
{
expand
Sidebar
()
{
this
.
$emit
(
'
expand
Sidebar
'
);
toggle
Sidebar
()
{
this
.
$emit
(
'
toggle
Sidebar
'
);
},
},
};
...
...
@@ -71,6 +71,6 @@ export default {
:number-of-less-participants=
"7"
:lazy=
"false"
class=
"block participants"
@
toggleSidebar=
"
expand
Sidebar"
@
toggleSidebar=
"
toggle
Sidebar"
/>
</
template
>
ee/app/assets/javascripts/epic/components/epic_sidebar.vue
View file @
5d219e52
...
...
@@ -254,7 +254,7 @@ export default {
:iid=
"String(iid)"
:full-path=
"fullPath"
:issuable-type=
"issuableType"
@
expand
Sidebar=
"handleSidebarToggle"
@
toggle
Sidebar=
"handleSidebarToggle"
/>
<sidebar-subscriptions-widget
:iid=
"String(iid)"
...
...
spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js
View file @
5d219e52
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Vue
from
'
vue
'
;
import
Vue
,
{
nextTick
}
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
...
...
@@ -45,6 +45,14 @@ describe('Sidebar Participants Widget', () => {
expect
(
findParticipants
().
props
(
'
loading
'
)).
toBe
(
true
);
});
it
(
'
emits toggleSidebar event when participants child component emits toggleSidebar
'
,
async
()
=>
{
createComponent
();
findParticipants
().
vm
.
$emit
(
'
toggleSidebar
'
);
await
nextTick
();
expect
(
wrapper
.
emitted
(
'
toggleSidebar
'
)).
toEqual
([[]]);
});
describe
(
'
when participants are loaded
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
...
...
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